From 84474165e268c2602973f08392d5d77f551a18fb Mon Sep 17 00:00:00 2001 From: Gordon Smith Date: Tue, 1 Feb 2022 05:26:57 +0000 Subject: [PATCH] chore: Squash for 8.10.x This branch is the same as hpcc-platform-8.8.x but rebased onto 2024.02.14 The port versions are the same as 8.8.x, but the build tools are from 2024.02.14 This is needed as 8.8.x is failing to build on windows Signed-off-by: Gordon Smith --- .github/workflows/prebuild-docker.yml | 50 + .github/workflows/prebuild-gh_envs.yml | 152 +++ .github/workflows/untrustedPR.yml | 171 ---- .gitignore | 9 +- dockerfiles/build.sh | 47 + dockerfiles/centos-7.dockerfile | 76 ++ dockerfiles/centos-8.dockerfile | 64 ++ dockerfiles/ubuntu-18.04.dockerfile | 57 ++ dockerfiles/ubuntu-20.04.dockerfile | 57 ++ dockerfiles/ubuntu-22.04.dockerfile | 57 ++ dockerfiles/ubuntu-hpcc.dockerfile | 66 ++ overlays/apr/portfile.cmake | 99 ++ overlays/apr/vcpkg.json | 21 + .../aws-crt-cpp/fix-cmake-target-path.patch | 28 + overlays/aws-crt-cpp/fix-ios-build.patch | 21 + overlays/aws-crt-cpp/no-werror.patch | 16 + overlays/aws-crt-cpp/portfile.cmake | 45 + overlays/aws-crt-cpp/vcpkg.json | 33 + overlays/aws-sdk-cpp/compute_build_only.cmake | 835 +++++++++++++++++ overlays/aws-sdk-cpp/fix-aws-root.patch | 22 + overlays/aws-sdk-cpp/fix-openssl3.patch | 13 + overlays/aws-sdk-cpp/generateFeatures.ps1 | 73 ++ .../lock-curl-http-and-tls-settings.patch | 20 + .../aws-sdk-cpp/patch-relocatable-rpath.patch | 12 + overlays/aws-sdk-cpp/portfile.cmake | 101 ++ overlays/aws-sdk-cpp/usage | 12 + overlays/aws-sdk-cpp/vcpkg.json | 874 ++++++++++++++++++ overlays/cpp-driver/cmake/Dependencies.cmake | 141 +++ overlays/cpp-driver/portfile.cmake | 56 ++ overlays/cpp-driver/vcpkg.json | 15 + overlays/elasticlient/portfile.cmake | 24 + overlays/elasticlient/vcpkg.json | 15 + overlays/icu/disable-escapestr-tool.patch | 17 + overlays/icu/disable-static-prefix.patch | 20 + overlays/icu/fix-extra.patch | 13 + overlays/icu/fix-win-build.patch | 35 + .../icu/fix_parallel_build_on_windows.patch | 25 + overlays/icu/mingw-dll-install.patch | 13 + overlays/icu/portfile.cmake | 199 ++++ overlays/icu/remove-MD-from-configure.patch | 18 + overlays/icu/vcpkg-cmake-wrapper.cmake | 6 + overlays/icu/vcpkg.json | 14 + .../libmysql/004-added-limits-include.patch | 12 + overlays/libmysql/export-cmake-targets.patch | 123 +++ overlays/libmysql/ignore-boost-version.patch | 13 + overlays/libmysql/openssl.patch | 125 +++ overlays/libmysql/portfile.cmake | 145 +++ overlays/libmysql/rename-version.patch | 26 + overlays/libmysql/system-libs.patch | 149 +++ overlays/libmysql/usage | 4 + overlays/libmysql/vcpkg-cmake-wrapper.cmake | 9 + overlays/libmysql/vcpkg.json | 32 + overlays/openldap/m4.patch | 12 + overlays/openldap/openssl.patch | 13 + overlays/openldap/portfile.cmake | 64 ++ overlays/openldap/subdirs.patch | 34 + overlays/openldap/usage | 6 + overlays/openldap/vcpkg.json | 14 + overlays/openssl/install-pc-files.cmake | 32 + overlays/openssl/openssl.pc.in | 6 + overlays/openssl/portfile.cmake | 28 + overlays/openssl/unix/CMakeLists.txt | 283 ++++++ overlays/openssl/unix/portfile.cmake | 38 + overlays/openssl/unix/remove-deps.cmake | 7 + overlays/openssl/usage | 4 + overlays/openssl/uwp/EnableUWPSupport.patch | 170 ++++ overlays/openssl/uwp/make-openssl.bat | 16 + overlays/openssl/uwp/portfile.cmake | 163 ++++ overlays/openssl/vcpkg-cmake-wrapper.cmake.in | 78 ++ overlays/openssl/vcpkg.json | 17 + overlays/openssl/windows/portfile.cmake | 172 ++++ overlays/winflexbison/portfile.cmake | 20 + overlays/winflexbison/vcpkg.json | 8 + .../compile_wrapper_consider_clang-cl.patch | 12 + vcpkg-configuration.json | 14 + vcpkg.json | 92 ++ 76 files changed, 5410 insertions(+), 173 deletions(-) create mode 100644 .github/workflows/prebuild-docker.yml create mode 100644 .github/workflows/prebuild-gh_envs.yml delete mode 100644 .github/workflows/untrustedPR.yml create mode 100644 dockerfiles/build.sh create mode 100644 dockerfiles/centos-7.dockerfile create mode 100644 dockerfiles/centos-8.dockerfile create mode 100644 dockerfiles/ubuntu-18.04.dockerfile create mode 100644 dockerfiles/ubuntu-20.04.dockerfile create mode 100644 dockerfiles/ubuntu-22.04.dockerfile create mode 100644 dockerfiles/ubuntu-hpcc.dockerfile create mode 100644 overlays/apr/portfile.cmake create mode 100644 overlays/apr/vcpkg.json create mode 100644 overlays/aws-crt-cpp/fix-cmake-target-path.patch create mode 100644 overlays/aws-crt-cpp/fix-ios-build.patch create mode 100644 overlays/aws-crt-cpp/no-werror.patch create mode 100644 overlays/aws-crt-cpp/portfile.cmake create mode 100644 overlays/aws-crt-cpp/vcpkg.json create mode 100644 overlays/aws-sdk-cpp/compute_build_only.cmake create mode 100644 overlays/aws-sdk-cpp/fix-aws-root.patch create mode 100644 overlays/aws-sdk-cpp/fix-openssl3.patch create mode 100644 overlays/aws-sdk-cpp/generateFeatures.ps1 create mode 100644 overlays/aws-sdk-cpp/lock-curl-http-and-tls-settings.patch create mode 100644 overlays/aws-sdk-cpp/patch-relocatable-rpath.patch create mode 100644 overlays/aws-sdk-cpp/portfile.cmake create mode 100644 overlays/aws-sdk-cpp/usage create mode 100644 overlays/aws-sdk-cpp/vcpkg.json create mode 100644 overlays/cpp-driver/cmake/Dependencies.cmake create mode 100644 overlays/cpp-driver/portfile.cmake create mode 100644 overlays/cpp-driver/vcpkg.json create mode 100644 overlays/elasticlient/portfile.cmake create mode 100644 overlays/elasticlient/vcpkg.json create mode 100644 overlays/icu/disable-escapestr-tool.patch create mode 100644 overlays/icu/disable-static-prefix.patch create mode 100644 overlays/icu/fix-extra.patch create mode 100644 overlays/icu/fix-win-build.patch create mode 100644 overlays/icu/fix_parallel_build_on_windows.patch create mode 100644 overlays/icu/mingw-dll-install.patch create mode 100644 overlays/icu/portfile.cmake create mode 100644 overlays/icu/remove-MD-from-configure.patch create mode 100644 overlays/icu/vcpkg-cmake-wrapper.cmake create mode 100644 overlays/icu/vcpkg.json create mode 100644 overlays/libmysql/004-added-limits-include.patch create mode 100644 overlays/libmysql/export-cmake-targets.patch create mode 100644 overlays/libmysql/ignore-boost-version.patch create mode 100644 overlays/libmysql/openssl.patch create mode 100644 overlays/libmysql/portfile.cmake create mode 100644 overlays/libmysql/rename-version.patch create mode 100644 overlays/libmysql/system-libs.patch create mode 100644 overlays/libmysql/usage create mode 100644 overlays/libmysql/vcpkg-cmake-wrapper.cmake create mode 100644 overlays/libmysql/vcpkg.json create mode 100644 overlays/openldap/m4.patch create mode 100644 overlays/openldap/openssl.patch create mode 100644 overlays/openldap/portfile.cmake create mode 100644 overlays/openldap/subdirs.patch create mode 100644 overlays/openldap/usage create mode 100644 overlays/openldap/vcpkg.json create mode 100644 overlays/openssl/install-pc-files.cmake create mode 100644 overlays/openssl/openssl.pc.in create mode 100644 overlays/openssl/portfile.cmake create mode 100644 overlays/openssl/unix/CMakeLists.txt create mode 100644 overlays/openssl/unix/portfile.cmake create mode 100644 overlays/openssl/unix/remove-deps.cmake create mode 100644 overlays/openssl/usage create mode 100644 overlays/openssl/uwp/EnableUWPSupport.patch create mode 100644 overlays/openssl/uwp/make-openssl.bat create mode 100644 overlays/openssl/uwp/portfile.cmake create mode 100644 overlays/openssl/vcpkg-cmake-wrapper.cmake.in create mode 100644 overlays/openssl/vcpkg.json create mode 100644 overlays/openssl/windows/portfile.cmake create mode 100644 overlays/winflexbison/portfile.cmake create mode 100644 overlays/winflexbison/vcpkg.json create mode 100644 scripts/msys/compile_wrapper_consider_clang-cl.patch create mode 100644 vcpkg-configuration.json create mode 100644 vcpkg.json diff --git a/.github/workflows/prebuild-docker.yml b/.github/workflows/prebuild-docker.yml new file mode 100644 index 00000000000000..3062754e558b33 --- /dev/null +++ b/.github/workflows/prebuild-docker.yml @@ -0,0 +1,50 @@ +name: Refresh docker NuGet cache + +on: + push: + tags: + - "*" + branches: + - "hpcc-platform-8.10.x" + + workflow_call: + inputs: + branch: + description: "The branch to build" + required: true + type: string + + workflow_dispatch: + +jobs: + build-images: + strategy: + matrix: + image: + [ + "ubuntu-hpcc", + "ubuntu-20.04", + "ubuntu-22.04", + "centos-7", + "centos-8", + ] + fail-fast: false + + name: "Docker: ${{ matrix.image }}" + runs-on: ubuntu-latest + steps: + - name: Check out source code + uses: actions/checkout@v3 + with: + ref: ${{ inputs.branch || github.ref }} + + - name: "Build dockerfile" + shell: "bash" + run: | + GITHUB_REF=$(git ls-remote https://github.com/${{ github.actor }}/vcpkg ${{ inputs.branch || github.ref }} | cut -f 1) + docker build --pull --rm -f "dockerfiles/${{ matrix.image }}.dockerfile" -t vcpkg-${{ matrix.image }}:$GITHUB_REF \ + --build-arg GITHUB_OWNER=${{ github.actor }} \ + --build-arg GITHUB_REF=$GITHUB_REF \ + --build-arg GITHUB_ACTOR=${{ github.actor }} \ + --build-arg GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} \ + "./dockerfiles" diff --git a/.github/workflows/prebuild-gh_envs.yml b/.github/workflows/prebuild-gh_envs.yml new file mode 100644 index 00000000000000..e3c2da3705592a --- /dev/null +++ b/.github/workflows/prebuild-gh_envs.yml @@ -0,0 +1,152 @@ +name: Refresh GH environments NuGet cache + +env: + VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite" + +on: + push: + branches: + - "hpcc-platform-8.10.x" + + workflow_call: + inputs: + branch: + description: "The branch to build" + required: true + type: string + + workflow_dispatch: + +jobs: + build: + strategy: + matrix: + label: + [ + "ubuntu-20.04-x64", + "ubuntu-22.04-x64", + "windows-2019-x64", + "windows-2019-x86", + "windows-2022-x64", + "windows-2022-x86", + "macos-11-x64", + "macos-12-x64", + ] + include: + - label: "ubuntu-20.04-x64" + os: "ubuntu-20.04" + triplet: "x64-linux" + mono: "mono" + sudo: "sudo" + - label: "ubuntu-22.04-x64" + os: "ubuntu-22.04" + triplet: "x64-linux" + mono: "mono" + sudo: "sudo" + - label: "windows-2019-x64" + os: "windows-2019" + triplet: "x64-windows" + mono: "" + sudo: "" + - label: "windows-2019-x86" + os: "windows-2019" + triplet: "x86-windows" + mono: "" + sudo: "" + - label: "windows-2022-x64" + os: "windows-2022" + triplet: "x64-windows" + mono: "" + sudo: "" + - label: "windows-2022-x86" + os: "windows-2022" + triplet: "x86-windows" + mono: "" + sudo: "" + - label: "macos-11-x64" + os: "macos-11" + triplet: "x64-osx" + mono: "mono" + sudo: "sudo" + - label: "macos-12-x64" + os: "macos-12" + triplet: "x64-osx" + mono: "mono" + sudo: "sudo" + fail-fast: false + + name: "GH Environment - ${{ matrix.label }}" + runs-on: ${{ matrix.os }} + steps: + - name: Ubuntu Dependencies + if: ${{ matrix.os == 'ubuntu-20.04' || matrix.os == 'ubuntu-22.04' }} + shell: "bash" + run: | + sudo apt-get update -y + sudo apt-get install -yq --no-install-recommends \ + automake \ + autotools-dev \ + binutils-dev \ + build-essential \ + libtool \ + pkg-config + + - name: Ubuntu Mono Dependencies + if: ${{ matrix.os == 'ubuntu-22.04' }} + shell: "bash" + run: | + sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF + echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list + sudo apt-get update -y + sudo apt-get -yq install -f mono-complete + + - name: OSX Dependencies + if: ${{ matrix.os == 'macos-11' || matrix.os == 'macos-12'}} + shell: "bash" + run: | + brew install pkg-config automake libtool + + - name: "Remove builtin vcpkg (old)" + working-directory: . + shell: "bash" + run: | + ${{ matrix.sudo }} rm -rf "$VCPKG_INSTALLATION_ROOT" + + - name: Check out source code + uses: actions/checkout@v3 + with: + fetch-depth: 0 + ref: ${{ inputs.branch || github.ref }} + + - name: "Bootstrap vcpkg" + working-directory: . + shell: "bash" + run: | + ./bootstrap-vcpkg.sh + + - name: "Setup NuGet Credentials" + working-directory: . + shell: "bash" + run: | + ${{ matrix.mono }} `./vcpkg fetch nuget | tail -n 1` \ + sources add \ + -source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" \ + -storepasswordincleartext \ + -name "GitHub" \ + -username "${{ github.repository_owner }}" \ + -password "${{ secrets.GITHUB_TOKEN }}" + ${{ matrix.mono }} `./vcpkg fetch nuget | tail -n 1` \ + setapikey "${{ secrets.GITHUB_TOKEN }}" \ + -source "https://nuget.pkg.github.com/${{ github.repository_owner }}/index.json" + + - name: "Update nuget (overlays)" + shell: "bash" + run: | + ./vcpkg install --x-abi-tools-use-exact-versions --overlay-ports=./overlays --keep-going --triplet ${{ matrix.triplet }} + + - name: Upload error logs + if: ${{ failure() || cancelled() }} + uses: actions/upload-artifact@v3 + with: + name: ${{ matrix.os }}-logs + path: ./**/*.log diff --git a/.github/workflows/untrustedPR.yml b/.github/workflows/untrustedPR.yml deleted file mode 100644 index 0fba0c32026b02..00000000000000 --- a/.github/workflows/untrustedPR.yml +++ /dev/null @@ -1,171 +0,0 @@ -name: Check For Common Mistakes - -on: - pull_request: - -jobs: - Check: - runs-on: ubuntu-22.04 - - steps: - - name: Checkout - uses: actions/checkout@v4 - with: - # fetch-depth 50 tries to ensure we capture the whole history of the branch - fetch-depth: 50 - - - name: Bootstrap - run: ./bootstrap-vcpkg.sh - - - name: Formatting - run: | - git config user.email github-actions - git config user.name github-actions@github.com - - git --version - - unset VCPKG_ROOT - - git diff --name-status --merge-base HEAD^ HEAD --diff-filter=MAR -- '*portfile.cmake' | sed 's/[MAR]\t*//' > .github-pr.changed-portfiles - if [ -s .github-pr.changed-portfiles ]; then (grep -n -H -E '(vcpkg_apply_patches|vcpkg_build_msbuild|vcpkg_extract_source_archive_ex)' $(cat .github-pr.changed-portfiles) || true) > .github-pr.deprecated-function; else touch .github-pr.deprecated-function; fi - if [ -s .github-pr.changed-portfiles ]; then (grep -n -H -E '(vcpkg_install_cmake|vcpkg_build_cmake|vcpkg_configure_cmake|vcpkg_fixup_cmake_targets)' $(cat .github-pr.changed-portfiles) || true) > .github-pr.deprecated-cmake; else touch .github-pr.deprecated-cmake; fi - git diff --name-status --merge-base HEAD^ HEAD --diff-filter=MAR -- '*vcpkg.json' | sed 's/[MAR]\t*//' > .github-pr.changed-manifest-files - cat .github-pr.changed-manifest-files | while read filename; do grep -q -E '"license": ' "$filename" || echo "$filename" || true; done > .github-pr.missing-license - cat .github-pr.changed-manifest-files | while read filename; do match=$(grep -oiP '"license": ".*\K(AGPL-1\.0|AGPL-3\.0|BSD-2-Clause-FreeBSD|BSD-2-Clause-NetBSD|bzip2-1\.0\.5|eCos-2\.0|GFDL-1\.1|GFDL-1\.2|GFDL-1\.3|GPL-1\.0|GPL-1\.0\+|GPL-2\.0|GPL-2\.0\+|GPL-2\.0-with-autoconf-exception|GPL-2\.0-with-bison-exception|GPL-2\.0-with-classpath-exception|GPL-2\.0-with-font-exception|GPL-2\.0-with-GCC-exception|GPL-3\.0|GPL-3\.0\+|GPL-3\.0-with-autoconf-exception|GPL-3\.0-with-GCC-exception|LGPL-2\.0|LGPL-2\.0\+|LGPL-2\.1|LGPL-2\.1\+|LGPL-3\.0|LGPL-3\.0\+|Nunit|StandardML-NJ|wxWindows)(?=[ "])' "$filename" || true); if [ ! -z "$match" ]; then echo "$filename (has deprecated license \"$match\")" ; fi ; done > .github-pr.deprecated-license - ./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 | grep 'instead of "version-string"' | tee .github-pr.version-string.out || true - git checkout -- versions - ./vcpkg x-add-version --all --skip-formatting-check --skip-version-format-check | tee .github-pr.x-add-version.out || true - git diff > .github-pr.x-add-version.diff - git reset HEAD~ --mixed - - - name: Generate Reply - uses: actions/github-script@v7 - 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 version_string_out = (await fs.readFile('.github-pr.version-string.out', 'utf8')).trim() - const format = (await fs.readFile('.github-pr.format-manifest', 'utf8')).trim() - const deprecated_function = (await fs.readFile('.github-pr.deprecated-function', 'utf8')).split('\n').filter(s => s.length > 0) - const deprecated_cmake = (await fs.readFile('.github-pr.deprecated-cmake', 'utf8')).split('\n').filter(s => s.length > 0) - const missing_license = (await fs.readFile('.github-pr.missing-license', 'utf8')).trim() - const deprecated_license = (await fs.readFile('.github-pr.deprecated-license', 'utf8')).trim() - - let approve = true; - if (format !== "") { - var format_output = ''; - format_output += "All vcpkg.json files must be formatted. To fix this problem, run:\n"; - format_output += "./vcpkg format-manifest ports/*/vcpkg.json\n"; - format_output += "\n"; - format_output += "It should make the following changes:"; - format_output += "```diff\n" + format + "\n```"; - core.error(format_output); - approve = false; - } - if (add_version_out !== "") { - var add_version_output = ''; - add_version_output += "PRs must add only one version, and must not modify any published versions.\n"; - add_version_output += "When making any changes to a library, the version or port-version in vcpkg.json must be modified, and the version database updated.\n"; - add_version_output += "Making the following changes will fix this problem:"; - add_version_output += "```diff\n" + add_version_out + "\n```"; - core.error(add_version_output); - approve = false; - } - if (version_string_out !== "") { - core.warning(version_string_out); - } - if (add_version !== "") { - var update_version_db_output = ''; - update_version_db_output += "After committing all other changes, the version database must be updated.\n"; - update_version_db_output += "This can be done by running the following commands after committing your changes:\n" - update_version_db_output += "\n" - update_version_db_output += "git add -u && git commit\n" - update_version_db_output += "git checkout ${{ github.event.pull_request.base.sha }} -- versions\n" - update_version_db_output += "./vcpkg x-add-version --all" - core.error(update_version_db_output); - approve = false; - } - - if (deprecated_function.length > 0) { - var deprecated_output = ''; - deprecated_output += "**You have modified or added at least one portfile where deprecated functions are used**\n" - deprecated_output += "If you feel able to do so, please consider migrating them to the new functions.\n"; - core.warning(deprecated_output); - - let deprecated_functions = { - vcpkg_extract_source_archive_ex: 'vcpkg_extract_source_archive https://learn.microsoft.com/en-us/vcpkg/maintainers/functions/vcpkg_extract_source_archive', - vcpkg_build_msbuild: 'vcpkg_install_msbuild https://learn.microsoft.com/en-us/vcpkg/maintainers/functions/vcpkg_install_msbuild', - vcpkg_apply_patches: 'the PATCHES arguments to the \"extract\" helpers (for example, vcpkg_from_github() (https://learn.microsoft.com/en-us/vcpkg/maintainers/functions/vcpkg_from_github))', - }; - for (let line of deprecated_function) { - // line has the format: :: 0) { - var deprecated_output = ''; - deprecated_output += "You have modified or added at least one portfile where deprecated functions are used.\n" - deprecated_output += "These functions have been forbidden in vcpkg, please migrating them to the new functions.\n"; - deprecated_output += "In the ports that use the new function vcpkg_cmake_configure, vcpkg_cmake_install, vcpkg_cmake_build or vcpkg_cmake_config_fixup, you have to add the corresponding dependencies:\n"; - deprecated_output += "```json\n"; - deprecated_output += '{\n "name": "vcpkg-cmake",\n "host": true\n},\n' - deprecated_output += '{\n "name": "vcpkg-cmake-config",\n "host": true\n}\n'; - deprecated_output += "```\n"; - core.error(deprecated_output); - - let deprecated_functions = { - vcpkg_install_cmake: 'vcpkg_cmake_install (from port vcpkg-cmake)', - vcpkg_install_cmake: 'vcpkg_cmake_install (from port vcpkg-cmake)', - vcpkg_build_cmake: 'vcpkg_cmake_build (from port vcpkg-cmake)', - vcpkg_configure_cmake: 'vcpkg_cmake_configure (Please remove the option PREFER_NINJA) (from port vcpkg-cmake)', - vcpkg_fixup_cmake_targets: 'vcpkg_cmake_config_fixup (from port vcpkg-cmake-config)', - }; - for (let line of deprecated_cmake) { - // line has the format: :: /dev/null && pwd 2> /dev/null; )"; + +export $(grep -v '^#' $SCRIPT_DIR/../.env | xargs -d '\r' | xargs -d '\n') + +GITHUB_OWNER="${GITHUB_OWNER:-hpcc-systems}" +GITHUB_BRANCH="${GITHUB_BRANCH:-hpcc-platform-8.8.x}" +GITHUB_REF=$(git ls-remote https://github.com/$GITHUB_OWNER/vcpkg refs/heads/$GITHUB_BRANCH | cut -f 1) +GITHUB_ACTOR="${GITHUB_ACTOR:-hpcc-systems}" +GITHUB_TOKEN="${GITHUB_TOKEN:-none}" + +echo "$GITHUB_OWNER" +echo "$GITHUB_BRANCH" +echo "$GITHUB_REF" +echo "$GITHUB_ACTOR" +echo "$GITHUB_TOKEN" + +docker build --progress plain --pull --rm -f "$SCRIPT_DIR/centos-7.dockerfile" -t vcpkg-centos-7:$GITHUB_REF "$SCRIPT_DIR" \ + --build-arg GITHUB_OWNER=$GITHUB_OWNER \ + --build-arg GITHUB_REF=$GITHUB_REF \ + --build-arg GITHUB_ACTOR=$GITHUB_ACTOR \ + --build-arg GITHUB_TOKEN=$GITHUB_TOKEN + +docker build --progress plain --pull --rm -f "$SCRIPT_DIR/centos-8.dockerfile" -t vcpkg-centos-8:$GITHUB_REF "$SCRIPT_DIR" \ + --build-arg GITHUB_OWNER=$GITHUB_OWNER \ + --build-arg GITHUB_REF=$GITHUB_REF \ + --build-arg GITHUB_ACTOR=$GITHUB_ACTOR \ + --build-arg GITHUB_TOKEN=$GITHUB_TOKEN + +docker build --progress plain --pull --rm -f "$SCRIPT_DIR/ubuntu-hpcc.dockerfile" -t vcpkg--ubuntu-hpcc:$GITHUB_REF "$SCRIPT_DIR" \ + --build-arg GITHUB_OWNER=$GITHUB_OWNER \ + --build-arg GITHUB_REF=$GITHUB_REF \ + --build-arg GITHUB_ACTOR=$GITHUB_ACTOR \ + --build-arg GITHUB_TOKEN=$GITHUB_TOKEN + +docker build --progress plain --pull --rm -f "$SCRIPT_DIR/ubuntu-20.04.dockerfile" -t vcpkg-ubuntu-20.04:$GITHUB_REF "$SCRIPT_DIR" \ + --build-arg GITHUB_OWNER=$GITHUB_OWNER \ + --build-arg GITHUB_REF=$GITHUB_REF \ + --build-arg GITHUB_ACTOR=$GITHUB_ACTOR \ + --build-arg GITHUB_TOKEN=$GITHUB_TOKEN + +docker build --progress plain --pull --rm -f "$SCRIPT_DIR/ubuntu-22.04.dockerfile" -t vcpkg-ubuntu-22.04:$GITHUB_REF "$SCRIPT_DIR" \ + --build-arg GITHUB_OWNER=$GITHUB_OWNER \ + --build-arg GITHUB_REF=$GITHUB_REF \ + --build-arg GITHUB_ACTOR=$GITHUB_ACTOR \ + --build-arg GITHUB_TOKEN=$GITHUB_TOKEN diff --git a/dockerfiles/centos-7.dockerfile b/dockerfiles/centos-7.dockerfile new file mode 100644 index 00000000000000..705a71964e8466 --- /dev/null +++ b/dockerfiles/centos-7.dockerfile @@ -0,0 +1,76 @@ +FROM centos:centos7 AS BASE_OS + +# Build Tools - Mono --- +RUN yum update -y +RUN yum install -y yum-utils +RUN yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ +RUN yum clean all +RUN yum makecache +RUN rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" + +RUN yum -y install https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm + +RUN yum install -y mono-complete + +# Build Tools --- +RUN yum install -y git curl zip unzip tar python3 libtool autoconf automake +RUN yum group install -y "Development Tools" +RUN yum install -y centos-release-scl +RUN yum install -y devtoolset-9 + +RUN echo "source /opt/rh/devtoolset-9/enable" >> /etc/bashrc +SHELL ["/bin/bash", "--login", "-c"] + +RUN curl -o pkg-config-0.29.2.tar.gz https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz +RUN tar xvfz pkg-config-0.29.2.tar.gz +WORKDIR /pkg-config-0.29.2 +RUN ./configure --prefix=/usr/local/pkg_config/0_29_2 --with-internal-glib +RUN make +RUN make install +RUN ln -s /usr/local/pkg_config/0_29_2/bin/pkg-config /usr/local/bin/ +RUN mkdir /usr/local/share/aclocal +RUN ln -s /usr/local/pkg_config/0_29_2/share/aclocal/pkg.m4 /usr/local/share/aclocal/ +ENV LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH +ENV PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:$PKG_CONFIG_PATH +ENV ACLOCAL_PATH=/usr/local/share/aclocal:$ACLOCAL_PATH + +# Libraries --- + +WORKDIR /hpcc-dev/HPCC-Platform + +ARG GITHUB_OWNER=hpcc-systems +ARG GITHUB_REF=hpcc-platform-8.8.x +RUN git clone -n https://github.com/${GITHUB_OWNER}/vcpkg.git + +WORKDIR /hpcc-dev/HPCC-Platform/vcpkg +RUN git checkout ${GITHUB_REF} +RUN /hpcc-dev/HPCC-Platform/vcpkg/bootstrap-vcpkg.sh + +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,readwrite" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +ARG GITHUB_ACTOR=hpcc-systems +ARG GITHUB_TOKEN=none +RUN mono `./vcpkg fetch nuget | tail -n 1` \ + sources add \ + -name "GitHub" \ + -source "https://nuget.pkg.github.com/hpcc-systems/index.json" \ + -storepasswordincleartext \ + -username "${GITHUB_ACTOR}" \ + -password "${GITHUB_TOKEN}" +RUN mono `./vcpkg fetch nuget | tail -n 1` \ + setapikey "${GITHUB_TOKEN}" \ + -source "https://nuget.pkg.github.com/hpcc-systems/index.json" + +# vcpkg --- +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --clean-after-build \ + --overlay-ports=./overlays || echo " *** vcpkg install failed ***" + +# RUN mono `/hpcc-dev/HPCC-Platform/vcpkg/vcpkg fetch nuget | tail -n 1` \ +# sources remove \ +# -name "GitHub" + +# FROM centos:centos7 +# COPY --from=BASE_OS /hpcc-dev/build /hpcc-dev/build diff --git a/dockerfiles/centos-8.dockerfile b/dockerfiles/centos-8.dockerfile new file mode 100644 index 00000000000000..c8ebb3f5447ec1 --- /dev/null +++ b/dockerfiles/centos-8.dockerfile @@ -0,0 +1,64 @@ +FROM centos:centos8.4.2105 AS BASE_OS + +RUN cd /etc/yum.repos.d/ +RUN sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* +RUN sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* + +# Build Tools - Mono --- +RUN yum update -y +RUN yum install -y yum-utils +RUN yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ +RUN yum clean all +RUN yum makecache +RUN rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" +RUN dnf config-manager --add-repo https://download.mono-project.com/repo/centos8-stable.repo +RUN dnf install -y mono-complete + +# Build Tools --- +RUN yum install -y git curl zip unzip tar python3 libtool autoconf automake +RUN yum group install -y "Development Tools" +RUN dnf -y install gcc-toolset-9-gcc gcc-toolset-9-gcc-c++ + +RUN echo "source /opt/rh/gcc-toolset-9/enable" >> /etc/bashrc +SHELL ["/bin/bash", "--login", "-c"] + +# Libraries --- + +WORKDIR /hpcc-dev/HPCC-Platform + +ARG GITHUB_OWNER=hpcc-systems +ARG GITHUB_REF=hpcc-platform-8.8.x +RUN git clone -n https://github.com/${GITHUB_OWNER}/vcpkg.git + +WORKDIR /hpcc-dev/HPCC-Platform/vcpkg +RUN git checkout ${GITHUB_REF} +RUN /hpcc-dev/HPCC-Platform/vcpkg/bootstrap-vcpkg.sh + +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,readwrite" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +ARG GITHUB_ACTOR=hpcc-systems +ARG GITHUB_TOKEN=none +RUN mono `./vcpkg fetch nuget | tail -n 1` \ + sources add \ + -name "GitHub" \ + -source "https://nuget.pkg.github.com/hpcc-systems/index.json" \ + -storepasswordincleartext \ + -username "${GITHUB_ACTOR}" \ + -password "${GITHUB_TOKEN}" +RUN mono `./vcpkg fetch nuget | tail -n 1` \ + setapikey "${GITHUB_TOKEN}" \ + -source "https://nuget.pkg.github.com/hpcc-systems/index.json" + +# vcpkg --- +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --clean-after-build \ + --overlay-ports=./overlays || echo " *** vcpkg install failed ***" + +# RUN mono `/hpcc-dev/HPCC-Platform/vcpkg/vcpkg fetch nuget | tail -n 1` \ +# sources remove \ +# -name "GitHub" + +# FROM centos:centos8.4.2105 +# COPY --from=BASE_OS /hpcc-dev/build /hpcc-dev/build diff --git a/dockerfiles/ubuntu-18.04.dockerfile b/dockerfiles/ubuntu-18.04.dockerfile new file mode 100644 index 00000000000000..c6fefeee14e84e --- /dev/null +++ b/dockerfiles/ubuntu-18.04.dockerfile @@ -0,0 +1,57 @@ +FROM ubuntu:18.04 AS BASE_OS + +ENV DEBIAN_FRONTEND=noninteractive + +# Build Tools - Mono --- +RUN apt update +RUN apt install -y dirmngr gnupg apt-transport-https ca-certificates software-properties-common +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +RUN sh -c 'echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" > /etc/apt/sources.list.d/mono-official-stable.list' +RUN apt update +RUN apt install -y mono-complete + +# Build Tools --- +RUN apt install -y git curl zip unzip tar +RUN apt install -y build-essential autoconf libtool + +# Libraries --- +RUN apt install -y groff-base + +WORKDIR /hpcc-dev/HPCC-Platform + +ARG GITHUB_OWNER=hpcc-systems +ARG GITHUB_REF=hpcc-platform-8.8.x +RUN git clone -n https://github.com/${GITHUB_OWNER}/vcpkg.git + +WORKDIR /hpcc-dev/HPCC-Platform/vcpkg +RUN git checkout ${GITHUB_REF} +RUN /hpcc-dev/HPCC-Platform/vcpkg/bootstrap-vcpkg.sh + +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,readwrite" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +ARG GITHUB_ACTOR=hpcc-systems +ARG GITHUB_TOKEN=none +RUN mono `./vcpkg fetch nuget | tail -n 1` \ + sources add \ + -name "GitHub" \ + -source "https://nuget.pkg.github.com/hpcc-systems/index.json" \ + -storepasswordincleartext \ + -username "${GITHUB_ACTOR}" \ + -password "${GITHUB_TOKEN}" +RUN mono `./vcpkg fetch nuget | tail -n 1` \ + setapikey "${GITHUB_TOKEN}" \ + -source "https://nuget.pkg.github.com/hpcc-systems/index.json" + +# vcpkg --- +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --clean-after-build \ + --overlay-ports=./overlays || echo " *** vcpkg install failed ***" + +# RUN mono `/hpcc-dev/HPCC-Platform/vcpkg/vcpkg fetch nuget | tail -n 1` \ +# sources remove \ +# -name "GitHub" + +# FROM ubuntu:18.04 +# COPY --from=BASE_OS /hpcc-dev/build /hpcc-dev/build diff --git a/dockerfiles/ubuntu-20.04.dockerfile b/dockerfiles/ubuntu-20.04.dockerfile new file mode 100644 index 00000000000000..d1fc0163dcdaed --- /dev/null +++ b/dockerfiles/ubuntu-20.04.dockerfile @@ -0,0 +1,57 @@ +FROM ubuntu:20.04 AS BASE_OS + +ENV DEBIAN_FRONTEND=noninteractive + +# Build Tools - Mono --- +RUN apt update +RUN apt install -y dirmngr gnupg apt-transport-https ca-certificates software-properties-common +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +RUN sh -c 'echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" > /etc/apt/sources.list.d/mono-official-stable.list' +RUN apt update +RUN apt install -y mono-complete + +# Build Tools --- +RUN apt install -y git curl zip unzip tar +RUN apt install -y build-essential autoconf libtool + +# Libraries --- +RUN apt install -y groff-base + +WORKDIR /hpcc-dev/HPCC-Platform + +ARG GITHUB_OWNER=hpcc-systems +ARG GITHUB_REF=hpcc-platform-8.8.x +RUN git clone -n https://github.com/${GITHUB_OWNER}/vcpkg.git + +WORKDIR /hpcc-dev/HPCC-Platform/vcpkg +RUN git checkout ${GITHUB_REF} +RUN /hpcc-dev/HPCC-Platform/vcpkg/bootstrap-vcpkg.sh + +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,readwrite" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +ARG GITHUB_ACTOR=hpcc-systems +ARG GITHUB_TOKEN=none +RUN mono `./vcpkg fetch nuget | tail -n 1` \ + sources add \ + -name "GitHub" \ + -source "https://nuget.pkg.github.com/hpcc-systems/index.json" \ + -storepasswordincleartext \ + -username "${GITHUB_ACTOR}" \ + -password "${GITHUB_TOKEN}" +RUN mono `./vcpkg fetch nuget | tail -n 1` \ + setapikey "${GITHUB_TOKEN}" \ + -source "https://nuget.pkg.github.com/hpcc-systems/index.json" + +# vcpkg --- +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --clean-after-build \ + --overlay-ports=./overlays || echo " *** vcpkg install failed ***" + +# RUN mono `/hpcc-dev/HPCC-Platform/vcpkg/vcpkg fetch nuget | tail -n 1` \ +# sources remove \ +# -name "GitHub" + +# FROM ubuntu:20.04 +# COPY --from=BASE_OS /hpcc-dev/build /hpcc-dev/build diff --git a/dockerfiles/ubuntu-22.04.dockerfile b/dockerfiles/ubuntu-22.04.dockerfile new file mode 100644 index 00000000000000..f9a2d369f1f0ad --- /dev/null +++ b/dockerfiles/ubuntu-22.04.dockerfile @@ -0,0 +1,57 @@ +FROM ubuntu:22.04 AS BASE_OS + +ENV DEBIAN_FRONTEND=noninteractive + +# Build Tools - Mono --- +RUN apt update +RUN apt install -y dirmngr gnupg apt-transport-https ca-certificates software-properties-common +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +RUN sh -c 'echo "deb https://download.mono-project.com/repo/ubuntu stable-focal main" > /etc/apt/sources.list.d/mono-official-stable.list' +RUN apt update +RUN apt install -y mono-complete + +# Build Tools --- +RUN apt install -y git curl zip unzip tar +RUN apt install -y build-essential autoconf libtool + +# Libraries --- +RUN apt install -y groff-base + +WORKDIR /hpcc-dev/HPCC-Platform + +ARG GITHUB_OWNER=hpcc-systems +ARG GITHUB_REF=hpcc-platform-8.8.x +RUN git clone -n https://github.com/${GITHUB_OWNER}/vcpkg.git + +WORKDIR /hpcc-dev/HPCC-Platform/vcpkg +RUN git checkout ${GITHUB_REF} +RUN /hpcc-dev/HPCC-Platform/vcpkg/bootstrap-vcpkg.sh + +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,readwrite" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +ARG GITHUB_ACTOR=hpcc-systems +ARG GITHUB_TOKEN=none +RUN mono `./vcpkg fetch nuget | tail -n 1` \ + sources add \ + -name "GitHub" \ + -source "https://nuget.pkg.github.com/hpcc-systems/index.json" \ + -storepasswordincleartext \ + -username "${GITHUB_ACTOR}" \ + -password "${GITHUB_TOKEN}" +RUN mono `./vcpkg fetch nuget | tail -n 1` \ + setapikey "${GITHUB_TOKEN}" \ + -source "https://nuget.pkg.github.com/hpcc-systems/index.json" + +# vcpkg --- +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --clean-after-build \ + --overlay-ports=./overlays || echo " *** vcpkg install failed ***" + +# RUN mono `/hpcc-dev/HPCC-Platform/vcpkg/vcpkg fetch nuget | tail -n 1` \ +# sources remove \ +# -name "GitHub" + +# FROM ubuntu:22.04 +# COPY --from=BASE_OS /hpcc-dev/build /hpcc-dev/build diff --git a/dockerfiles/ubuntu-hpcc.dockerfile b/dockerfiles/ubuntu-hpcc.dockerfile new file mode 100644 index 00000000000000..cc41c217aac8f1 --- /dev/null +++ b/dockerfiles/ubuntu-hpcc.dockerfile @@ -0,0 +1,66 @@ +############################################################################## +# +# HPCC SYSTEMS software Copyright (C) 2022 HPCC Systems®. +# +# 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. +############################################################################## + +# Base container image that builds all HPCC platform components + +ARG BASE_VER=8.6 +ARG CR_USER=hpccsystems +ARG CR_REPO=docker.io +ARG CR_CONTAINER_NAME=platform-build-base +FROM ${CR_REPO}/${CR_USER}/${CR_CONTAINER_NAME}:${BASE_VER} + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update +RUN apt-get install -y dirmngr gnupg apt-transport-https ca-certificates software-properties-common + +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF +RUN apt-add-repository 'deb https://download.mono-project.com/repo/ubuntu stable-focal main' +RUN apt-get install -y mono-complete + +WORKDIR /hpcc-dev/HPCC-Platform + +ARG GITHUB_OWNER=hpcc-systems +ARG GITHUB_REF=hpcc-platform-8.8.x +RUN git clone -n https://github.com/${GITHUB_OWNER}/vcpkg.git + +WORKDIR /hpcc-dev/HPCC-Platform/vcpkg +RUN git checkout ${GITHUB_REF} +RUN /hpcc-dev/HPCC-Platform/vcpkg/bootstrap-vcpkg.sh + +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,readwrite" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +ARG GITHUB_ACTOR=hpcc-systems +ARG GITHUB_TOKEN=none +RUN mono `./vcpkg fetch nuget | tail -n 1` \ + sources add \ + -name "GitHub" \ + -source "https://nuget.pkg.github.com/hpcc-systems/index.json" \ + -storepasswordincleartext \ + -username "${GITHUB_ACTOR}" \ + -password "${GITHUB_TOKEN}" +RUN mono `./vcpkg fetch nuget | tail -n 1` \ + setapikey "${GITHUB_TOKEN}" \ + -source "https://nuget.pkg.github.com/hpcc-systems/index.json" + +# vcpkg --- +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --clean-after-build \ + --overlay-ports=./overlays || echo " *** vcpkg install failed ***" + diff --git a/overlays/apr/portfile.cmake b/overlays/apr/portfile.cmake new file mode 100644 index 00000000000000..c90db16c29915d --- /dev/null +++ b/overlays/apr/portfile.cmake @@ -0,0 +1,99 @@ + +set(VERSION 1.7.0) + +vcpkg_download_distfile(ARCHIVE + URLS "https://archive.apache.org/dist/apr/apr-${VERSION}.tar.bz2" + FILENAME "apr-${VERSION}.tar.bz2" + SHA512 3dc42d5caf17aab16f5c154080f020d5aed761e22db4c5f6506917f6bfd2bf8becfb40af919042bd4ce1077d5de74aa666f5edfba7f275efba78e8893c115148 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" +) + +if (VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + private-headers INSTALL_PRIVATE_H + ) + + vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DINSTALL_PDB=OFF + -DMIN_WINDOWS_VER=Windows7 + -DAPR_HAVE_IPV6=ON + -DAPR_INSTALL_PRIVATE_H=${INSTALL_PRIVATE_H} + ${FEATURE_OPTIONS} + ) + + vcpkg_cmake_install() + + # 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() + # 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}" + OPTIONS + "--prefix=${CURRENT_INSTALLED_DIR}" + "${CONFIGURE_PARAMETER_1}" + "${CONFIGURE_PARAMETER_2}" + "${CONFIGURE_PARAMETER_3}" + ) + + vcpkg_install_make() + + if(NOT VCPKG_BUILD_TYPE) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/apr-1.pc" + "-lapr-\${APR_MAJOR_VERSION}" "-lapr-1" + ) + endif() + + 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) + + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/apr-1-config" "\"${CURRENT_INSTALLED_DIR}\"" "`dirname $0`/../../..") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/apr-1-config" "APR_SOURCE_DIR=\"${SOURCE_PATH}\"" "") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin/apr-1-config" "APR_BUILD_DIR=\"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel\"" "") + + if(NOT VCPKG_BUILD_TYPE) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/apr-1-config" "\"${CURRENT_INSTALLED_DIR}/debug\"" "`dirname $0`/../../../..") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/apr-1-config" "APR_SOURCE_DIR=\"${SOURCE_PATH}\"" "") + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/${PORT}/debug/bin/apr-1-config" "APR_BUILD_DIR=\"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg\"" "") + endif() +endif() + +# Handle copyright +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/overlays/apr/vcpkg.json b/overlays/apr/vcpkg.json new file mode 100644 index 00000000000000..08e5c701fcca78 --- /dev/null +++ b/overlays/apr/vcpkg.json @@ -0,0 +1,21 @@ +{ + "name": "apr", + "version": "1.7.0", + "port-version": 8, + "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/", + "license": "Apache-2.0", + "supports": "!uwp", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true, + "platform": "windows" + } + ], + "features": { + "private-headers": { + "description": "Install non-standard files required for building Apache httpd" + } + } +} diff --git a/overlays/aws-crt-cpp/fix-cmake-target-path.patch b/overlays/aws-crt-cpp/fix-cmake-target-path.patch new file mode 100644 index 00000000000000..69158ef742fb2a --- /dev/null +++ b/overlays/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/overlays/aws-crt-cpp/fix-ios-build.patch b/overlays/aws-crt-cpp/fix-ios-build.patch new file mode 100644 index 00000000000000..62d68f3e1821bb --- /dev/null +++ b/overlays/aws-crt-cpp/fix-ios-build.patch @@ -0,0 +1,21 @@ +diff --git a/source/io/TlsOptions.cpp b/source/io/TlsOptions.cpp +--- a/source/io/TlsOptions.cpp (revision 9ef58ff20df19e613c91c5f761e381c763da6810) ++++ b/source/io/TlsOptions.cpp (date 1635309758483) +@@ -90,7 +90,7 @@ + return ctxOptions; + } + #endif /* !AWS_OS_IOS */ +-#if defined(AWS_OS_APPLE) ++#if defined(AWS_OS_MACOS) + TlsContextOptions TlsContextOptions::InitClientWithMtlsPkcs12( + const char *pkcs12Path, + const char *pkcs12Pwd, +@@ -111,7 +111,7 @@ + AWS_ASSERT(m_isInit); + return aws_tls_ctx_options_set_keychain_path(&m_options, &keychain_path) == 0; + } +-#endif /* AWS_OS_APPLE */ ++#endif /* AWS_OS_MACOS */ + + #ifdef _WIN32 + TlsContextOptions TlsContextOptions::InitClientWithMtlsSystemPath( diff --git a/overlays/aws-crt-cpp/no-werror.patch b/overlays/aws-crt-cpp/no-werror.patch new file mode 100644 index 00000000000000..524815982f4819 --- /dev/null +++ b/overlays/aws-crt-cpp/no-werror.patch @@ -0,0 +1,16 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index a1a7964..7a5b1a5 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -293,9 +293,9 @@ if (CMAKE_BUILD_TYPE STREQUAL "" OR CMAKE_BUILD_TYPE MATCHES Debug) + target_compile_definitions(${PROJECT_NAME} PRIVATE "-DDEBUG_BUILD") + #set extra warning flags for debug build + if (MSVC) +- target_compile_options(${PROJECT_NAME} PRIVATE /W4 /WX /wd4068) ++ target_compile_options(${PROJECT_NAME} PRIVATE /W4 /wd4068) + else () +- target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wno-long-long -pedantic -Werror) ++ target_compile_options(${PROJECT_NAME} PRIVATE -Wall -Wno-long-long -pedantic) + endif () + endif () + diff --git a/overlays/aws-crt-cpp/portfile.cmake b/overlays/aws-crt-cpp/portfile.cmake new file mode 100644 index 00000000000000..b710de5ab0da7f --- /dev/null +++ b/overlays/aws-crt-cpp/portfile.cmake @@ -0,0 +1,45 @@ +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 + fix-ios-build.patch + no-werror.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 + -DBUILD_TESTING=FALSE +) + +vcpkg_cmake_install() + +vcpkg_cmake_config_fixup(CONFIG_PATH lib/aws-crt-cpp/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-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/overlays/aws-crt-cpp/vcpkg.json b/overlays/aws-crt-cpp/vcpkg.json new file mode 100644 index 00000000000000..7498cdfab15c6e --- /dev/null +++ b/overlays/aws-crt-cpp/vcpkg.json @@ -0,0 +1,33 @@ +{ + "name": "aws-crt-cpp", + "version": "0.15.1", + "port-version": 4, + "description": "C++ wrapper around the aws-c-* libraries. Provides Cross-Platform Transport Protocols and SSL/TLS implementations for C++.", + "homepage": "https://github.com/awslabs/aws-crt-cpp", + "license": "Apache-2.0", + "supports": "!(windows & 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/overlays/aws-sdk-cpp/compute_build_only.cmake b/overlays/aws-sdk-cpp/compute_build_only.cmake new file mode 100644 index 00000000000000..05a4649c825646 --- /dev/null +++ b/overlays/aws-sdk-cpp/compute_build_only.cmake @@ -0,0 +1,835 @@ +# Automatically generated by generateFeatures.ps1 +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() +if("acm-pca" IN_LIST FEATURES) + list(APPEND BUILD_ONLY acm-pca) +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() +if("apigatewaymanagementapi" IN_LIST FEATURES) + list(APPEND BUILD_ONLY apigatewaymanagementapi) +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() +if("appsync" IN_LIST FEATURES) + list(APPEND BUILD_ONLY appsync) +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) + list(APPEND BUILD_ONLY AWSMigrationHub) +endif() +if("awstransfer" IN_LIST FEATURES) + list(APPEND BUILD_ONLY awstransfer) +endif() +if("backup" IN_LIST FEATURES) + list(APPEND BUILD_ONLY backup) +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() +if("ce" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ce) +endif() +if("chime" IN_LIST FEATURES) + list(APPEND BUILD_ONLY chime) +endif() +if("cloud9" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloud9) +endif() +if("clouddirectory" IN_LIST FEATURES) + list(APPEND BUILD_ONLY clouddirectory) +endif() +if("cloudformation" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudformation) +endif() +if("cloudfront" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudfront) +endif() +if("cloudhsm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudhsm) +endif() +if("cloudhsmv2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudhsmv2) +endif() +if("cloudsearch" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudsearch) +endif() +if("cloudsearchdomain" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cloudsearchdomain) +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() +if("codecommit" IN_LIST FEATURES) + list(APPEND BUILD_ONLY codecommit) +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() +if("cognito-idp" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cognito-idp) +endif() +if("cognito-sync" IN_LIST FEATURES) + list(APPEND BUILD_ONLY cognito-sync) +endif() +if("comprehend" IN_LIST FEATURES) + list(APPEND BUILD_ONLY comprehend) +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() +if("datasync" IN_LIST FEATURES) + list(APPEND BUILD_ONLY datasync) +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() +if("discovery" IN_LIST FEATURES) + list(APPEND BUILD_ONLY discovery) +endif() +if("dlm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dlm) +endif() +if("dms" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dms) +endif() +if("docdb" IN_LIST FEATURES) + list(APPEND BUILD_ONLY docdb) +endif() +if("ds" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ds) +endif() +if("dynamodb" IN_LIST FEATURES) + list(APPEND BUILD_ONLY dynamodb) +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() +if("elasticbeanstalk" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticbeanstalk) +endif() +if("elasticfilesystem" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticfilesystem) +endif() +if("elasticloadbalancing" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticloadbalancing) +endif() +if("elasticloadbalancingv2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticloadbalancingv2) +endif() +if("elasticmapreduce" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elasticmapreduce) +endif() +if("elastictranscoder" IN_LIST FEATURES) + list(APPEND BUILD_ONLY elastictranscoder) +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() +if("gamelift" IN_LIST FEATURES) + list(APPEND BUILD_ONLY gamelift) +endif() +if("glacier" IN_LIST FEATURES) + list(APPEND BUILD_ONLY glacier) +endif() +if("globalaccelerator" IN_LIST FEATURES) + list(APPEND BUILD_ONLY globalaccelerator) +endif() +if("glue" IN_LIST FEATURES) + list(APPEND BUILD_ONLY glue) +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() +if("inspector" IN_LIST FEATURES) + list(APPEND BUILD_ONLY inspector) +endif() +if("iot" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot) +endif() +if("iot-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot-data) +endif() +if("iot-jobs-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot-jobs-data) +endif() +if("iot1click-devices" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot1click-devices) +endif() +if("iot1click-projects" IN_LIST FEATURES) + list(APPEND BUILD_ONLY iot1click-projects) +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() +if("kinesis-video-archived-media" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesis-video-archived-media) +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() +if("kinesisanalyticsv2" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesisanalyticsv2) +endif() +if("kinesisvideo" IN_LIST FEATURES) + list(APPEND BUILD_ONLY kinesisvideo) +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() +if("lex" IN_LIST FEATURES) + list(APPEND BUILD_ONLY lex) +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() +if("marketplacecommerceanalytics" IN_LIST FEATURES) + list(APPEND BUILD_ONLY marketplacecommerceanalytics) +endif() +if("mediaconnect" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediaconnect) +endif() +if("mediaconvert" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediaconvert) +endif() +if("medialive" IN_LIST FEATURES) + list(APPEND BUILD_ONLY medialive) +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() +if("mediastore-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediastore-data) +endif() +if("mediatailor" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mediatailor) +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() +if("mobileanalytics" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mobileanalytics) +endif() +if("monitoring" IN_LIST FEATURES) + list(APPEND BUILD_ONLY monitoring) +endif() +if("mq" IN_LIST FEATURES) + list(APPEND BUILD_ONLY mq) +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() +if("opsworkscm" IN_LIST FEATURES) + list(APPEND BUILD_ONLY opsworkscm) +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() +if("pinpoint" IN_LIST FEATURES) + list(APPEND BUILD_ONLY pinpoint) +endif() +if("pinpoint-email" IN_LIST FEATURES) + list(APPEND BUILD_ONLY pinpoint-email) +endif() +if("polly" IN_LIST FEATURES) + list(APPEND BUILD_ONLY polly) +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() +if("quicksight" IN_LIST FEATURES) + list(APPEND BUILD_ONLY quicksight) +endif() +if("ram" IN_LIST FEATURES) + list(APPEND BUILD_ONLY ram) +endif() +if("rds" IN_LIST FEATURES) + list(APPEND BUILD_ONLY rds) +endif() +if("rds-data" IN_LIST FEATURES) + list(APPEND BUILD_ONLY rds-data) +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() +if("resource-groups" IN_LIST FEATURES) + list(APPEND BUILD_ONLY resource-groups) +endif() +if("resourcegroupstaggingapi" IN_LIST FEATURES) + list(APPEND BUILD_ONLY resourcegroupstaggingapi) +endif() +if("robomaker" IN_LIST FEATURES) + list(APPEND BUILD_ONLY robomaker) +endif() +if("route53" IN_LIST FEATURES) + list(APPEND BUILD_ONLY route53) +endif() +if("route53domains" IN_LIST FEATURES) + list(APPEND BUILD_ONLY route53domains) +endif() +if("route53resolver" IN_LIST FEATURES) + list(APPEND BUILD_ONLY route53resolver) +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() +if("secretsmanager" IN_LIST FEATURES) + list(APPEND BUILD_ONLY secretsmanager) +endif() +if("securityhub" IN_LIST FEATURES) + list(APPEND BUILD_ONLY securityhub) +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() +if("signer" IN_LIST FEATURES) + list(APPEND BUILD_ONLY signer) +endif() +if("sms" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sms) +endif() +if("sms-voice" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sms-voice) +endif() +if("snowball" IN_LIST FEATURES) + list(APPEND BUILD_ONLY snowball) +endif() +if("sns" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sns) +endif() +if("sqs" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sqs) +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() +if("storagegateway" IN_LIST FEATURES) + list(APPEND BUILD_ONLY storagegateway) +endif() +if("sts" IN_LIST FEATURES) + list(APPEND BUILD_ONLY sts) +endif() +if("support" IN_LIST FEATURES) + list(APPEND BUILD_ONLY support) +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() +if("translate" IN_LIST FEATURES) + list(APPEND BUILD_ONLY translate) +endif() +if("waf" IN_LIST FEATURES) + list(APPEND BUILD_ONLY waf) +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() +if("xray" IN_LIST FEATURES) + list(APPEND BUILD_ONLY xray) +endif() diff --git a/overlays/aws-sdk-cpp/fix-aws-root.patch b/overlays/aws-sdk-cpp/fix-aws-root.patch new file mode 100644 index 00000000000000..da4365ad72185e --- /dev/null +++ b/overlays/aws-sdk-cpp/fix-aws-root.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/AWSSDKConfig.cmake b/cmake/AWSSDKConfig.cmake +--- a/cmake/AWSSDKConfig.cmake (revision 2f90f9fd6c56460bd382243aa215fcddcb5883c8) ++++ b/cmake/AWSSDKConfig.cmake (date 1636913220527) +@@ -54,18 +54,14 @@ + string(REPLACE ";" "${AWS_MODULE_DIR};" SYSTEM_MODULE_PATH "${CMAKE_SYSTEM_PREFIX_PATH}${AWS_MODULE_DIR}") + list(APPEND CMAKE_MODULE_PATH ${AWS_MODULE_PATH} ${SYSTEM_MODULE_PATH}) + +-# On Windows, dlls are treated as runtime target and installed in bindir + if (WIN32 AND AWSSDK_INSTALL_AS_SHARED_LIBS) +- set(AWSSDK_INSTALL_LIBDIR "${AWSSDK_INSTALL_BINDIR}") + # If installed CMake scripts are associated with dll library, define USE_IMPORT_EXPORT for customers + add_definitions(-DUSE_IMPORT_EXPORT) + endif() + + + # Compute the default installation root relative to this file. +-# from prefix/lib/cmake/AWSSDK/xx.cmake to prefix + get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH) +-get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH) + get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH) + get_filename_component(AWSSDK_DEFAULT_ROOT_DIR "${AWSSDK_DEFAULT_ROOT_DIR}" PATH) + get_filename_component(AWS_NATIVE_SDK_ROOT "${CMAKE_CURRENT_SOURCE_DIR}" ABSOLUTE) diff --git a/overlays/aws-sdk-cpp/fix-openssl3.patch b/overlays/aws-sdk-cpp/fix-openssl3.patch new file mode 100644 index 00000000000000..bd79678924cfa8 --- /dev/null +++ b/overlays/aws-sdk-cpp/fix-openssl3.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/compiler_settings.cmake b/cmake/compiler_settings.cmake +index cae5b92248..1aa728b01c 100644 +--- a/cmake/compiler_settings.cmake ++++ b/cmake/compiler_settings.cmake +@@ -53,7 +53,7 @@ macro(set_gcc_flags) + endmacro() + + macro(set_gcc_warnings) +- list(APPEND AWS_COMPILER_WARNINGS "-Wall" "-Werror" "-pedantic" "-Wextra") ++ list(APPEND AWS_COMPILER_WARNINGS "-Wno-deprecated-declarations" "-Wall" "-Werror" "-pedantic" "-Wextra") + if(COMPILER_CLANG) + if(PLATFORM_ANDROID) + # when using clang with libc and API lower than 21 we need to include Android support headers and ignore the gnu-include-next warning. diff --git a/overlays/aws-sdk-cpp/generateFeatures.ps1 b/overlays/aws-sdk-cpp/generateFeatures.ps1 new file mode 100644 index 00000000000000..89265ddbd4cc2c --- /dev/null +++ b/overlays/aws-sdk-cpp/generateFeatures.ps1 @@ -0,0 +1,73 @@ +[CmdletBinding()] +param( + [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-* + +$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") + +function GetDescription($dir, $modulename) +{ + if (Test-Path "$dir\CMakeLists.txt") + { + $descs = @(Select-String -Path "$dir\CMakeLists.txt" -Pattern "`"C\+\+ SDK for the AWS [^`"]*`"") + if ($descs.count -eq 1) { + $desc = $descs[0].Matches.Value -replace "`"","" + "$desc" + } + else { "C++ SDK for the AWS $modulename service" } + } + else { "C++ SDK for the AWS $modulename service" } +} + +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() + + $manifest.features.Add("$lowermodulename", @{ description=(GetDescription $subfolder $modulename) }) + + $cmakefragmenttext += @( + "if(`"$lowermodulename`" IN_LIST FEATURES)", + " list(APPEND BUILD_ONLY $modulename)", + "endif()" + ) +} + +[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/overlays/aws-sdk-cpp/lock-curl-http-and-tls-settings.patch b/overlays/aws-sdk-cpp/lock-curl-http-and-tls-settings.patch new file mode 100644 index 00000000000000..04a08b6bc802ac --- /dev/null +++ b/overlays/aws-sdk-cpp/lock-curl-http-and-tls-settings.patch @@ -0,0 +1,20 @@ +diff --git a/aws-cpp-sdk-core/CMakeLists.txt b/aws-cpp-sdk-core/CMakeLists.txt +index c44546b0e..b66888362 100644 +--- a/aws-cpp-sdk-core/CMakeLists.txt ++++ b/aws-cpp-sdk-core/CMakeLists.txt +@@ -113,13 +113,8 @@ if(ENABLE_CURL_CLIENT) + int main() { + CURL* handle = curl_easy_init(); + return curl_easy_setopt(handle, CURLOPT_PROXY_SSLCERT, \"client.pem\"); }") +- if (CMAKE_CROSSCOMPILING) +- check_c_source_compiles("${CHECK_CURL_HAS_H2}" CURL_HAS_H2) +- check_c_source_compiles("${CHECK_CURL_HAS_TLS_PROXY}" CURL_HAS_TLS_PROXY) +- else() +- check_c_source_runs("${CHECK_CURL_HAS_H2}" CURL_HAS_H2) +- check_c_source_runs("${CHECK_CURL_HAS_TLS_PROXY}" CURL_HAS_TLS_PROXY) +- endif() ++ set(CURL_HAS_H2 OFF) ++ set(CURL_HAS_TLS_PROXY ON) + elseif(ENABLE_WINDOWS_CLIENT) + # NOTE: HTTP/2 is not supported when using IXML_HTTP_REQUEST_2 + if(USE_IXML_HTTP_REQUEST_2) diff --git a/overlays/aws-sdk-cpp/patch-relocatable-rpath.patch b/overlays/aws-sdk-cpp/patch-relocatable-rpath.patch new file mode 100644 index 00000000000000..828647cc4365ce --- /dev/null +++ b/overlays/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/overlays/aws-sdk-cpp/portfile.cmake b/overlays/aws-sdk-cpp/portfile.cmake new file mode 100644 index 00000000000000..9ce6c6eaec65a8 --- /dev/null +++ b/overlays/aws-sdk-cpp/portfile.cmake @@ -0,0 +1,101 @@ +vcpkg_buildpath_length_warning(37) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO aws/aws-sdk-cpp + REF a72b841c91bd421fbb6deb516400b51c06bc596c # 1.9.220 + SHA512 9b7fa80ee155fa3c15e3e86c30b75c6019dc1672df711c4f656133fe005f104e4a30f5a99f1c0a0c6dab42007b5695169cd312bd0938b272c4c7b05765ce3421 + PATCHES + patch-relocatable-rpath.patch + fix-aws-root.patch + fix-openssl3.patch + lock-curl-http-and-tls-settings.patch +) + +string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "dynamic" FORCE_SHARED_CRT) + +set(EXTRA_ARGS) +if(VCPKG_TARGET_IS_OSX OR VCPKG_TARGET_IS_IOS) + set(rpath "@loader_path") +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" + ) +else() + set(rpath "\$ORIGIN") +endif() + +set(BUILD_ONLY core) +include(${CMAKE_CURRENT_LIST_DIR}/compute_build_only.cmake) +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=${BUILD_ONLY}" + "-DBUILD_DEPS=OFF" + "-DBUILD_SHARED_LIBS=OFF" + "-DCMAKE_INSTALL_RPATH=${rpath}" + "-DCMAKE_MODULE_PATH=${CURRENT_INSTALLED_DIR}/share/aws-c-common" # use extra cmake files +) +vcpkg_cmake_install() + +foreach(TARGET IN LISTS BUILD_ONLY) + vcpkg_cmake_config_fixup(PACKAGE_NAME "aws-cpp-sdk-${TARGET}" CONFIG_PATH "lib/cmake/aws-cpp-sdk-${TARGET}" DO_NOT_DELETE_PARENT_CONFIG_PATH) +endforeach() +vcpkg_cmake_config_fixup(PACKAGE_NAME "AWSSDK" CONFIG_PATH "lib/cmake/AWSSDK") + +vcpkg_copy_pdbs() + +file(GLOB_RECURSE AWS_TARGETS "${CURRENT_PACKAGES_DIR}/share/*/*-targets-*.cmake") +foreach(AWS_TARGET IN LISTS AWS_TARGETS) + file(READ ${AWS_TARGET} _contents) + string(REGEX REPLACE + "bin\\/([A-Za-z0-9_.-]+\\.lib)" + "lib/\\1" + _contents "${_contents}") + file(WRITE ${AWS_TARGET} "${_contents}") +endforeach() + +file(GLOB AWS_CONFIGS "${CURRENT_PACKAGES_DIR}/share/*/aws-cpp-sdk-*-config.cmake") +list(FILTER AWS_CONFIGS EXCLUDE REGEX "aws-cpp-sdk-core-config\\.cmake\$") +foreach(AWS_CONFIG IN LISTS AWS_CONFIGS) + file(READ "${AWS_CONFIG}" _contents) + file(WRITE "${AWS_CONFIG}" "include(CMakeFindDependencyMacro)\nfind_dependency(aws-cpp-sdk-core)\n${_contents}") +endforeach() + +file(REMOVE_RECURSE + "${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) + file(GLOB LIB_FILES ${CURRENT_PACKAGES_DIR}/bin/*.lib) + if(LIB_FILES) + file(COPY ${LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/lib) + file(REMOVE ${LIB_FILES}) + endif() + file(GLOB DEBUG_LIB_FILES ${CURRENT_PACKAGES_DIR}/debug/bin/*.lib) + if(DEBUG_LIB_FILES) + file(COPY ${DEBUG_LIB_FILES} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + 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") +endif() + +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/overlays/aws-sdk-cpp/usage b/overlays/aws-sdk-cpp/usage new file mode 100644 index 00000000000000..c526d2c456125d --- /dev/null +++ b/overlays/aws-sdk-cpp/usage @@ -0,0 +1,12 @@ +The package @PORT@:@TARGET_TRIPLET@ provides CMake targets: + + When using AWSSDK, AWSSDK_ROOT_DIR must be defined by the user. + 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}) + + OR + + find_package(aws-cpp-sdk-core REQUIRED) + target_include_directories(main PRIVATE aws-cpp-sdk-core) + target_link_libraries(main PRIVATE aws-cpp-sdk-core) diff --git a/overlays/aws-sdk-cpp/vcpkg.json b/overlays/aws-sdk-cpp/vcpkg.json new file mode 100644 index 00000000000000..2dd3ce897d3b23 --- /dev/null +++ b/overlays/aws-sdk-cpp/vcpkg.json @@ -0,0 +1,874 @@ +{ + "$note": "Automatically generated by generateFeatures.ps1", + "name": "aws-sdk-cpp", + "version": "1.9.220", + "port-version": 2, + "description": "AWS SDK for C++", + "homepage": "https://github.com/aws/aws-sdk-cpp", + "supports": "!(windows & arm) & !uwp", + "dependencies": [ + "aws-crt-cpp", + { + "name": "curl", + "default-features": false, + "features": [ + "ssl" + ], + "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/overlays/cpp-driver/cmake/Dependencies.cmake b/overlays/cpp-driver/cmake/Dependencies.cmake new file mode 100644 index 00000000000000..ea1491ad231152 --- /dev/null +++ b/overlays/cpp-driver/cmake/Dependencies.cmake @@ -0,0 +1,141 @@ +# ------------------------ +# Windows libraries +# ------------------------ + +if(WIN32) + # Assign additional library requirements for Windows + set(CASS_LIBS ${CASS_LIBS} iphlpapi psapi wsock32 crypt32 ws2_32 userenv version) +endif() + +# ------------------------ +# Libuv +# ------------------------ +find_package(unofficial-libuv CONFIG REQUIRED) + +# Assign libuv include and libraries +# set(CASS_INCLUDES ${CASS_INCLUDES} ${LIBUV_INCLUDE_DIRS}) +set(CASS_LIBS ${CASS_LIBS} unofficial::libuv::libuv) + +# libuv and gtests require thread library +if(NOT WIN32) + set(CMAKE_THREAD_PREFER_PTHREAD 1) + set(THREADS_PREFER_PTHREAD_FLAG 1) +endif() + +find_package(Threads REQUIRED) + +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_THREAD_LIBS_INIT}") +set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${CMAKE_THREAD_LIBS_INIT}") +if(NOT WIN32 AND ${CMAKE_VERSION} VERSION_LESS "3.1.0") + # FindThreads in CMake versions < v3.1.0 do not have the THREADS_PREFER_PTHREAD_FLAG to prefer -pthread + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pthread") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pthread") +endif() + +#------------------------ +# OpenSSL +#------------------------ + +if(CASS_USE_OPENSSL) + if(NOT WIN32) + set(_OPENSSL_ROOT_PATHS "${PROJECT_SOURCE_DIR}/lib/openssl/") + set(_OPENSSL_ROOT_HINTS ${OPENSSL_ROOT_DIR} $ENV{OPENSSL_ROOT_DIR}) + set(_OPENSSL_ROOT_HINTS_AND_PATHS + HINTS ${_OPENSSL_ROOT_HINTS} + PATHS ${_OPENSSL_ROOT_PATHS}) + else() + if(NOT DEFINED OPENSSL_ROOT_DIR) + # FindOpenSSL overrides _OPENSSL_ROOT_HINTS and _OPENSSL_ROOT_PATHS on Windows + # however it utilizes OPENSSL_ROOT_DIR when it sets these values + set(OPENSSL_ROOT_DIR "${PROJECT_SOURCE_DIR}/lib/openssl/" + "${PROJECT_SOURCE_DIR}/build/libs/openssl/") + endif() + endif() + + # Discover OpenSSL and assign OpenSSL include and libraries + if(WIN32 AND OPENSSL_VERSION) # Store the current version of OpenSSL to prevent corruption + set(SAVED_OPENSSL_VERSION ${OPENSSL_VERSION}) + endif() + find_package(OpenSSL) + if(WIN32 AND NOT OPENSSL_FOUND) + message(STATUS "Unable to Locate OpenSSL: Third party build step will be performed") + if(SAVED_OPENSSL_VERSION) + set(OPENSSL_VERSION ${SAVED_OPENSSL_VERSION}) + endif() + include(ExternalProject-OpenSSL) + elseif(NOT OPENSSL_FOUND) + message(FATAL_ERROR "Unable to Locate OpenSSL: Ensure OpenSSL is installed in order to build the driver") + else() + set(openssl_name "OpenSSL") + if(LIBRESSL_FOUND) + set(openssl_name "LibreSSL") + endif() + message(STATUS "${openssl_name} version: v${OPENSSL_VERSION}") + endif() + set(CASS_INCLUDES ${CASS_INCLUDES} ${OPENSSL_INCLUDE_DIR}) + set(CASS_LIBS ${CASS_LIBS} ${OPENSSL_LIBRARY_DIR}) +endif() + +#------------------------ +# ZLIB +#------------------------ + +find_package(ZLIB REQUIRED) + +# Assign zlib properties +set(CASS_INCLUDES ${CASS_INCLUDES} ${ZLIB_INCLUDE_DIRS}) +set(CASS_LIBS ${CASS_LIBS} ${ZLIB_LIBRARIES}) + +#------------------------ +# Kerberos +#------------------------ + +if(CASS_USE_KERBEROS) + # Discover Kerberos and assign Kerberos include and libraries + find_package(Kerberos REQUIRED) + set(CASS_INCLUDES ${CASS_INCLUDES} ${KERBEROS_INCLUDE_DIR}) + set(CASS_LIBS ${CASS_LIBS} ${KERBEROS_LIBRARIES}) +endif() + +#------------------------ +# Boost +#------------------------ + +if(CASS_USE_BOOST_ATOMIC) + # Allow for boost directory to be specified on the command line + if(NOT DEFINED ENV{BOOST_ROOT}) + if(EXISTS "${PROJECT_SOURCE_DIR}/lib/boost/") + set(ENV{BOOST_ROOT} "${PROJECT_SOURCE_DIR}/lib/boost/") + elseif(EXISTS "${PROJECT_SOURCE_DIR}/build/libs/boost/") + set(ENV{BOOST_ROOT} "${PROJECT_SOURCE_DIR}/build/libs/boost/") + endif() + endif() + if(BOOST_ROOT_DIR) + if(EXISTS ${BOOST_ROOT_DIR}) + set(ENV{BOOST_ROOT} ${BOOST_ROOT_DIR}) + endif() + endif() + + # Ensure Boost auto linking is disabled (defaults to auto linking on Windows) + if(WIN32) + add_definitions(-DBOOST_ALL_NO_LIB) + endif() + + # Check for general Boost availability + find_package(Boost ${CASS_MINIMUM_BOOST_VERSION}) + if(CASS_USE_BOOST_ATOMIC) + if(NOT Boost_INCLUDE_DIRS) + message(FATAL_ERROR "Boost headers required to build driver because of -DCASS_USE_BOOST_ATOMIC=On") + endif() + + # Assign Boost include for atomics + set(CASS_INCLUDES ${CASS_INCLUDES} ${Boost_INCLUDE_DIRS}) + endif() + + # Determine if additional Boost definitions are required for driver/executables + if(NOT WIN32) + # Handle explicit initialization warning in atomic/details/casts + add_definitions(-Wno-missing-field-initializers) + endif() +endif() + diff --git a/overlays/cpp-driver/portfile.cmake b/overlays/cpp-driver/portfile.cmake new file mode 100644 index 00000000000000..5112e556f773a0 --- /dev/null +++ b/overlays/cpp-driver/portfile.cmake @@ -0,0 +1,56 @@ +# 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} +# 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 + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO datastax/cpp-driver + REF 2.16.2 + SHA512 6dee9ceaafa1a86bacd54759931d6cf794c50cb2e0944a568b2e36f04f4151d816f7d041ef17d70b1d0133497ec25f8f975c166b4fc6f882df23d0725bb0e28a + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/cmake/Dependencies.cmake DESTINATION ${SOURCE_PATH}/cmake) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + + OPTIONS + -DCASS_BUILD_SHARED=OFF + -DCASS_BUILD_STATIC=ON + -DCASS_INSTALL_HEADER_IN_SUBDIR=OFF +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/cpp-driver" RENAME copyright) diff --git a/overlays/cpp-driver/vcpkg.json b/overlays/cpp-driver/vcpkg.json new file mode 100644 index 00000000000000..427ce268e08cf2 --- /dev/null +++ b/overlays/cpp-driver/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "cpp-driver", + "version-semver": "2.16.2", + "homepage": "https://github.com/datastax/cpp-driver", + "description": "DataStax C/C++ Driver for Apache Cassandra® and DataStax Products.", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + "libuv", + "openssl", + "zlib" + ] +} \ No newline at end of file diff --git a/overlays/elasticlient/portfile.cmake b/overlays/elasticlient/portfile.cmake new file mode 100644 index 00000000000000..be772d9668a0cc --- /dev/null +++ b/overlays/elasticlient/portfile.cmake @@ -0,0 +1,24 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO seznam/elasticlient + REF d68e30e382b5f2817be8cd901494736b26d4896e + SHA512 703b13cfd4346de934ace6d62e2bd5d0bfec3c06c1061b842c1477ce260a816ec8a128b337c91a1cf4e79aca7c73d28d591c56d4c725ee3b77a7cb1c2bee4663 + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + + OPTIONS + -DBUILD_ELASTICLIENT_TESTS=0 + -DBUILD_ELASTICLIENT_EXAMPLE=0 + -DUSE_SYSTEM_JSONCPP=1 + -DUSE_SYSTEM_CPR=1 + -DBUILD_SHARED_LIBS=OFF +) + +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") + +file(INSTALL "${SOURCE_PATH}/LICENSE.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/elasticlient" RENAME copyright) diff --git a/overlays/elasticlient/vcpkg.json b/overlays/elasticlient/vcpkg.json new file mode 100644 index 00000000000000..0dd84212f160b8 --- /dev/null +++ b/overlays/elasticlient/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "elasticlient", + "version-semver": "0.2.1", + "homepage": "https://github.com/seznam/elasticlient", + "description": "C++ elasticlient library is simple library for simplified work with Elasticsearch in C++. The library is based on C++ Requests: Curl for People.", + "supports": "!windows", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + "jsoncpp", + "cpr" + ] +} \ No newline at end of file diff --git a/overlays/icu/disable-escapestr-tool.patch b/overlays/icu/disable-escapestr-tool.patch new file mode 100644 index 00000000000000..620fcde2a8e588 --- /dev/null +++ b/overlays/icu/disable-escapestr-tool.patch @@ -0,0 +1,17 @@ +diff --git a/source/tools/Makefile.in b/source/tools/Makefile.in +index c3f81d6..dc41af3 100644 +--- a/source/tools/Makefile.in ++++ b/source/tools/Makefile.in +@@ -19,9 +19,9 @@ SUBDIRS = toolutil ctestfw makeconv genrb genbrk \ + gencnval gensprep icuinfo genccode gencmn icupkg pkgdata \ + gentest gennorm2 gencfu gendict + +-ifneq (@platform_make_fragment_name@,mh-cygwin-msvc) +-SUBDIRS += escapesrc +-endif ++#ifneq (@platform_make_fragment_name@,mh-cygwin-msvc) ++#SUBDIRS += escapesrc ++#endif + + ## List of phony targets + .PHONY : all all-local all-recursive install install-local \ diff --git a/overlays/icu/disable-static-prefix.patch b/overlays/icu/disable-static-prefix.patch new file mode 100644 index 00000000000000..4e63e3375b1a27 --- /dev/null +++ b/overlays/icu/disable-static-prefix.patch @@ -0,0 +1,20 @@ +diff --git a/source/icudefs.mk.in b/source/icudefs.mk.in +index 24bd97a..33169de 100644 +--- a/source/icudefs.mk.in ++++ b/source/icudefs.mk.in +@@ -213,13 +213,13 @@ LIBICU = $(LIBPREFIX)$(ICUPREFIX) + + ## If we can't use the shared libraries, use the static libraries + ifneq ($(ENABLE_SHARED),YES) +-STATIC_PREFIX_WHEN_USED = s ++STATIC_PREFIX_WHEN_USED = + else + STATIC_PREFIX_WHEN_USED = + endif + + # Static library prefix and file extension +-STATIC_PREFIX = s ++STATIC_PREFIX = + LIBSICU = $(LIBPREFIX)$(STATIC_PREFIX)$(ICUPREFIX) + A = a + SOBJ = $(SO) diff --git a/overlays/icu/fix-extra.patch b/overlays/icu/fix-extra.patch new file mode 100644 index 00000000000000..ee0142cf3326a0 --- /dev/null +++ b/overlays/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/overlays/icu/fix-win-build.patch b/overlays/icu/fix-win-build.patch new file mode 100644 index 00000000000000..0c2e46cfb67b58 --- /dev/null +++ b/overlays/icu/fix-win-build.patch @@ -0,0 +1,35 @@ +diff --git a/source/configure.ac b/source/configure.ac +index 425fdc7..97210f8 100644 +--- a/source/configure.ac ++++ b/source/configure.ac +@@ -114,6 +114,15 @@ AC_ARG_ENABLE([icu-config], + esac], [enable_icu_config=true]) + AC_SUBST(INSTALL_ICU_CONFIG, [$enable_icu_config]) + ++AC_ARG_ENABLE([icu-build-win], ++ AS_HELP_STRING([--enable-icu-build-win], [install icu-build-win]), ++ [case "${enableval}" in ++ yes) enable_icu_build_win=true ;; ++ no) enable_icu_build_win=false ;; ++ *) AC_MSG_ERROR([bad value '${enableval}' for --enable-icu-build-win]) ;; ++ esac], [enable_icu_build_win=true]) ++AC_SUBST(INSTALL_ICU_BUILD_WIN, [$enable_icu_build_win]) ++ + # Check whether to build debug libraries + AC_MSG_CHECKING([whether to build debug libraries]) + enabled=no +@@ -263,12 +272,14 @@ ICU_CHECK_MH_FRAG + # Checks for libraries and other host specific stuff + # On HP/UX, don't link to -lm from a shared lib because it isn't + # PIC (at least on 10.2) ++if test "$enable_icu_build_win" = no; then + case "${host}" in + *-*-hpux*) AC_CHECK_LIB(m, floor, LIB_M="-lm") ;; + + *) AC_CHECK_LIB(m, floor) + LIB_M="" ;; + esac ++fi + AC_SUBST(LIB_M) + + # Check whether to build shared libraries diff --git a/overlays/icu/fix_parallel_build_on_windows.patch b/overlays/icu/fix_parallel_build_on_windows.patch new file mode 100644 index 00000000000000..6bd91094a1ffff --- /dev/null +++ b/overlays/icu/fix_parallel_build_on_windows.patch @@ -0,0 +1,25 @@ +diff --urN a/source/data/Makefile.in b/source/data/Makefile.in +--- a/source/data/Makefile.in ++++ b/source/data/Makefile.in +@@ -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 + +-PKGDATA_LIST = $(TMP_DIR)/icudata.lst + + + ##################################################### diff --git a/overlays/icu/mingw-dll-install.patch b/overlays/icu/mingw-dll-install.patch new file mode 100644 index 00000000000000..26c7783652f151 --- /dev/null +++ b/overlays/icu/mingw-dll-install.patch @@ -0,0 +1,13 @@ +diff --git a/source/config/mh-mingw64 b/source/config/mh-mingw64 +index fb64c56..a43cc4d 100644 +--- a/source/config/mh-mingw64 ++++ b/source/config/mh-mingw64 +@@ -10,7 +10,7 @@ + # On Windows we generally have the DLLs in the bin directory rather than the lib directory. + # This setting moves the ICU DLLs into the bin folder for MinGW/MSYS2 when "make install" is run. + # If you prefer to have the DLLs in the lib folder, then set this to NO instead. +-MINGW_MOVEDLLSTOBINDIR = YES ++MINGW_MOVEDLLSTOBINDIR = NO + + # This file is similar to mh-mingw + # Any changes made here may also need to be made in mh-mingw diff --git a/overlays/icu/portfile.cmake b/overlays/icu/portfile.cmake new file mode 100644 index 00000000000000..1724086d4430d2 --- /dev/null +++ b/overlays/icu/portfile.cmake @@ -0,0 +1,199 @@ +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 + disable-escapestr-tool.patch + remove-MD-from-configure.patch + fix_parallel_build_on_windows.patch + fix-extra.patch + mingw-dll-install.patch + disable-static-prefix.patch # https://gitlab.kitware.com/cmake/cmake/-/issues/16617; also mingw. + fix-win-build.patch +) + +vcpkg_find_acquire_program(PYTHON3) +set(ENV{PYTHON} "${PYTHON3}") + +if(VCPKG_TARGET_IS_WINDOWS) + list(APPEND CONFIGURE_OPTIONS --enable-icu-build-win) +endif() + +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(CMAKE_HOST_WIN32 AND VCPKG_TARGET_IS_MINGW AND NOT HOST_TRIPLET MATCHES "mingw") + # Assuming no cross compiling because the host (windows) pkgdata tool doesn't + # use the '/' path separator when creating compiler commands for mingw bash. +elseif(VCPKG_CROSSCOMPILING) + 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}" + AUTOCONFIG + 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() + +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") + # force U_STATIC_IMPLEMENTATION macro + foreach(HEADER utypes.h utf_old.h platform.h) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/unicode/${HEADER}" "defined(U_STATIC_IMPLEMENTATION)" "1") + 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) + +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/icu/bin/icu-config" "${CURRENT_INSTALLED_DIR}" "`dirname $0`/../../../") + +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/overlays/icu/remove-MD-from-configure.patch b/overlays/icu/remove-MD-from-configure.patch new file mode 100644 index 00000000000000..fe4782b3445b3d --- /dev/null +++ b/overlays/icu/remove-MD-from-configure.patch @@ -0,0 +1,18 @@ +diff -urN a/source/runConfigureICU b/source/runConfigureICU +--- a/source/runConfigureICU 2018-03-26 21:38:44.000000000 +0800 ++++ b/source/runConfigureICU 2018-08-26 09:04:53.197454400 +0800 +@@ -322,10 +322,10 @@ + THE_COMP="Microsoft Visual C++" + CC=cl; export CC + CXX=cl; export CXX +- RELEASE_CFLAGS='-Gy -MD' +- RELEASE_CXXFLAGS='-Gy -MD' +- DEBUG_CFLAGS='-FS -Zi -MDd' +- DEBUG_CXXFLAGS='-FS -Zi -MDd' ++ RELEASE_CFLAGS='-Gy' ++ RELEASE_CXXFLAGS='-Gy' ++ DEBUG_CFLAGS='-FS -Zi' ++ DEBUG_CXXFLAGS='-FS -Zi' + DEBUG_LDFLAGS='-DEBUG' + ;; + *BSD) diff --git a/overlays/icu/vcpkg-cmake-wrapper.cmake b/overlays/icu/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..b18642f40f3cb8 --- /dev/null +++ b/overlays/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/overlays/icu/vcpkg.json b/overlays/icu/vcpkg.json new file mode 100644 index 00000000000000..456560655e7775 --- /dev/null +++ b/overlays/icu/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "icu", + "version": "69.1", + "port-version": 18, + "description": "Mature and widely used Unicode and localization library.", + "homepage": "https://icu.unicode.org/home", + "supports": "!uwp", + "dependencies": [ + { + "name": "icu", + "host": true + } + ] +} diff --git a/overlays/libmysql/004-added-limits-include.patch b/overlays/libmysql/004-added-limits-include.patch new file mode 100644 index 00000000000000..d02641ad765328 --- /dev/null +++ b/overlays/libmysql/004-added-limits-include.patch @@ -0,0 +1,12 @@ +diff --git a/sql-common/sql_string.cc b/sql-common/sql_string.cc +index 40435729..8b6ee827 100644 +--- a/sql-common/sql_string.cc ++++ b/sql-common/sql_string.cc +@@ -23,6 +23,7 @@ + #include "sql_string.h" + + #include ++#include + + #include "my_dbug.h" + #include "my_macros.h" diff --git a/overlays/libmysql/export-cmake-targets.patch b/overlays/libmysql/export-cmake-targets.patch new file mode 100644 index 00000000000000..e52dbb24da71fd --- /dev/null +++ b/overlays/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/overlays/libmysql/ignore-boost-version.patch b/overlays/libmysql/ignore-boost-version.patch new file mode 100644 index 00000000000000..99cee245012ab5 --- /dev/null +++ b/overlays/libmysql/ignore-boost-version.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/boost.cmake b/cmake/boost.cmake +index 592a67f..202a770 100644 +--- a/cmake/boost.cmake ++++ b/cmake/boost.cmake +@@ -297,7 +297,7 @@ IF(NOT BOOST_MAJOR_VERSION EQUAL 10) + COULD_NOT_FIND_BOOST() + ENDIF() + +-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 70" + ) diff --git a/overlays/libmysql/openssl.patch b/overlays/libmysql/openssl.patch new file mode 100644 index 00000000000000..3abbcf98f17e8a --- /dev/null +++ b/overlays/libmysql/openssl.patch @@ -0,0 +1,125 @@ +diff --git a/mysys/my_md5.cc b/mysys/my_md5.cc +index dea997b252c..81484f0652b 100644 +--- a/mysys/my_md5.cc ++++ b/mysys/my_md5.cc +@@ -35,6 +35,10 @@ + #include + #include + ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++#include ++#endif ++ + static void my_md5_hash(unsigned char *digest, unsigned const char *buf, + int len) { + MD5_CTX ctx; +@@ -56,7 +60,11 @@ static void my_md5_hash(unsigned char *digest, unsigned const char *buf, + int compute_md5_hash(char *digest, const char *buf, int len) { + int retval = 0; + int fips_mode = 0; ++ #if OPENSSL_VERSION_NUMBER < 0x30000000L + fips_mode = FIPS_mode(); ++ #else ++ fips_mode = EVP_default_properties_is_fips_enabled(NULL); ++ #endif + /* If fips mode is ON/STRICT restricted method calls will result into abort, + * skipping call. */ + if (fips_mode == 0) { +diff --git a/plugin/x/client/xconnection_impl.cc b/plugin/x/client/xconnection_impl.cc +index 13bc6794ea5..8752bcea9bf 100644 +--- a/plugin/x/client/xconnection_impl.cc ++++ b/plugin/x/client/xconnection_impl.cc +@@ -51,6 +51,10 @@ + #include "plugin/x/src/config/config.h" + #include "sql-common/net_ns.h" + ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++#include ++#endif ++ + #ifndef WIN32 + #include + #include +@@ -524,12 +528,20 @@ int set_fips_mode(const uint32_t fips_mode, + if (fips_mode > 2) { + goto EXIT; + } ++ #if OPENSSL_VERSION_NUMBER < 0x30000000L + fips_mode_old = FIPS_mode(); ++ #else ++ fips_mode_old = EVP_default_properties_is_fips_enabled(NULL); ++ #endif + if (fips_mode_old == fips_mode) { + rc = 1; + goto EXIT; + } ++ #if OPENSSL_VERSION_NUMBER < 0x30000000L + if (!(rc = FIPS_mode_set(fips_mode))) { ++ #else ++ if (!(rc = EVP_default_properties_enable_fips(fips_mode))) { ++ #endif + err_library = ERR_get_error(); + ERR_error_string_n(err_library, err_string, OPENSSL_ERROR_LENGTH - 1); + err_string[OPENSSL_ERROR_LENGTH - 1] = '\0'; +diff --git a/vio/viosslfactories.cc b/vio/viosslfactories.cc +index 6c04029ccb0..164b727e3dc 100644 +--- a/vio/viosslfactories.cc ++++ b/vio/viosslfactories.cc +@@ -40,6 +40,10 @@ + + #include + ++#if OPENSSL_VERSION_NUMBER >= 0x30000000L ++#include ++#endif ++ + #if OPENSSL_VERSION_NUMBER < 0x10002000L + #include + #endif /* OPENSSL_VERSION_NUMBER < 0x10002000L */ +@@ -498,12 +502,20 @@ int set_fips_mode(const uint fips_mode, char err_string[OPENSSL_ERROR_LENGTH]) { + if (fips_mode > 2) { + goto EXIT; + } ++ #if OPENSSL_VERSION_NUMBER < 0x30000000L + fips_mode_old = FIPS_mode(); ++ #else ++ fips_mode_old = EVP_default_properties_is_fips_enabled(NULL); ++ #endif + if (fips_mode_old == fips_mode) { + rc = 1; + goto EXIT; + } ++ #if OPENSSL_VERSION_NUMBER < 0x30000000L + if (!(rc = FIPS_mode_set(fips_mode))) { ++ #else ++ if (!(rc = EVP_default_properties_enable_fips(NULL, fips_mode))) { ++ #endif + /* + If OS doesn't have FIPS enabled openssl library and user sets FIPS mode + ON, It fails with proper error. But in the same time it doesn't allow to +@@ -511,7 +523,11 @@ int set_fips_mode(const uint fips_mode, char err_string[OPENSSL_ERROR_LENGTH]) { + error, setting old working FIPS mode value in the OpenSSL library. It will + allow successful cryptographic operation and will not abort the server. + */ ++ #if OPENSSL_VERSION_NUMBER < 0x30000000L + FIPS_mode_set(fips_mode_old); ++ #else ++ EVP_default_properties_enable_fips(NULL, fips_mode_old); ++ #endif + err_library = ERR_get_error(); + ERR_error_string_n(err_library, err_string, OPENSSL_ERROR_LENGTH - 1); + err_string[OPENSSL_ERROR_LENGTH - 1] = '\0'; +@@ -525,7 +541,13 @@ EXIT: + + @returns openssl current fips mode + */ ++#if OPENSSL_VERSION_NUMBER < 0x30000000L + uint get_fips_mode() { return FIPS_mode(); } ++#else ++uint get_fips_mode() { ++ return EVP_default_properties_is_fips_enabled(NULL); ++} ++#endif + + long process_tls_version(const char *tls_version) { + const char *separator = ","; diff --git a/overlays/libmysql/portfile.cmake b/overlays/libmysql/portfile.cmake new file mode 100644 index 00000000000000..5e331113133827 --- /dev/null +++ b/overlays/libmysql/portfile.cmake @@ -0,0 +1,145 @@ +if (EXISTS "${CURRENT_INSTALLED_DIR}/include/mysql/mysql.h") + message(FATAL_ERROR "FATAL ERROR: ${PORT} and libmariadb are incompatible.") +endif() + +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() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO mysql/mysql-server + REF 7d10c82196c8e45554f27c00681474a9fb86d137 # 8.0.20 + SHA512 9f5e8cc254ea2a4cf76313287c7bb6fc693400810464dd2901e67d51ecb27f8916009464fd8aed8365c3038314b845b3d517db6e82ae5c7908612f0b3b72335f + HEAD_REF master + PATCHES + ignore-boost-version.patch + system-libs.patch + rename-version.patch + export-cmake-targets.patch + 004-added-limits-include.patch + openssl.patch +) + +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_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DWITHOUT_SERVER=ON + -DWITH_UNIT_TESTS=OFF + -DENABLED_PROFILING=OFF + -DENABLE_TESTING=OFF + -DWIX_DIR=OFF + ${STACK_DIRECTION} + -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_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_cmake_install(ADD_BIN_TO_PATH) + +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}/${PORT}") +file(RENAME "${CURRENT_PACKAGES_DIR}/debug/share" "${CURRENT_PACKAGES_DIR}/debug/${PORT}") +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/share") +file(MAKE_DIRECTORY "${CURRENT_PACKAGES_DIR}/debug/share") +file(RENAME "${CURRENT_PACKAGES_DIR}/${PORT}" "${CURRENT_PACKAGES_DIR}/share/${PORT}") +file(RENAME "${CURRENT_PACKAGES_DIR}/debug/${PORT}" "${CURRENT_PACKAGES_DIR}/debug/share/${PORT}") + +vcpkg_cmake_config_fixup(PACKAGE_NAME unofficial-libmysql CONFIG_PATH share/${PORT}/unofficial-libmysql) + +# switch mysql into /mysql +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/mysql") + +## delete useless vcruntime/scripts/bin/msg file +file(REMOVE_RECURSE + "${CURRENT_PACKAGES_DIR}/debug/include" + "${CURRENT_PACKAGES_DIR}/debug/share" + "${CURRENT_PACKAGES_DIR}/docs" + "${CURRENT_PACKAGES_DIR}/debug/docs" + "${CURRENT_PACKAGES_DIR}/lib/debug" + "${CURRENT_PACKAGES_DIR}/lib/plugin" + "${CURRENT_PACKAGES_DIR}/lib/plugin/debug" +) + +## remove misc files +file(REMOVE + "${CURRENT_PACKAGES_DIR}/LICENSE" + "${CURRENT_PACKAGES_DIR}/README" + "${CURRENT_PACKAGES_DIR}/debug/LICENSE" + "${CURRENT_PACKAGES_DIR}/debug/README" +) + +vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/mysql/mysql_com.h" "#include " "#include \"mysql/udf_registration_types.h\"") +if (NOT VCPKG_TARGET_IS_WINDOWS) + vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/tools/libmysql/mysql_config" "${CURRENT_PACKAGES_DIR}" "`dirname $0`/../..") +endif() + +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(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/overlays/libmysql/rename-version.patch b/overlays/libmysql/rename-version.patch new file mode 100644 index 00000000000000..15598382570e36 --- /dev/null +++ b/overlays/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/overlays/libmysql/system-libs.patch b/overlays/libmysql/system-libs.patch new file mode 100644 index 00000000000000..547573fc58e7ad --- /dev/null +++ b/overlays/libmysql/system-libs.patch @@ -0,0 +1,149 @@ +diff --git a/cmake/icu.cmake b/cmake/icu.cmake +index fde3a75..9f694b9 100644 +--- a/cmake/icu.cmake ++++ b/cmake/icu.cmake +@@ -38,49 +38,11 @@ + # install_root is either 'system' or is assumed to be a path. + # + MACRO (FIND_ICU install_root) +- IF("${install_root}" STREQUAL "system") +- SET(EXTRA_FIND_LIB_ARGS) +- SET(EXTRA_FIND_INC_ARGS) +- ELSE() +- SET(EXTRA_FIND_LIB_ARGS HINTS "${install_root}" +- PATH_SUFFIXES "lib" "lib64" NO_DEFAULT_PATH) +- SET(EXTRA_FIND_INC_ARGS HINTS "${install_root}" +- PATH_SUFFIXES "include" NO_DEFAULT_PATH) +- ENDIF() +- +- FIND_PATH(ICU_INCLUDE_DIR NAMES unicode/regex.h ${EXTRA_FIND_INC_ARGS}) +- IF (NOT ICU_INCLUDE_DIR) +- MESSAGE(FATAL_ERROR "Cannot find ICU regular expression headers") +- ENDIF() +- +- IF(WIN32) +- SET(ICU_LIBS icuuc icuio icudt icuin) +- ELSE() +- SET(ICU_LIBS icuuc icuio icudata icui18n) +- ENDIF() +- +- SET(ICU_SYSTEM_LIBRARIES) +- FOREACH(ICU_LIB ${ICU_LIBS}) +- UNSET(ICU_LIB_PATH CACHE) +- FIND_LIBRARY(ICU_LIB_PATH NAMES ${ICU_LIB} ${EXTRA_FIND_LIB_ARGS}) +- IF(NOT ICU_LIB_PATH) +- MESSAGE(FATAL_ERROR "Cannot find the ICU library ${ICU_LIB}") +- ENDIF() +- LIST(APPEND ICU_SYSTEM_LIBRARIES ${ICU_LIB_PATH}) +- ENDFOREACH() +- +- # To do: If we include the path in ICU_INCLUDE_DIR, it leads to GUnit +- # picking up the wrong regex.h header. And it looks like we don't need it; +- # at least on Linux, the header gets installed in an OS path anyway. +- IF(NOT "${install_root}" STREQUAL "system") +- SET(ICU_INCLUDE_DIRS ${ICU_INCLUDE_DIR}) +- ENDIF() +- +- SET(ICU_LIBRARIES ${ICU_SYSTEM_LIBRARIES}) +- +- # 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}) + 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 9aad130..68cbaba 100644 +--- a/cmake/lz4.cmake ++++ b/cmake/lz4.cmake +@@ -25,7 +25,7 @@ + + MACRO (FIND_SYSTEM_LZ4) + FIND_PATH(PATH_TO_LZ4 NAMES lz4frame.h) +- FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4) ++ FIND_LIBRARY(LZ4_SYSTEM_LIBRARY NAMES lz4d lz4) + IF (PATH_TO_LZ4 AND LZ4_SYSTEM_LIBRARY) + SET(SYSTEM_LZ4_FOUND 1) + INCLUDE_DIRECTORIES(SYSTEM ${PATH_TO_LZ4}) +diff --git a/cmake/ssl.cmake b/cmake/ssl.cmake +index 52feade..1e71bd7 100644 +--- a/cmake/ssl.cmake ++++ b/cmake/ssl.cmake +@@ -93,7 +93,20 @@ ENDMACRO() + # Provides the following configure options: + # WITH_SSL=[yes|system|] + MACRO (MYSQL_CHECK_SSL) ++ find_package(OpenSSL REQUIRED) ++ 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::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) + SET(WITH_SSL "system" CACHE STRING ${WITH_SSL_DOC_STRING} FORCE) + ENDIF() +diff --git a/cmake/zlib.cmake b/cmake/zlib.cmake +index 26c56fe..65bebb4 100644 +--- a/cmake/zlib.cmake ++++ b/cmake/zlib.cmake +@@ -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(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 ${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 +- "Which zlib to use (possible values are 'bundled' or 'system')") +- SET(ZLIB_SOURCES "") +- ELSE() +- SET(ZLIB_FOUND FALSE CACHE INTERNAL "Zlib found but not usable") +- MESSAGE(STATUS "system zlib found but not usable") +- ENDIF() +- ENDIF() +- IF(NOT ZLIB_FOUND) +- MYSQL_USE_BUNDLED_ZLIB() +- ENDIF() ++ find_package(ZLIB REQUIRED) ++ SET(ZLIB_LIBRARY ZLIB::ZLIB CACHE INTERNAL "System zlib library") + ENDIF() + ENDMACRO() diff --git a/overlays/libmysql/usage b/overlays/libmysql/usage new file mode 100644 index 00000000000000..8c2b814d282c46 --- /dev/null +++ b/overlays/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/overlays/libmysql/vcpkg-cmake-wrapper.cmake b/overlays/libmysql/vcpkg-cmake-wrapper.cmake new file mode 100644 index 00000000000000..d7f0e7560a8301 --- /dev/null +++ b/overlays/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/overlays/libmysql/vcpkg.json b/overlays/libmysql/vcpkg.json new file mode 100644 index 00000000000000..909f19b31b777a --- /dev/null +++ b/overlays/libmysql/vcpkg.json @@ -0,0 +1,32 @@ +{ + "name": "libmysql", + "version": "8.0.20", + "port-version": 6, + "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", + { + "name": "ncurses", + "platform":"!windows | mingw" + }, + "openssl", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + "zlib" + ] +} \ No newline at end of file diff --git a/overlays/openldap/m4.patch b/overlays/openldap/m4.patch new file mode 100644 index 00000000000000..ea25ef11e72989 --- /dev/null +++ b/overlays/openldap/m4.patch @@ -0,0 +1,12 @@ +diff --git a/configure.ac b/configure.ac +index 05e3f51..dd672a1 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -3429,4 +3429,7 @@ fi + STATIC_BACKENDS="$SLAPD_STATIC_BACKENDS" + STATIC_OVERLAYS="$SLAPD_STATIC_OVERLAYS" + ]]) ++ ++AC_CONFIG_MACRO_DIR([m4]) ++ + AC_OUTPUT diff --git a/overlays/openldap/openssl.patch b/overlays/openldap/openssl.patch new file mode 100644 index 00000000000000..1e836595deffee --- /dev/null +++ b/overlays/openldap/openssl.patch @@ -0,0 +1,13 @@ +diff --git a/configure.ac b/configure.ac +index 626d024..05e3f51 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -1234,7 +1234,7 @@ if test $ol_with_tls = openssl || test $ol_with_tls = auto ; then + , [AC_MSG_FAILURE([OpenSSL 1.1.1 or newer required])]) + + AC_CHECK_LIB(ssl, SSL_export_keying_material_early, +- [have_openssl=yes], [have_openssl=no], ++ [have_openssl=yes], [have_openssl=yes], + [-lcrypto]) + + if test $have_openssl = yes ; then diff --git a/overlays/openldap/portfile.cmake b/overlays/openldap/portfile.cmake new file mode 100644 index 00000000000000..87ea1dde807e42 --- /dev/null +++ b/overlays/openldap/portfile.cmake @@ -0,0 +1,64 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://www.openldap.org/software/download/OpenLDAP/openldap-release/openldap-2.5.13.tgz" + FILENAME "openldap-2.5.13.tgz" + SHA512 30fdc884b513c53169910eec377c2ad05013b9f06bab3123d50d028108b24548791f7f47f18bcb3a2b4868edeab02c10d81ffa320c02d7b562f2e8f2fa25d6c9 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + PATCHES + openssl.patch + m4.patch +) + +if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + set(BUILD_OPTS --enable-shared=yes --enable-static=no) +else() + set(BUILD_OPTS --enable-shared=no --enable-static=yes) +endif() + +# execute_process(COMMAND bash "-c" "awk -F= '/^NAME/{print $2}' \"/etc/os-release\"" +# OUTPUT_VARIABLE OS_RELEASE +# ERROR_VARIABLE OS_RELEASE_ERROR +# OUTPUT_STRIP_TRAILING_WHITESPACE +# ) +# message("OS_RELEASE: ${OS_RELEASE} (${OS_RELEASE_ERROR})") + +# if(OS_RELEASE STREQUAL "\"CentOS Linux\"") +# set(LDFLAGS "LDFLAGS=-ldl") +# else() +# set(LDFLAGS "LDFLAGS=-ldl") +# endif() +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" + AUTOCONFIG + + # PRERUN_SHELL autoreconf --force --install + OPTIONS + ${BUILD_OPTS} + --disable-slapd + --with-tls=openssl + --without-cyrus-sasl + "LIBS=-ldl" + + # --enable-slapd + # --enable-modules + # --enable-rlookups + # --enable-backends=mod + # --disable-ndb + # --disable-sql + # --enable-overlays=mod +) + +vcpkg_build_make(BUILD_TARGET depend) +vcpkg_build_make() +vcpkg_install_make() +vcpkg_fixup_pkgconfig() +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/var") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/var") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/openldap" RENAME copyright) diff --git a/overlays/openldap/subdirs.patch b/overlays/openldap/subdirs.patch new file mode 100644 index 00000000000000..633a2542cb9571 --- /dev/null +++ b/overlays/openldap/subdirs.patch @@ -0,0 +1,34 @@ +diff --git a/Makefile.in b/Makefile.in +index 5c6bec0..c654210 100644 +--- a/Makefile.in ++++ b/Makefile.in +@@ -13,7 +13,11 @@ + ## top-level directory of the distribution or, alternatively, at + ## . + +-SUBDIRS= include libraries clients servers tests doc ++ifeq ($(patsubst %/debug,DEBUG,$(prefix)),DEBUG) ++SUBDIRS= include libraries ++else ++SUBDIRS= include libraries @TOOLS_SUBDIRS@ ++endif + CLEANDIRS= + INSTALLDIRS= + +diff --git a/configure.ac b/configure.ac +index e97f548..71dd7a6 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -235,6 +235,12 @@ dnl OL_ARG_ENABLE(referrals,[AS_HELP_STRING([--enable-referrals], [enable LDAPv2 + ol_enable_referrals=${ol_enable_referrals-no} + OL_ARG_ENABLE(ipv6, [AS_HELP_STRING([--enable-ipv6], [enable IPv6 support])], auto)dnl + OL_ARG_ENABLE(local, [AS_HELP_STRING([--enable-local], [enable AF_LOCAL (AF_UNIX) socket support])], auto)dnl ++OL_ARG_ENABLE(tools, [AS_HELP_STRING([--enable-tools], [Build client tools])],no,[no yes]) ++TOOLS_SUBDIRS="" ++if test "$ol_enable_tools" = "yes" ; then ++ TOOLS_SUBDIRS="clients" ++fi ++AC_SUBST(TOOLS_SUBDIRS) + + dnl ---------------------------------------------------------------- + dnl General "with" options diff --git a/overlays/openldap/usage b/overlays/openldap/usage new file mode 100644 index 00000000000000..6777fcdda3f919 --- /dev/null +++ b/overlays/openldap/usage @@ -0,0 +1,6 @@ +The package openldapp can be imported via CMake FindPkgConfig module: + + find_package(PkgConfig) + pkg_check_modules(OPENLDAP REQUIRED IMPORTED_TARGET ldap) + + target_link_libraries(main PRIVATE PkgConfig::OPENLDAP) diff --git a/overlays/openldap/vcpkg.json b/overlays/openldap/vcpkg.json new file mode 100644 index 00000000000000..b0146cfaede6bc --- /dev/null +++ b/overlays/openldap/vcpkg.json @@ -0,0 +1,14 @@ +{ + "name": "openldap", + "version-string": "2.5.13", + "homepage": "https://www.openldap.org/software/", + "description": "OpenLDAP Software is an open source implementation of the Lightweight Directory Access Protocol.", + "supports": "!windows", + "dependencies": [ + "openssl", + { + "name": "vcpkg-cmake", + "host": true + } + ] +} \ No newline at end of file diff --git a/overlays/openssl/install-pc-files.cmake b/overlays/openssl/install-pc-files.cmake new file mode 100644 index 00000000000000..eb8d2b8c288473 --- /dev/null +++ b/overlays/openssl/install-pc-files.cmake @@ -0,0 +1,32 @@ +function(install_pc_file name pc_data) + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release") + configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.pc.in" "${CURRENT_PACKAGES_DIR}/lib/pkgconfig/${name}.pc" @ONLY) + endif() + if(NOT DEFINED VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug") + configure_file("${CMAKE_CURRENT_LIST_DIR}/openssl.pc.in" "${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/${name}.pc" @ONLY) + endif() +endfunction() + +install_pc_file(openssl [[ +Name: OpenSSL +Description: Secure Sockets Layer and cryptography libraries and tools +Requires: libssl libcrypto +]]) + +install_pc_file(libssl [[ +Name: OpenSSL-libssl +Description: Secure Sockets Layer and cryptography libraries +Libs: -L"${libdir}" -llibssl +Requires: libcrypto +Cflags: -I"${includedir}" +]]) + +install_pc_file(libcrypto [[ +Name: OpenSSL-libcrypto +Description: OpenSSL cryptography library +Libs: -L"${libdir}" -llibcrypto +Libs.private: -lcrypt32 -lws2_32 +Cflags: -I"${includedir}" +]]) + +vcpkg_fixup_pkgconfig() diff --git a/overlays/openssl/openssl.pc.in b/overlays/openssl/openssl.pc.in new file mode 100644 index 00000000000000..3033e1804da0f4 --- /dev/null +++ b/overlays/openssl/openssl.pc.in @@ -0,0 +1,6 @@ +prefix=${pcfiledir}/../.. +exec_prefix=${prefix} +libdir=${exec_prefix}/lib +includedir=${prefix}/include +Version: @OPENSSL_VERSION@ +@pc_data@ diff --git a/overlays/openssl/portfile.cmake b/overlays/openssl/portfile.cmake new file mode 100644 index 00000000000000..329218a8516918 --- /dev/null +++ b/overlays/openssl/portfile.cmake @@ -0,0 +1,28 @@ +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(OPENSSL_VERSION 1.1.1q) +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 cb9f184ec4974a3423ef59c8ec86b6bf523d5b887da2087ae58c217249da3246896fdd6966ee9c13aea9e6306783365239197e9f742c508a0e35e5744e3e085f +) + +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") + include("${CMAKE_CURRENT_LIST_DIR}/install-pc-files.cmake") +elseif(VCPKG_TARGET_IS_WINDOWS AND NOT VCPKG_TARGET_IS_MINGW) + include("${CMAKE_CURRENT_LIST_DIR}/windows/portfile.cmake") + include("${CMAKE_CURRENT_LIST_DIR}/install-pc-files.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/overlays/openssl/unix/CMakeLists.txt b/overlays/openssl/unix/CMakeLists.txt new file mode 100644 index 00000000000000..7bf45e27bb73e0 --- /dev/null +++ b/overlays/openssl/unix/CMakeLists.txt @@ -0,0 +1,283 @@ +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() +set(INSTALL_PKG_CONFIGS "${BUILDDIR}/openssl.pc") +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} + COMMAND ${ENV_COMMAND} WINDRES=${CMAKE_RC_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/overlays/openssl/unix/portfile.cmake b/overlays/openssl/unix/portfile.cmake new file mode 100644 index 00000000000000..7a04ae7c9dc3d1 --- /dev/null +++ b/overlays/openssl/unix/portfile.cmake @@ -0,0 +1,38 @@ +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_cmake_configure( + SOURCE_PATH ${CMAKE_CURRENT_LIST_DIR} + OPTIONS + -DSOURCE_PATH=${MASTER_COPY_SOURCE_PATH} + -DPERL=${PERL} + -DMAKE=${MAKE} + -DVCPKG_CONCURRENCY=${VCPKG_CONCURRENCY} +) + +vcpkg_cmake_install() +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/overlays/openssl/unix/remove-deps.cmake b/overlays/openssl/unix/remove-deps.cmake new file mode 100644 index 00000000000000..53ad6ef2906539 --- /dev/null +++ b/overlays/openssl/unix/remove-deps.cmake @@ -0,0 +1,7 @@ +file(GLOB_RECURSE MAKEFILES ${DIR}/*/Makefile) +foreach(MAKEFILE ${MAKEFILES}) + message("removing deps from ${MAKEFILE}") + file(READ "${MAKEFILE}" _contents) + string(REGEX REPLACE "\n# DO NOT DELETE THIS LINE.*" "" _contents "${_contents}") + file(WRITE "${MAKEFILE}" "${_contents}") +endforeach() diff --git a/overlays/openssl/usage b/overlays/openssl/usage new file mode 100644 index 00000000000000..cf83f33916bd1d --- /dev/null +++ b/overlays/openssl/usage @@ -0,0 +1,4 @@ +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/overlays/openssl/uwp/EnableUWPSupport.patch b/overlays/openssl/uwp/EnableUWPSupport.patch new file mode 100644 index 00000000000000..fe7837445985cf --- /dev/null +++ b/overlays/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/overlays/openssl/uwp/make-openssl.bat b/overlays/openssl/uwp/make-openssl.bat new file mode 100644 index 00000000000000..61d9a65624946c --- /dev/null +++ b/overlays/openssl/uwp/make-openssl.bat @@ -0,0 +1,16 @@ +set build=%1 + +perl Configure no-asm no-hw no-dso VC-WINUNIVERSAL -FS -FIWindows.h + +for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\ +for /D %%f in ("%WindowsSdkDir%References\%WindowsSDKLibVersion%Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\ +for /D %%f in ("%WindowsSdkDir%References\Windows.Foundation.FoundationContract\*") do set LibPath=%LibPath%;%%f\ +for /D %%f in ("%WindowsSdkDir%References\Windows.Foundation.UniversalApiContract\*") do set LibPath=%LibPath%;%%f\ + +call ms\do_winuniversal.bat + +mkdir inc32\openssl + +jom -j %NUMBER_OF_PROCESSORS% -k -f ms\ntdll.mak +REM due to a race condition in the build, we need to have a second single-threaded pass. +nmake -f ms\ntdll.mak diff --git a/overlays/openssl/uwp/portfile.cmake b/overlays/openssl/uwp/portfile.cmake new file mode 100644 index 00000000000000..9414634fe2057d --- /dev/null +++ b/overlays/openssl/uwp/portfile.cmake @@ -0,0 +1,163 @@ +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/overlays/openssl/vcpkg-cmake-wrapper.cmake.in b/overlays/openssl/vcpkg-cmake-wrapper.cmake.in new file mode 100644 index 00000000000000..4a5ee893a2fe28 --- /dev/null +++ b/overlays/openssl/vcpkg-cmake-wrapper.cmake.in @@ -0,0 +1,78 @@ +cmake_policy(PUSH) +cmake_policy(SET CMP0012 NEW) +cmake_policy(SET CMP0054 NEW) +cmake_policy(SET CMP0057 NEW) + +if(OPENSSL_USE_STATIC_LIBS) + if("@VCPKG_LIBRARY_LINKAGE@" STREQUAL "dynamic") + message(WARNING "OPENSSL_USE_STATIC_LIBS is set, but vcpkg port openssl was built with dynamic linkage") + endif() + set(OPENSSL_USE_STATIC_LIBS_BAK "${OPENSSL_USE_STATIC_LIBS}") + set(OPENSSL_USE_STATIC_LIBS FALSE) +endif() + +if(DEFINED OPENSSL_ROOT_DIR) + set(OPENSSL_ROOT_DIR_BAK "${OPENSSL_ROOT_DIR}") +endif() +get_filename_component(OPENSSL_ROOT_DIR "${CMAKE_CURRENT_LIST_DIR}" DIRECTORY) +get_filename_component(OPENSSL_ROOT_DIR "${OPENSSL_ROOT_DIR}" DIRECTORY) +find_path(OPENSSL_INCLUDE_DIR NAMES openssl/ssl.h PATH "${OPENSSL_ROOT_DIR}/include" NO_DEFAULT_PATH) +if(MSVC) + find_library(LIB_EAY_DEBUG NAMES libcrypto PATHS "${OPENSSL_ROOT_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(LIB_EAY_RELEASE NAMES libcrypto PATHS "${OPENSSL_ROOT_DIR}/lib" NO_DEFAULT_PATH) + find_library(SSL_EAY_DEBUG NAMES libssl PATHS "${OPENSSL_ROOT_DIR}/debug/lib" NO_DEFAULT_PATH) + find_library(SSL_EAY_RELEASE NAMES libssl PATHS "${OPENSSL_ROOT_DIR}/lib" NO_DEFAULT_PATH) +elseif(WIN32) + find_library(LIB_EAY NAMES libcrypto crypto NAMES_PER_DIR) + find_library(SSL_EAY NAMES libssl ssl NAMES_PER_DIR) +else() + find_library(OPENSSL_CRYPTO_LIBRARY NAMES crypto) + find_library(OPENSSL_SSL_LIBRARY NAMES ssl) +endif() + +_find_package(${ARGS}) + +unset(OPENSSL_ROOT_DIR) +if(DEFINED OPENSSL_ROOT_DIR_BAK) + set(OPENSSL_ROOT_DIR "${OPENSSL_ROOT_DIR_BAK}") + unset(OPENSSL_ROOT_DIR_BAK) +endif() + +if(DEFINED OPENSSL_USE_STATIC_LIBS_BAK) + set(OPENSSL_USE_STATIC_LIBS "${OPENSSL_USE_STATIC_LIBS_BAK}") + unset(OPENSSL_USE_STATIC_LIBS_BAK) +endif() + +if(OPENSSL_FOUND AND "@VCPKG_LIBRARY_LINKAGE@" STREQUAL "static") + if(WIN32) + list(APPEND OPENSSL_LIBRARIES crypt32 ws2_32) + if(TARGET OpenSSL::Crypto) + set_property(TARGET OpenSSL::Crypto APPEND PROPERTY INTERFACE_LINK_LIBRARIES "crypt32;ws2_32") + endif() + if(TARGET OpenSSL::SSL) + set_property(TARGET OpenSSL::SSL APPEND PROPERTY INTERFACE_LINK_LIBRARIES "crypt32;ws2_32") + endif() + else() + 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() + endif() +endif() +cmake_policy(POP) diff --git a/overlays/openssl/vcpkg.json b/overlays/openssl/vcpkg.json new file mode 100644 index 00000000000000..1eb22721b07655 --- /dev/null +++ b/overlays/openssl/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "openssl", + "version-string": "1.1.1q", + "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", + "license": "OpenSSL", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ] +} \ No newline at end of file diff --git a/overlays/openssl/windows/portfile.cmake b/overlays/openssl/windows/portfile.cmake new file mode 100644 index 00000000000000..e4469ef3269984 --- /dev/null +++ b/overlays/openssl/windows/portfile.cmake @@ -0,0 +1,172 @@ +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/overlays/winflexbison/portfile.cmake b/overlays/winflexbison/portfile.cmake new file mode 100644 index 00000000000000..4bb067fdf0fb5e --- /dev/null +++ b/overlays/winflexbison/portfile.cmake @@ -0,0 +1,20 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/lexxmark/winflexbison/releases/download/v2.5.25/win_flex_bison-2.5.25.zip" + FILENAME "win_flex_bison-2.5.25.zip" + SHA512 2a829eb05003178c89f891dd0a67add360c112e74821ff28e38feb61dac5b66e9d3d5636ff9eef055616aaf282ee8d6be9f14c6ae4577f60bdcec96cec9f364e +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} + NO_REMOVE_ONE_LEVEL +) + +file(COPY ${SOURCE_PATH}/FlexLexer.h DESTINATION ${CURRENT_PACKAGES_DIR}/include/winflexbison) +file(COPY ${SOURCE_PATH}/win_bison.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/winflexbison) +file(COPY ${SOURCE_PATH}/win_flex.exe DESTINATION ${CURRENT_PACKAGES_DIR}/tools/winflexbison) +file(COPY ${SOURCE_PATH}/data DESTINATION ${CURRENT_PACKAGES_DIR}/tools/winflexbison) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/README.md DESTINATION ${CURRENT_PACKAGES_DIR}/share/winflexbison RENAME copyright) + diff --git a/overlays/winflexbison/vcpkg.json b/overlays/winflexbison/vcpkg.json new file mode 100644 index 00000000000000..2bcdf97b52eee4 --- /dev/null +++ b/overlays/winflexbison/vcpkg.json @@ -0,0 +1,8 @@ +{ + "name": "winflexbison", + "version-string": "2.5.25", + "description": "WinFlexBison is a Windows port of Flex (the fast lexical analyser) and GNU Bison (parser generator). Both win_flex and win_bison are based on upstream sources but depend on system libraries only.", + "homepage": "https://github.com/lexxmark/winflexbison", + "supports": "windows", + "license": "GPL-3.0+" +} \ No newline at end of file diff --git a/scripts/msys/compile_wrapper_consider_clang-cl.patch b/scripts/msys/compile_wrapper_consider_clang-cl.patch new file mode 100644 index 00000000000000..c3666ecc9b680d --- /dev/null +++ b/scripts/msys/compile_wrapper_consider_clang-cl.patch @@ -0,0 +1,12 @@ +diff --git a/usr/share/automake-1.16/compile b/usr/share/automake-1.16/compile +index 2078fc833..dfc946593 100755 +--- a/usr/share/automake-1.16/compile ++++ b/usr/share/automake-1.16/compile +@@ -256,6 +256,7 @@ EOF + exit $? + ;; + cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ ++ clang-cl | *[/\\]clang-cl | clang-cl.exe | *[/\\]clang-cl.exe | \ + icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) + func_cl_wrapper "$@" # Doesn't return... + ;; diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json new file mode 100644 index 00000000000000..9600d3fd234ee0 --- /dev/null +++ b/vcpkg-configuration.json @@ -0,0 +1,14 @@ +{ + "default-registry": { + "kind": "git", + "repository": "https://github.com/microsoft/vcpkg", + "baseline": "14e7bb4ae24616ec54ff6b2f6ef4e8659434ea44" + }, + "registries": [], + "overlay-ports": [ + "./overlays" + ], + "overlay-triplets": [ + "./overlays" + ] +} \ No newline at end of file diff --git a/vcpkg.json b/vcpkg.json new file mode 100644 index 00000000000000..d785e3be972630 --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,92 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", + "name": "hpcc-platform", + "version": "8.8.0", + "dependencies": [ + "apr", + "apr-util", + { + "name": "aws-sdk-cpp", + "default-features": false, + "features": [ + "s3", + "sqs" + ] + }, + "azure-storage-blobs-cpp", + "azure-storage-files-shares-cpp", + "boost-property-tree", + "boost-regex", + "cpp-driver", + "cpr", + "curl", + { + "name": "elasticlient", + "platform": "!windows" + }, + "h3", + "hiredis", + "icu", + "jsoncpp", + "jwt-cpp", + { + "name": "libarchive", + "default-features": false, + "features": [ + "bzip2" + ] + }, + "libgit2", + { + "name": "libiconv", + "platform": "osx" + }, + { + "name": "libmysql", + "platform": "!(windows & x86)" + }, + "librdkafka", + "libuv", + "libxml2", + { + "name": "libxslt", + "default-features": false, + "features": [] + }, + "libyaml", + "lz4", + "mongo-cxx-driver", + "nlohmann-json", + { + "name": "openblas", + "features": [ + "dynamic-arch", + "threads" + ], + "platform": "!windows" + }, + { + "name": "openblas", + "features": [ + "threads" + ], + "platform": "windows" + }, + { + "name": "openldap", + "platform": "!windows" + }, + "openssl", + { + "name": "python3", + "platform": "windows" + }, + "rapidjson", + "tbb", + { + "name": "winflexbison", + "platform": "windows" + }, + "zlib" + ] +} \ No newline at end of file