diff --git a/.dockerignore b/.dockerignore new file mode 100644 index 00000000000000..dbcea137316718 --- /dev/null +++ b/.dockerignore @@ -0,0 +1,17 @@ +* + +# Folders +!overlays +!ports +!scripts +!toolsrc +!triplets +!version + +# Files +!.vcpkg-root +!bootstrap-vcpkg.sh +!LICENSE.txt +!shell.nix +!vcpkg-configuration.json +!vcpkg.json diff --git a/.github/workflows/prebuild-docker.yml b/.github/workflows/prebuild-docker.yml new file mode 100644 index 00000000000000..f7e5fa227cf620 --- /dev/null +++ b/.github/workflows/prebuild-docker.yml @@ -0,0 +1,112 @@ +name: Refresh docker NuGet cache + +on: + push: + tags: + - "*" + branches: + - "hpcc-platform-9.6.x" + + workflow_call: + inputs: + branch: + description: "The branch to build" + required: true + type: string + + workflow_dispatch: + +jobs: + build-images: + strategy: + matrix: + image: + [ + "ubuntu-24.04", + "ubuntu-22.04", + "ubuntu-20.04", + "rockylinux-8", + "centos-8", + "centos-7", + "amazonlinux", + ] + fail-fast: false + + name: "Docker: ${{ matrix.image }}" + runs-on: ubuntu-22.04 + steps: + - name: Free additional disk space (remove Android SDK + Tools) + continue-on-error: true + run: | + df -h + sudo rm -rf /usr/local/lib/android + sudo rm -rf ${JAVA_HOME_8_X64} + sudo rm -rf ${JAVA_HOME_11_X64} + sudo rm -rf ${JAVA_HOME_17_X64} + sudo rm -rf ${JAVA_HOME_21_X64} + sudo rm -rf ${CHROMEWEBDRIVER} + sudo rm -rf ${EDGEWEBDRIVER} + sudo rm -rf ${GECKOWEBDRIVER} + sudo rm -rf ${SELENIUM_JAR_PATH} + sudo rm -rf /usr/share/dotnet + sudo rm -rf /opt/ghc + sudo rm -rf "/usr/local/share/boost" + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + + - name: Display disk space (post free) + run: | + df -h + + - name: Check out source code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + ref: ${{ inputs.branch || github.ref }} + + - name: Calculate vars + id: vars + run: | + vcpkg_ref=${{ inputs.branch || github.ref }} + vcpkg_base_ref=${{ inputs.branch || github.event.base_ref || github.ref }} + echo "vcpkg_ref=$vcpkg_ref" >> $GITHUB_OUTPUT + echo "vcpkg_tag=$(echo $vcpkg_ref | cut -d'/' -f3)" >> $GITHUB_OUTPUT + echo "vcpkg_branch=$(echo $vcpkg_base_ref | cut -d'/' -f3)" >> $GITHUB_OUTPUT + echo "sha_short=$(git rev-parse --short=8 HEAD)" >> $GITHUB_OUTPUT + echo "repository_owner=${{ github.repository_owner }}" >> $GITHUB_OUTPUT + + - name: Print vars + run: | + echo "${{ toJSON(steps.vars.outputs) }})" + + - name: Set up Docker Buildx + id: buildx + uses: docker/setup-buildx-action@v3 + + - name: Login to DockerHub + uses: docker/login-action@v3 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Pull previous images + run: | + docker pull hpccsystems/platform-build-base-${{ matrix.image }}:${{ steps.vars.outputs.sha_short }} || true + docker pull hpccsystems/platform-build-base-${{ matrix.image }}:${{ steps.vars.outputs.vcpkg_tag }} || true + + - name: Build ${{ matrix.os }} image + uses: docker/build-push-action@v5 + with: + builder: ${{ steps.buildx.outputs.name }} + file: dockerfiles/${{ matrix.image }}.dockerfile + context: . + push: ${{ steps.vars.outputs.repository_owner == 'hpcc-systems' }} + build-args: | + NUGET_MODE=readwrite + GITHUB_ACTOR=${{ github.repository_owner }} + GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }} + tags: | + hpccsystems/platform-build-base-${{ matrix.image }}:${{ steps.vars.outputs.sha_short }} + hpccsystems/platform-build-base-${{ matrix.image }}:${{ steps.vars.outputs.vcpkg_tag }} + cache-from: | + type=registry,ref=hpccsystems/platform-build-base-${{ matrix.image }}:${{ steps.vars.outputs.sha_short }} + type=registry,ref=hpccsystems/platform-build-base-${{ matrix.image }}:${{ steps.vars.outputs.vcpkg_tag }} diff --git a/.github/workflows/prebuild-gh_envs.yml b/.github/workflows/prebuild-gh_envs.yml new file mode 100644 index 00000000000000..ed2a7621a799be --- /dev/null +++ b/.github/workflows/prebuild-gh_envs.yml @@ -0,0 +1,153 @@ +name: Refresh GH environments NuGet cache + +env: + VCPKG_BINARY_SOURCES: "clear;nuget,GitHub,readwrite" + +on: + push: + branches: + - "hpcc-platform-9.6.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-2022-x64", + "macos-12-x64", + "macos-13-x64" + ] + include: + - label: "ubuntu-20.04-x64" + os: "ubuntu-20.04" + triplet: "x64-linux-dynamic" + mono: "mono" + sudo: "sudo" + - label: "ubuntu-22.04-x64" + os: "ubuntu-22.04" + triplet: "x64-linux-dynamic" + mono: "mono" + sudo: "sudo" + - label: "windows-2019-x64" + os: "windows-2019" + triplet: "x64-windows" + mono: "" + sudo: "" + - label: "windows-2022-x64" + os: "windows-2022" + triplet: "x64-windows" + mono: "" + sudo: "" + - label: "macos-12-x64" + os: "macos-12" + triplet: "x64-osx" + mono: "mono" + sudo: "sudo" + - label: "macos-13-x64" + os: "macos-13" + 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 \ + apt-transport-https \ + autoconf \ + autoconf-archive \ + automake \ + autotools-dev \ + binutils-dev \ + bison \ + build-essential \ + ca-certificates \ + curl \ + dirmngr \ + flex \ + git \ + gnupg \ + groff-base \ + libtool \ + pkg-config \ + software-properties-common \ + tar \ + unzip \ + uuid-dev \ + zip + + - 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-12' || matrix.os == 'macos-13' }} + shell: "bash" + run: | + brew install bison flex pkg-config automake libtool autoconf autoconf-archive coreutils + + - 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)" + working-directory: . + shell: "bash" + run: | + ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --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/.gitignore b/.gitignore index d6d47929120f8f..0900024537572b 100644 --- a/.gitignore +++ b/.gitignore @@ -288,6 +288,7 @@ __pycache__/ /installed*/ /vcpkg_installed*/ /packages/ +/vcpkg_installed/ /scripts/buildsystems/tmp/ #ignore custom triplets /triplets/* @@ -322,3 +323,8 @@ prefab/ pythonenv3.8/ .venv/ +################### +# hpcc +################### +.env +/vcpkg_*/ diff --git a/dockerfiles/amazonlinux.dockerfile b/dockerfiles/amazonlinux.dockerfile new file mode 100644 index 00000000000000..3b1a52337954b5 --- /dev/null +++ b/dockerfiles/amazonlinux.dockerfile @@ -0,0 +1,173 @@ +FROM amazonlinux:2 AS base_build + +# Build Tools --- +RUN yum update -y && yum install -y \ + centos-release-scl \ + wget \ + yum-utils && \ + amazon-linux-extras install -y epel && yum-config-manager --enable epel && \ + yum groupinstall -y "Development Tools" && yum install -y \ + autoconf-archive \ + autoconf \ + automake \ + curl \ + git \ + kernel-devel \ + libtool \ + perl-IPC-Cmd \ + python3 \ + tar \ + unzip \ + zip && \ + yum -y clean all && rm -rf /var/cache + +RUN yum-config-manager --add-repo http://mirror.centos.org/centos/7/sclo/x86_64/rh/ && \ + LIBGFORTRAN5=libgfortran5-8.3.1-2.1.1.el7.x86_64.rpm && \ + wget http://mirror.centos.org/centos/7/os/x86_64/Packages/${LIBGFORTRAN5} && \ + yum install -y ${LIBGFORTRAN5} && \ + yum install -y devtoolset-11 --nogpgcheck + +RUN echo "source /opt/rh/devtoolset-11/enable" > /etc/profile.d/devtoolset-11.sh +SHELL ["/bin/bash", "--login", "-c"] + +RUN yum install -y hostname xz && \ + curl -o pkg-config-0.29.2.tar.gz https://pkg-config.freedesktop.org/releases/pkg-config-0.29.2.tar.gz && \ + 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 && \ + make && \ + make install && \ + ln -s /usr/local/pkg_config/0_29_2/bin/pkg-config /usr/local/bin/ && \ + mkdir /usr/local/share/aclocal && \ + ln -s /usr/local/pkg_config/0_29_2/share/aclocal/pkg.m4 /usr/local/share/aclocal/ + +ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig +ENV ACLOCAL_PATH=$ACLOCAL_PATH:/usr/local/share/aclocal + +RUN curl -o autoconf-2.71.tar.gz http://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz && \ + gunzip autoconf-2.71.tar.gz && \ + tar xvf autoconf-2.71.tar && \ + cd autoconf-2.71 && \ + ./configure && \ + make && \ + make install + +RUN curl -o autoconf-archive-2021.02.19.tar.xz http://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-2021.02.19.tar.xz && \ + xz -d -v autoconf-archive-2021.02.19.tar.xz && \ + tar xvf autoconf-archive-2021.02.19.tar && \ + cd autoconf-archive-2021.02.19 && \ + ./configure && \ + make && \ + make install + +RUN curl -o automake-1.16.5.tar.gz http://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz && \ + tar xvzf automake-1.16.5.tar.gz && \ + cd automake-1.16.5 && \ + ./configure && \ + make && \ + make install + +RUN curl -o libtool-2.4.6.tar.gz http://ftp.jaist.ac.jp/pub/GNU/libtool/libtool-2.4.6.tar.gz && \ + tar xvfz libtool-2.4.6.tar.gz && \ + cd libtool-2.4.6 && \ + ./configure --prefix=/usr/local/libtool/2_4_6 && \ + make && \ + make install + +RUN ln -s /usr/local/libtool/2_4_6/bin/libtool /usr/local/bin/ && \ + ln -s /usr/local/libtool/2_4_6/bin/libtoolize /usr/local/bin/ && \ + ln -s /usr/local/libtool/2_4_6/include/libltdl /usr/local/include/ && \ + ln -s /usr/local/libtool/2_4_6/include/ltdl.h /usr/local/include/ && \ + ln -s /usr/local/libtool/2_4_6/lib/libltdl.a /usr/local/lib/ && \ + ln -s /usr/local/libtool/2_4_6/lib/libltdl.la /usr/local/lib/ && \ + ln -s /usr/local/libtool/2_4_6/lib/libltdl.so /usr/local/lib/ && \ + ln -s /usr/local/libtool/2_4_6/lib/libltdl.so.7 /usr/local/lib/ && \ + ln -s /usr/local/libtool/2_4_6/lib/libltdl.so.7.3.1 /usr/local/lib/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/libtool.m4 /usr/local/share/aclocal/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/ltargz.m4 /usr/local/share/aclocal/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/ltdl.m4 /usr/local/share/aclocal/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/lt~obsolete.m4 /usr/local/share/aclocal/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/ltoptions.m4 /usr/local/share/aclocal/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/ltsugar.m4 /usr/local/share/aclocal/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/ltversion.m4 /usr/local/share/aclocal/ + +# echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf +# ldconfig +# ldconfig -v + +FROM base_build AS vcpkg_build + +# Build Tools - Mono --- +RUN yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ && \ + yum clean all && \ + yum makecache && \ + rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \ + yum install -y mono-complete && \ + yum -y clean all && rm -rf /var/cache + +ARG NUGET_MODE=readwrite +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,${NUGET_MODE}" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +COPY . /hpcc-dev/vcpkg + +WORKDIR /hpcc-dev/vcpkg + +RUN ./bootstrap-vcpkg.sh + +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 mkdir /hpcc-dev/build +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --x-install-root=/hpcc-dev/build/vcpkg_installed \ + --triplet=x64-amazonlinux-dynamic +# ./vcpkg install --x-abi-tools-use-exact-versions --triplet=x64-amazonlinux-dynamic --x-install-root=/hpcc-dev/build/vcpkg_installed + +RUN mkdir -p /hpcc-dev/tools/cmake +RUN cp -r $(dirname $(dirname `./vcpkg fetch cmake | tail -n 1`))/* /hpcc-dev/tools/cmake +RUN mkdir -p /hpcc-dev/tools/ninja +RUN cp -r $(dirname `./vcpkg fetch ninja | tail -n 1`)/* /hpcc-dev/tools/ninja +RUN mkdir -p /hpcc-dev/tools/node +RUN cp -r $(dirname $(dirname `./vcpkg fetch node | tail -n 1`))/* /hpcc-dev/tools/node + +FROM base_build + +RUN amazon-linux-extras install java-openjdk11 && yum install -y \ + java-11-openjdk-devel \ + python3-devel \ + epel-release && \ + yum install -y \ + ccache \ + R-core-devel \ + R-Rcpp-devel \ + R-RInside-devel + +WORKDIR /hpcc-dev + +COPY --from=vcpkg_build /hpcc-dev/build/vcpkg_installed /hpcc-dev/vcpkg_installed +COPY --from=vcpkg_build /hpcc-dev/tools /hpcc-dev/tools + +RUN cp -rs /hpcc-dev/tools/cmake/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/cmake/share /usr/local/ && \ + ln -s /hpcc-dev/tools/ninja/ninja /usr/local/bin/ninja && \ + cp -rs /hpcc-dev/tools/node/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/include /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/lib /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/share /usr/local/ + +ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] diff --git a/dockerfiles/build.sh b/dockerfiles/build.sh new file mode 100755 index 00000000000000..4deb3476d2f39b --- /dev/null +++ b/dockerfiles/build.sh @@ -0,0 +1,74 @@ +#!/bin/bash +set -e + +SCRIPT_DIR="$( cd -- "$( dirname -- "${BASH_SOURCE[0]:-$0}"; )" &> /dev/null && pwd 2> /dev/null; )"; + +export $(grep -v '^#' $SCRIPT_DIR/../.env | xargs -d '\r' | xargs -d '\n') > /dev/null + +GITHUB_ACTOR="${GITHUB_ACTOR:-hpcc-systems}" +GITHUB_TOKEN="${GITHUB_TOKEN:-none}" +GITHUB_REF=$(git rev-parse --short=8 HEAD) +GITHUB_BRANCH=$(git branch --show-current) +DOCKER_USERNAME="${DOCKER_USERNAME:-hpccbuilds}" +DOCKER_PASSWORD="${DOCKER_PASSWORD:-none}" + +echo "SCRIPT_DIR: $SCRIPT_DIR" +echo "GITHUB_ACTOR: $GITHUB_ACTOR" +echo "GITHUB_TOKEN: $GITHUB_TOKEN" +echo "GITHUB_REF: $GITHUB_REF" +echo "GITHUB_BRANCH: $GITHUB_BRANCH" +echo "DOCKER_USERNAME: $DOCKER_USERNAME" +echo "DOCKER_PASSWORD: $DOCKER_PASSWORD" + +docker login -u $DOCKER_USERNAME -p $DOCKER_PASSWORD + +function doBuild() { + docker pull "hpccsystems/platform-build-vcpkg-$1:$GITHUB_REF" || true + docker pull "hpccsystems/platform-build-vcpkg-$1:$GITHUB_BRANCH" || true + + docker build --progress plain --rm -f "$SCRIPT_DIR/$1.dockerfile" \ + --target vcpkg_build \ + --build-arg NUGET_MODE=readwrite \ + --build-arg GITHUB_ACTOR=$GITHUB_ACTOR \ + --build-arg GITHUB_TOKEN=$GITHUB_TOKEN \ + --cache-from hpccsystems/platform-build-vcpkg-$1:$GITHUB_REF \ + --cache-from hpccsystems/platform-build-vcpkg-$1:$GITHUB_BRANCH \ + -t hpccsystems/platform-build-vcpkg-$1:$GITHUB_REF \ + -t hpccsystems/platform-build-vcpkg-$1:$GITHUB_BRANCH \ + "$SCRIPT_DIR/.." + + # docker push "hpccsystems/platform-build-vcpkg-$1:$GITHUB_REF" & + # docker push "hpccsystems/platform-build-vcpkg-$1:$GITHUB_BRANCH" & + + # mkdir -p build-$1 + # docker run --rm --mount source="$(pwd)",target=/hpcc-dev/HPCC-Platform,type=bind,consistency=cached hpccsystems/platform-build-vcpkg-$1:$GITHUB_REF \ + # "rm -rf /hpcc-dev/HPCC-Platform/build-$1/vcpkg_installed || true && \ + # cp -r /hpcc-dev/vcpkg_installed /hpcc-dev/HPCC-Platform/build-$1" + + # docker pull "hpccsystems/platform-build-base-$1:$GITHUB_REF" || true + # docker pull "hpccsystems/platform-build-base-$1:$GITHUB_BRANCH" || true + + # docker build --progress plain --rm -f "$SCRIPT_DIR/$1.dockerfile" \ + # --build-arg NUGET_MODE=readwrite \ + # --build-arg GITHUB_ACTOR=$GITHUB_ACTOR \ + # --build-arg GITHUB_TOKEN=$GITHUB_TOKEN \ + # --cache-from hpccsystems/platform-build-base-$1:$GITHUB_REF \ + # --cache-from hpccsystems/platform-build-base-$1:$GITHUB_BRANCH \ + # -t hpccsystems/platform-build-base-$1:$GITHUB_REF \ + # -t hpccsystems/platform-build-base-$1:$GITHUB_BRANCH \ + # "$SCRIPT_DIR/.." + + # docker push hpccsystems/platform-build-base-$1:$GITHUB_REF + # docker push hpccsystems/platform-build-base-$1:$GITHUB_BRANCH +} + +# doBuild ubuntu-24.04 +# doBuild amazonlinux +# doBuild centos-7 & +doBuild rockylinux-8 & +# doBuild ubuntu-24.04 & +# doBuild ubuntu-23.04 & +# doBuild ubuntu-22.04 & +# doBuild ubuntu-20.04 & + +wait diff --git a/dockerfiles/centos-7.dockerfile b/dockerfiles/centos-7.dockerfile new file mode 100644 index 00000000000000..4c59f1d3b043db --- /dev/null +++ b/dockerfiles/centos-7.dockerfile @@ -0,0 +1,175 @@ +FROM centos:centos7.9.2009 AS base_build + +# Build Tools --- +RUN yum update -y && yum install -y \ + centos-release-scl \ + https://packages.endpointdev.com/rhel/7/os/x86_64/endpoint-repo.x86_64.rpm && \ + yum group install -y "Development Tools" && yum install -y \ + autoconf \ + autoconf-archive \ + automake \ + curl \ + git \ + kernel-devel \ + libtool \ + perl-IPC-Cmd \ + python3 \ + tar \ + unzip \ + yum-utils \ + zip && \ + yum -y clean all && rm -rf /var/cache + +RUN yum install -y devtoolset-11 + +RUN echo "source /opt/rh/devtoolset-11/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 && \ + 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 && \ + make && \ + make install && \ + ln -s /usr/local/pkg_config/0_29_2/bin/pkg-config /usr/local/bin/ && \ + mkdir /usr/local/share/aclocal && \ + ln -s /usr/local/pkg_config/0_29_2/share/aclocal/pkg.m4 /usr/local/share/aclocal/ + +ENV PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig +ENV ACLOCAL_PATH=$ACLOCAL_PATH:/usr/local/share/aclocal + +RUN curl -o autoconf-2.71.tar.gz http://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.gz && \ + gunzip autoconf-2.71.tar.gz && \ + tar xvf autoconf-2.71.tar && \ + cd autoconf-2.71 && \ + ./configure && \ + make && \ + make install + +RUN curl -o autoconf-archive-2021.02.19.tar.xz http://ftp.gnu.org/gnu/autoconf-archive/autoconf-archive-2021.02.19.tar.xz && \ + xz -d -v autoconf-archive-2021.02.19.tar.xz && \ + tar xvf autoconf-archive-2021.02.19.tar && \ + cd autoconf-archive-2021.02.19 && \ + ./configure && \ + make && \ + make install + +RUN curl -o automake-1.16.5.tar.gz http://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.gz && \ + tar xvzf automake-1.16.5.tar.gz && \ + cd automake-1.16.5 && \ + ./configure && \ + make && \ + make install + +RUN curl -o libtool-2.4.6.tar.gz http://ftp.jaist.ac.jp/pub/GNU/libtool/libtool-2.4.6.tar.gz && \ + tar xvfz libtool-2.4.6.tar.gz && \ + cd libtool-2.4.6 && \ + ./configure --prefix=/usr/local/libtool/2_4_6 && \ + make && \ + make install + +RUN ln -s /usr/local/libtool/2_4_6/bin/libtool /usr/local/bin/ && \ + ln -s /usr/local/libtool/2_4_6/bin/libtoolize /usr/local/bin/ && \ + ln -s /usr/local/libtool/2_4_6/include/libltdl /usr/local/include/ && \ + ln -s /usr/local/libtool/2_4_6/include/ltdl.h /usr/local/include/ && \ + ln -s /usr/local/libtool/2_4_6/lib/libltdl.a /usr/local/lib/ && \ + ln -s /usr/local/libtool/2_4_6/lib/libltdl.la /usr/local/lib/ && \ + ln -s /usr/local/libtool/2_4_6/lib/libltdl.so /usr/local/lib/ && \ + ln -s /usr/local/libtool/2_4_6/lib/libltdl.so.7 /usr/local/lib/ && \ + ln -s /usr/local/libtool/2_4_6/lib/libltdl.so.7.3.1 /usr/local/lib/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/libtool.m4 /usr/local/share/aclocal/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/ltargz.m4 /usr/local/share/aclocal/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/ltdl.m4 /usr/local/share/aclocal/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/lt~obsolete.m4 /usr/local/share/aclocal/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/ltoptions.m4 /usr/local/share/aclocal/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/ltsugar.m4 /usr/local/share/aclocal/ && \ + ln -s /usr/local/libtool/2_4_6/share/aclocal/ltversion.m4 /usr/local/share/aclocal/ + +# echo /usr/local/lib > /etc/ld.so.conf.d/usr_local_lib.conf +# ldconfig +# ldconfig -v + +FROM base_build AS vcpkg_build + +# Build Tools - Mono --- +RUN yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ && \ + yum clean all && \ + yum makecache && \ + rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \ + yum install -y mono-complete && \ + yum -y clean all && rm -rf /var/cache + +ARG NUGET_MODE=readwrite +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,${NUGET_MODE}" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +COPY . /hpcc-dev/vcpkg + +WORKDIR /hpcc-dev/vcpkg + +RUN ./bootstrap-vcpkg.sh + +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 mkdir /hpcc-dev/build +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --x-install-root=/hpcc-dev/build/vcpkg_installed \ + --triplet=x64-centos-7-dynamic +# ./vcpkg install --x-abi-tools-use-exact-versions --x-install-root=/hpcc-dev/build/vcpkg_installed --triplet=x64-centos-7-dynamic + +RUN mkdir -p /hpcc-dev/tools/cmake +RUN cp -r $(dirname $(dirname `./vcpkg fetch cmake | tail -n 1`))/* /hpcc-dev/tools/cmake +RUN mkdir -p /hpcc-dev/tools/ninja +RUN cp -r $(dirname `./vcpkg fetch ninja | tail -n 1`)/* /hpcc-dev/tools/ninja +RUN mkdir -p /hpcc-dev/tools/node +RUN cp -r $(dirname $(dirname `./vcpkg fetch node | tail -n 1`))/* /hpcc-dev/tools/node + +FROM base_build + +RUN yum makecache && yum install -y \ + epel-release \ + java-11-openjdk-devel \ + python3-devel \ + wget && \ + yum update -y && yum install -y \ + ccache \ + R-core-devel && \ + yum -y clean all && rm -rf /var/cache + +ENV Rcpp_package=Rcpp_0.12.19.tar.gz +ENV RInside_package=RInside_0.2.12.tar.gz + +RUN wget https://cran.r-project.org/src/contrib/Archive/Rcpp/${Rcpp_package} && \ + wget https://cran.r-project.org/src/contrib/Archive/RInside/${RInside_package} && \ + R CMD INSTALL ${Rcpp_package} ${RInside_package} && \ + rm -f ${Rcpp_package} ${RInside_package} + +WORKDIR /hpcc-dev + +COPY --from=vcpkg_build /hpcc-dev/build/vcpkg_installed /hpcc-dev/vcpkg_installed +COPY --from=vcpkg_build /hpcc-dev/tools /hpcc-dev/tools + +RUN cp -rs /hpcc-dev/tools/cmake/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/cmake/share /usr/local/ && \ + ln -s /hpcc-dev/tools/ninja/ninja /usr/local/bin/ninja && \ + cp -rs /hpcc-dev/tools/node/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/include /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/lib /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/share /usr/local/ + +ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] diff --git a/dockerfiles/centos-8.dockerfile b/dockerfiles/centos-8.dockerfile new file mode 100644 index 00000000000000..f20145e04dc95f --- /dev/null +++ b/dockerfiles/centos-8.dockerfile @@ -0,0 +1,102 @@ +FROM tgagor/centos-stream:stream8 AS base_build + +RUN yum update -y && yum install -y dnf-plugins-core && \ + dnf config-manager --set-enabled powertools && \ + yum group install -y "Development Tools" && yum install -y \ + autoconf \ + autoconf-archive \ + automake \ + curl \ + git \ + libtool \ + perl-IPC-Cmd \ + python3 \ + tar \ + unzip \ + yum-utils \ + zip && \ + yum -y clean all && rm -rf /var/cache + +RUN yum install -y gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils gcc-toolset-12-annobin-annocheck gcc-toolset-12-annobin-plugin-gcc + +RUN echo "source /opt/rh/gcc-toolset-12/enable" >> /etc/bashrc +SHELL ["/bin/bash", "--login", "-c"] + +FROM base_build AS vcpkg_build + +# Build Tools - Mono --- +RUN yum-config-manager --add-repo http://download.mono-project.com/repo/centos/ && \ + yum clean all && \ + yum makecache && \ + rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \ + dnf config-manager --add-repo https://download.mono-project.com/repo/centos8-stable.repo && \ + yum install -y mono-complete && \ + yum -y clean all && rm -rf /var/cache + +ARG NUGET_MODE=readwrite +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,${NUGET_MODE}" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +COPY . /hpcc-dev/vcpkg + +WORKDIR /hpcc-dev/vcpkg + +RUN ./bootstrap-vcpkg.sh + +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 mkdir /hpcc-dev/build +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --x-install-root=/hpcc-dev/build/vcpkg_installed \ + --triplet=x64-linux-dynamic +# ./vcpkg install --x-abi-tools-use-exact-versions --x-install-root=/hpcc-dev/build/vcpkg_installed --triplet=x64-linux-dynamic + +RUN mkdir -p /hpcc-dev/tools/cmake +RUN cp -r $(dirname $(dirname `./vcpkg fetch cmake | tail -n 1`))/* /hpcc-dev/tools/cmake +RUN mkdir -p /hpcc-dev/tools/ninja +RUN cp -r $(dirname `./vcpkg fetch ninja | tail -n 1`)/* /hpcc-dev/tools/ninja +RUN mkdir -p /hpcc-dev/tools/node +RUN cp -r $(dirname $(dirname `./vcpkg fetch node | tail -n 1`))/* /hpcc-dev/tools/node + +FROM base_build + +RUN yum remove -y python3.11 java-1.* && yum install -y \ + java-11-openjdk-devel \ + python3-devel \ + epel-release && \ + yum update -y && yum install -y \ + ccache \ + R-core-devel \ + R-Rcpp-devel \ + R-RInside-devel && \ + yum -y clean all && rm -rf /var/cache + +WORKDIR /hpcc-dev + +COPY --from=vcpkg_build /hpcc-dev/build/vcpkg_installed /hpcc-dev/vcpkg_installed +COPY --from=vcpkg_build /hpcc-dev/tools /hpcc-dev/tools + +RUN cp -rs /hpcc-dev/tools/cmake/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/cmake/share /usr/local/ && \ + ln -s /hpcc-dev/tools/ninja/ninja /usr/local/bin/ninja && \ + cp -rs /hpcc-dev/tools/node/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/include /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/lib /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/share /usr/local/ + +ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] diff --git a/dockerfiles/rockylinux-8.dockerfile b/dockerfiles/rockylinux-8.dockerfile new file mode 100644 index 00000000000000..b7d059711feee1 --- /dev/null +++ b/dockerfiles/rockylinux-8.dockerfile @@ -0,0 +1,103 @@ +FROM rockylinux:8 AS base_build + +RUN dnf install -y 'dnf-command(config-manager)' && \ + dnf config-manager --set-enabled powertools && \ + dnf update -y && \ + dnf install -y --allowerasing \ + autoconf \ + autoconf-archive \ + automake \ + bison \ + curl \ + flex \ + git \ + libtool \ + perl-IPC-Cmd \ + python3 \ + tar \ + unzip \ + zip && \ + dnf clean all + +RUN dnf install -y gcc-toolset-12-gcc gcc-toolset-12-gcc-c++ gcc-toolset-12-binutils gcc-toolset-12-annobin-annocheck gcc-toolset-12-annobin-plugin-gcc + +RUN echo "source /opt/rh/gcc-toolset-12/enable" >> /etc/bashrc +SHELL ["/bin/bash", "--login", "-c"] + +FROM base_build AS vcpkg_build + +# Build Tools - Mono --- +RUN dnf install -y 'dnf-command(config-manager)' +RUN rpmkeys --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF" && \ + dnf config-manager --add-repo http://download.mono-project.com/repo/centos8-stable/ && \ + dnf clean all && \ + dnf makecache && \ + dnf install -y mono-complete + +ARG NUGET_MODE=readwrite +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,${NUGET_MODE}" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +COPY . /hpcc-dev/vcpkg + +WORKDIR /hpcc-dev/vcpkg + +RUN ./bootstrap-vcpkg.sh + +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 mkdir /hpcc-dev/build +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --x-install-root=/hpcc-dev/build/vcpkg_installed \ + --triplet=x64-linux-dynamic +# ./vcpkg install --x-abi-tools-use-exact-versions --x-install-root=/hpcc-dev/build/vcpkg_installed --triplet=x64-linux-dynamic + +RUN mkdir -p /hpcc-dev/tools/cmake +RUN cp -r $(dirname $(dirname `./vcpkg fetch cmake | tail -n 1`))/* /hpcc-dev/tools/cmake +RUN mkdir -p /hpcc-dev/tools/ninja +RUN cp -r $(dirname `./vcpkg fetch ninja | tail -n 1`)/* /hpcc-dev/tools/ninja +RUN mkdir -p /hpcc-dev/tools/node +RUN cp -r $(dirname $(dirname `./vcpkg fetch node | tail -n 1`))/* /hpcc-dev/tools/node + +FROM base_build + +RUN yum remove -y python3.11 java-1.* && yum install -y \ + java-11-openjdk-devel \ + python3-devel \ + epel-release && \ + yum update -y && yum install -y \ + ccache \ + R-core-devel \ + R-Rcpp-devel \ + R-RInside-devel && \ + yum -y clean all && rm -rf /var/cache + +WORKDIR /hpcc-dev + +COPY --from=vcpkg_build /hpcc-dev/build/vcpkg_installed /hpcc-dev/vcpkg_installed +COPY --from=vcpkg_build /hpcc-dev/tools /hpcc-dev/tools + +RUN cp -rs /hpcc-dev/tools/cmake/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/cmake/share /usr/local/ && \ + ln -s /hpcc-dev/tools/ninja/ninja /usr/local/bin/ninja && \ + cp -rs /hpcc-dev/tools/node/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/include /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/lib /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/share /usr/local/ + +ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] diff --git a/dockerfiles/ubuntu-20.04.dockerfile b/dockerfiles/ubuntu-20.04.dockerfile new file mode 100644 index 00000000000000..058d1cba10d96f --- /dev/null +++ b/dockerfiles/ubuntu-20.04.dockerfile @@ -0,0 +1,105 @@ +FROM ubuntu:20.04 AS base_build + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends \ + apt-transport-https \ + autoconf \ + autoconf-archive \ + automake \ + autotools-dev \ + binutils-dev \ + bison \ + build-essential \ + ca-certificates \ + curl \ + dirmngr \ + flex \ + git \ + gnupg \ + groff-base \ + libtool \ + pkg-config \ + software-properties-common \ + tar \ + unzip \ + uuid-dev \ + zip + +FROM base_build AS vcpkg_build + +# Build Tools - Mono --- +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-get update +RUN apt-get install -y mono-complete + +ARG NUGET_MODE=readwrite +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,${NUGET_MODE}" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +COPY . /hpcc-dev/vcpkg + +WORKDIR /hpcc-dev/vcpkg + +RUN ./bootstrap-vcpkg.sh + +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 mkdir /hpcc-dev/build +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --x-install-root=/hpcc-dev/build/vcpkg_installed \ + --triplet=x64-linux-dynamic +# ./vcpkg install --x-abi-tools-use-exact-versions --triplet=x64-linux-dynamic --x-install-root=/hpcc-dev/build/vcpkg_installed + +RUN mkdir -p /hpcc-dev/tools/cmake +RUN cp -r $(dirname $(dirname `./vcpkg fetch cmake | tail -n 1`))/* /hpcc-dev/tools/cmake +RUN mkdir -p /hpcc-dev/tools/ninja +RUN cp -r $(dirname `./vcpkg fetch ninja | tail -n 1`)/* /hpcc-dev/tools/ninja +RUN mkdir -p /hpcc-dev/tools/node +RUN cp -r $(dirname $(dirname `./vcpkg fetch node | tail -n 1`))/* /hpcc-dev/tools/node + +FROM base_build + +ENV RInside_package=RInside_0.2.14.tar.gz + +RUN apt-get update && apt-get install --no-install-recommends -y \ + ccache \ + default-jdk \ + python3-dev \ + wget \ + r-base \ + r-cran-rcpp && \ + wget https://cran.r-project.org/src/contrib/Archive/RInside/${RInside_package} && \ + R CMD INSTALL ${RInside_package} && \ + rm -f ${RInside_package} + +WORKDIR /hpcc-dev + +COPY --from=vcpkg_build /hpcc-dev/build/vcpkg_installed /hpcc-dev/vcpkg_installed +COPY --from=vcpkg_build /hpcc-dev/tools /hpcc-dev/tools + +RUN cp -rs /hpcc-dev/tools/cmake/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/cmake/share /usr/local/ && \ + ln -s /hpcc-dev/tools/ninja/ninja /usr/local/bin/ninja && \ + cp -rs /hpcc-dev/tools/node/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/include /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/lib /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/share /usr/local/ + +ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] diff --git a/dockerfiles/ubuntu-22.04.dockerfile b/dockerfiles/ubuntu-22.04.dockerfile new file mode 100644 index 00000000000000..44a7e8d7d4937b --- /dev/null +++ b/dockerfiles/ubuntu-22.04.dockerfile @@ -0,0 +1,106 @@ +FROM ubuntu:22.04 AS base_build + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends \ + apt-transport-https \ + autoconf \ + autoconf-archive \ + automake \ + autotools-dev \ + binutils-dev \ + bison \ + build-essential \ + ca-certificates \ + curl \ + dirmngr \ + flex \ + git \ + gnupg \ + groff-base \ + libtool \ + pkg-config \ + software-properties-common \ + tar \ + unzip \ + uuid-dev \ + zip + +FROM base_build AS vcpkg_build + +# Build Tools - Mono --- +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-get update +RUN apt-get install -y mono-complete + +ARG NUGET_MODE=readwrite +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,${NUGET_MODE}" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +COPY . /hpcc-dev/vcpkg + +WORKDIR /hpcc-dev/vcpkg + +RUN ./bootstrap-vcpkg.sh + +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 mkdir /hpcc-dev/build +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --x-install-root=/hpcc-dev/build/vcpkg_installed \ + --triplet=x64-linux-dynamic +# ./vcpkg install --x-abi-tools-use-exact-versions --triplet=x64-linux-dynamic --x-install-root=/hpcc-dev/build/vcpkg_installed + +RUN mkdir -p /hpcc-dev/tools/cmake +RUN cp -r $(dirname $(dirname `./vcpkg fetch cmake | tail -n 1`))/* /hpcc-dev/tools/cmake +RUN mkdir -p /hpcc-dev/tools/ninja +RUN cp -r $(dirname `./vcpkg fetch ninja | tail -n 1`)/* /hpcc-dev/tools/ninja +RUN mkdir -p /hpcc-dev/tools/node +RUN cp -r $(dirname $(dirname `./vcpkg fetch node | tail -n 1`))/* /hpcc-dev/tools/node + +FROM base_build + +RUN apt-get update && apt-get install --no-install-recommends -y \ + ccache \ + default-jdk \ + ninja-build \ + python3-dev \ + rsync \ + fop \ + libsaxonb-java \ + r-base \ + r-cran-rcpp \ + r-cran-rinside \ + r-cran-inline && \ + git config --global --add safe.directory '*' + +WORKDIR /hpcc-dev + +COPY --from=vcpkg_build /hpcc-dev/build/vcpkg_installed /hpcc-dev/vcpkg_installed +COPY --from=vcpkg_build /hpcc-dev/tools /hpcc-dev/tools + +RUN cp -rs /hpcc-dev/tools/cmake/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/cmake/share /usr/local/ && \ + ln -s /hpcc-dev/tools/ninja/ninja /usr/local/bin/ninja && \ + cp -rs /hpcc-dev/tools/node/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/include /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/lib /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/share /usr/local/ + +ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] diff --git a/dockerfiles/ubuntu-24.04.dockerfile b/dockerfiles/ubuntu-24.04.dockerfile new file mode 100644 index 00000000000000..60ebc79a1366bd --- /dev/null +++ b/dockerfiles/ubuntu-24.04.dockerfile @@ -0,0 +1,103 @@ +FROM ubuntu:24.04 AS base_build + +ENV DEBIAN_FRONTEND=noninteractive + +RUN apt-get update && apt-get install -y --no-install-recommends \ + apt-transport-https \ + autoconf \ + autoconf-archive \ + automake \ + autotools-dev \ + binutils-dev \ + bison \ + build-essential \ + ca-certificates \ + curl \ + dirmngr \ + flex \ + git \ + gnupg \ + groff-base \ + libtool \ + pkg-config \ + software-properties-common \ + tar \ + unzip \ + uuid-dev \ + zip + +FROM base_build AS vcpkg_build + +# Build Tools - Mono --- +RUN apt-get install -y mono-complete + +ARG NUGET_MODE=readwrite +ENV VCPKG_BINARY_SOURCES="clear;nuget,GitHub,${NUGET_MODE}" +ENV VCPKG_NUGET_REPOSITORY=https://github.com/hpcc-systems/vcpkg + +COPY . /hpcc-dev/vcpkg + +WORKDIR /hpcc-dev/vcpkg + +RUN ./bootstrap-vcpkg.sh + +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 mkdir /hpcc-dev/build +RUN ./vcpkg install \ + --x-abi-tools-use-exact-versions \ + --x-install-root=/hpcc-dev/build/vcpkg_installed \ + --triplet=x64-linux-dynamic +# ./vcpkg install --x-abi-tools-use-exact-versions --triplet=x64-linux-dynamic --x-install-root=/hpcc-dev/build/vcpkg_installed + +RUN mkdir -p /hpcc-dev/tools/cmake +RUN cp -r $(dirname $(dirname `./vcpkg fetch cmake | tail -n 1`))/* /hpcc-dev/tools/cmake +RUN mkdir -p /hpcc-dev/tools/ninja +RUN cp -r $(dirname `./vcpkg fetch ninja | tail -n 1`)/* /hpcc-dev/tools/ninja +RUN mkdir -p /hpcc-dev/tools/node +RUN cp -r $(dirname $(dirname `./vcpkg fetch node | tail -n 1`))/* /hpcc-dev/tools/node + +FROM base_build + +RUN apt-get update && apt-get install --no-install-recommends -y \ + ccache \ + default-jdk \ + ninja-build \ + python3-dev \ + rsync \ + fop \ + libsaxonb-java \ + r-base \ + r-cran-rcpp \ + r-cran-rinside \ + r-cran-inline && \ + git config --global --add safe.directory '*' + +WORKDIR /hpcc-dev + +COPY --from=vcpkg_build /hpcc-dev/build/vcpkg_installed /hpcc-dev/vcpkg_installed +COPY --from=vcpkg_build /hpcc-dev/tools /hpcc-dev/tools + +RUN cp -rs /hpcc-dev/tools/cmake/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/cmake/share /usr/local/ && \ + ln -s /hpcc-dev/tools/ninja/ninja /usr/local/bin/ninja && \ + cp -rs /hpcc-dev/tools/node/bin /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/include /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/lib /usr/local/ && \ + cp -rs /hpcc-dev/tools/node/share /usr/local/ + +ENTRYPOINT ["/bin/bash", "--login", "-c"] + +CMD ["/bin/bash"] diff --git a/overlays/cpp-driver/cmake/Dependencies.cmake b/overlays/cpp-driver/cmake/Dependencies.cmake new file mode 100644 index 00000000000000..a33fba34d31ec9 --- /dev/null +++ b/overlays/cpp-driver/cmake/Dependencies.cmake @@ -0,0 +1,110 @@ +#------------------------ +# 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(libuv CONFIG REQUIRED) + +# Assign libuv include and libraries +set(CASS_INCLUDES ${CASS_INCLUDES} ${LIBUV_INCLUDE_DIRS}) +set(CASS_LIBS ${CASS_LIBS} $,libuv::uv_a,libuv::uv>) + +# 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) + find_package(OpenSSL REQUIRED) + + set(CASS_INCLUDES ${CASS_INCLUDES} ${OpenSSL_INCLUDE_DIR}) + set(CASS_LIBS ${CASS_LIBS} OpenSSL::SSL OpenSSL::Crypto) +endif() + +#------------------------ +# ZLIB +#------------------------ + +if(CASS_USE_ZLIB) + find_package(ZLIB REQUIRED) + + set(CASS_INCLUDES ${CASS_INCLUDES} ${ZLIB_INCLUDE_DIRS}) + set(CASS_LIBS ${CASS_LIBS} ZLIB::ZLIB) +endif() + +#------------------------ +# 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..0042a63389df0e --- /dev/null +++ b/overlays/cpp-driver/portfile.cmake @@ -0,0 +1,57 @@ +# 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) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "dynamic" CASS_BUILD_SHARED) +string(COMPARE EQUAL "${VCPKG_LIBRARY_LINKAGE}" "static" CASS_BUILD_STATIC) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + DISABLE_PARALLEL_CONFIGURE + + OPTIONS + -DCASS_BUILD_SHARED:BOOL=${CASS_BUILD_SHARED} + -DCASS_BUILD_STATIC:BOOL=${CASS_BUILD_STATIC} +) + +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..726177bc73cb99 --- /dev/null +++ b/overlays/cpp-driver/vcpkg.json @@ -0,0 +1,17 @@ +{ + "name": "cpp-driver", + "version-semver": "2.16.2", + "port-version": 1, + "homepage": "https://github.com/datastax/cpp-driver", + "description": "DataStax C/C++ Driver for Apache Cassandra® and DataStax Products.", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + "curl", + "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..f84ec1f6b37347 --- /dev/null +++ b/overlays/elasticlient/portfile.cmake @@ -0,0 +1,25 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO hpcc-systems/elasticlient + REF 822af26dd087eff1267fbb8868845a073bf2b1e3 + SHA512 4f73202b2c289924c97ac85e74c7b63ae2d21c24e8c2932bc346a480f9c61f29e47df72d366f82477cc6235b7861dac64568fead0159514c273625ebf1929cfe + 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=1 + -DCMAKE_DISABLE_FIND_PACKAGE_jsoncpp=1 +) + +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..487326b62c60a9 --- /dev/null +++ b/overlays/elasticlient/vcpkg.json @@ -0,0 +1,16 @@ +{ + "name": "elasticlient", + "version-semver": "0.2.2", + "port-version": 0, + "homepage": "https://github.com/hpcc-systems/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/libcouchbase-cxx/portfile.cmake b/overlays/libcouchbase-cxx/portfile.cmake new file mode 100644 index 00000000000000..a07a6fd9d25346 --- /dev/null +++ b/overlays/libcouchbase-cxx/portfile.cmake @@ -0,0 +1,12 @@ +set(VERSION 3.3.2) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO couchbaselabs/libcouchbase-cxx + REF 4a68d09ebdbaf001c3338176e2e95d27e1c5042e + SHA512 b0b97dc2f19641b3663d4e77a26fd14edd1602925187292d6560ffc5191444bd618e67b56b4badd22961ea1b4a1061490c053c7a8887218a28796f795ab01925 + HEAD_REF master +) + +file(INSTALL ${SOURCE_PATH}/include DESTINATION ${CURRENT_PACKAGES_DIR} FILES_MATCHING PATTERN "*.h") +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/overlays/libcouchbase-cxx/vcpkg.json b/overlays/libcouchbase-cxx/vcpkg.json new file mode 100644 index 00000000000000..e2d5b982170227 --- /dev/null +++ b/overlays/libcouchbase-cxx/vcpkg.json @@ -0,0 +1,13 @@ +{ + "name": "libcouchbase-cxx", + "version-semver": "0.0.0", + "homepage": "https://github.com/hpcc-systems/libcouchbase-cxx", + "description": "This file contains header-only C++ wrappers for libcouchbase. It is a work in progress.", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + "libcouchbase" + ] +} \ No newline at end of file diff --git a/overlays/libcouchbase/portfile.cmake b/overlays/libcouchbase/portfile.cmake new file mode 100644 index 00000000000000..c72d0dc6eb2488 --- /dev/null +++ b/overlays/libcouchbase/portfile.cmake @@ -0,0 +1,24 @@ +set(VERSION 2.9.3) + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO couchbase/libcouchbase + REF 2.9.3 + SHA512 79b842967beaec0f26244b8ea18fa588d00356e04c47c052234cb15a2b3b1b2134e9d8cad5f5c1958321ec0c762b59785d37b2ac275e80eab5693b7dd252bceb + HEAD_REF master +) + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DLCB_NO_TESTS=ON + -DLCB_NO_TOOLS=ON + -DLCB_NO_PLUGINS=ON + +) +vcpkg_cmake_install() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/overlays/libcouchbase/vcpkg.json b/overlays/libcouchbase/vcpkg.json new file mode 100644 index 00000000000000..b5589726451b4f --- /dev/null +++ b/overlays/libcouchbase/vcpkg.json @@ -0,0 +1,15 @@ +{ + "name": "libcouchbase", + "version-semver": "2.9.3", + "homepage": "https://github.com/couchbase/libcouchbase", + "description": "This is the C client library for Couchbase It communicates with the cluster and speaks the relevant protocols necessary to connect to the cluster and execute data operations.", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + "libevent", + "libuv", + "openssl" + ] +} \ No newline at end of file diff --git a/overlays/libmemcached/permissive.patch b/overlays/libmemcached/permissive.patch new file mode 100644 index 00000000000000..ae974caa42241d --- /dev/null +++ b/overlays/libmemcached/permissive.patch @@ -0,0 +1,22 @@ +diff --git a/clients/memflush.cc b/clients/memflush.cc +index 8bd0dbf..71545ea 100644 +--- a/clients/memflush.cc ++++ b/clients/memflush.cc +@@ -39,7 +39,7 @@ int main(int argc, char *argv[]) + { + options_parse(argc, argv); + +- if (opt_servers == false) ++ if (opt_servers == NULL) + { + char *temp; + +@@ -48,7 +48,7 @@ int main(int argc, char *argv[]) + opt_servers= strdup(temp); + } + +- if (opt_servers == false) ++ if (opt_servers == NULL) + { + std::cerr << "No Servers provided" << std::endl; + exit(EXIT_FAILURE); diff --git a/overlays/libmemcached/portfile.cmake b/overlays/libmemcached/portfile.cmake new file mode 100644 index 00000000000000..d4ab233d3bf91c --- /dev/null +++ b/overlays/libmemcached/portfile.cmake @@ -0,0 +1,23 @@ +set(VERSION 1.0.18) + +vcpkg_download_distfile(ARCHIVE + URLS "https://launchpad.net/libmemcached/1.0/${VERSION}/+download/libmemcached-${VERSION}.tar.gz" + FILENAME "libmemcached-${VERSION}.tar.gz" + SHA512 2d95fea63b8b6dc7ded42c3a88a54aad74d5a1d417af1247144dae4a88c3b639a3aabc0c2b66661ff69a7609a314efaaae236e10971af9c428a4bca0a0101585 +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE "${ARCHIVE}" + PATCHES + "permissive.patch" +) + +vcpkg_configure_make( + SOURCE_PATH "${SOURCE_PATH}" +) +vcpkg_install_make() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/COPYING" DESTINATION "${CURRENT_PACKAGES_DIR}/share/libmemcached" RENAME copyright) diff --git a/overlays/libmemcached/vcpkg.json b/overlays/libmemcached/vcpkg.json new file mode 100644 index 00000000000000..0b1a8b68ff2f8b --- /dev/null +++ b/overlays/libmemcached/vcpkg.json @@ -0,0 +1,12 @@ +{ + "name": "libmemcached", + "version-semver": "1.0.18", + "homepage": "http://docs.libmemcached.org/libmemcached.html", + "description": "libMemcached is an open source C/C++ client library and tools for the memcached server (http://memcached.org/). It has been designed to be light on memory usage, thread safe, and provide full access to server side methods.", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + } + ] +} \ No newline at end of file diff --git a/overlays/nlp-engine/CMakeLists.txt b/overlays/nlp-engine/CMakeLists.txt new file mode 100644 index 00000000000000..66dd00be7e80cb --- /dev/null +++ b/overlays/nlp-engine/CMakeLists.txt @@ -0,0 +1,67 @@ +cmake_minimum_required(VERSION 3.15) + +# set the project name and version +project(nlp-engine) + +set(CMAKE_CXX_STANDARD 17) + +find_package(ICU REQUIRED COMPONENTS data i18n io tu uc) + +include_directories(cs/include) +include_directories(include) +include_directories(include/Api) +include_directories(include/Api/lite) +include_directories(${ICU_INCLUDE_DIRS}) + +add_subdirectory(cs) +add_subdirectory(src) + +install(DIRECTORY "${CMAKE_SOURCE_DIR}/include" DESTINATION "." FILES_MATCHING PATTERN "*.h") + +add_definitions( -DLITE_EXPORTS ) +if(WIN32) + add_definitions( -DMSVC_VERSION=${MSVC_VERSION} -D_CRT_SECURE_NO_WARNINGS ) +else() + add_definitions( -DLINUX -Wno-write-strings -Wno-deprecated ) +endif() + +file(GLOB lite_src "lite/*.h" "lite/*.cpp") +add_library(nlp-engine SHARED ${lite_src}) +target_link_libraries(nlp-engine PRIVATE + prim + kbm + consh + words + ${ICU_LIBRARIES} +) + +target_include_directories(nlp-engine + INTERFACE + $ + $ + $ +) + +install(TARGETS nlp-engine + EXPORT nlp-engine-config + RUNTIME DESTINATION bin + ARCHIVE DESTINATION lib + LIBRARY DESTINATION lib +) + +install(EXPORT nlp-engine-config + FILE nlp-engine-config.cmake + DESTINATION share/cmake/nlp-engine +) + +install( + DIRECTORY ./analyzers + DESTINATION share/nlp-engine + COMPONENT Runtime +) + +install( + DIRECTORY ./data + DESTINATION share/nlp-engine + COMPONENT Runtime +) diff --git a/overlays/nlp-engine/portfile.cmake b/overlays/nlp-engine/portfile.cmake new file mode 100644 index 00000000000000..130a9edc7fc328 --- /dev/null +++ b/overlays/nlp-engine/portfile.cmake @@ -0,0 +1,38 @@ +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO VisualText/nlp-engine + REF v${VERSION} + SHA512 d874bb29b405efbb5f988f4c5e08d9caa0afd1a2b7ec95a3d580095a89d703511b1a9deb9cf036e9b53e0416b307ec4b911bf5dafa2f6418faf36bb80effa40e + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH ANALYZER_PATH + REPO VisualText/analyzers + REF v1.6.2 + SHA512 07479c8ba1f36c3a0bb035af7414e96ce1477ffaa8a276256fc3749d169c0bb99f9ac9ad5c9b5b0868d634644013c46643a90598dd465e4f16bbe82a47ac60fe + HEAD_REF master +) + +vcpkg_from_github( + OUT_SOURCE_PATH PARSE_EN_US_PATH + REPO VisualText/parse-en-us + REF v1.1.1 + SHA512 1aa01c0befe82b8fe415576ae992b0b60fe51b816e93fd8f45da4c5ccacc3dc87c21373ba001cf0d0c503131b4b83346e86f1522795901bbceb07c63a52d6294 + HEAD_REF master +) + +file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH}) +file(COPY "${ANALYZER_PATH}/." DESTINATION "${SOURCE_PATH}/analyzers" PATTERN "*.*") +file(COPY "${PARSE_EN_US_PATH}/." DESTINATION "${SOURCE_PATH}/analyzers/parse-en-us" PATTERN "*.*") + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" +) +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(PACKAGE_NAME "nlp-engine" CONFIG_PATH "share/cmake/nlp-engine") + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") + +file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) diff --git a/overlays/nlp-engine/vcpkg.json b/overlays/nlp-engine/vcpkg.json new file mode 100644 index 00000000000000..dd0a9866981a45 --- /dev/null +++ b/overlays/nlp-engine/vcpkg.json @@ -0,0 +1,23 @@ +{ + "name": "nlp-engine", + "version-semver": "2.8.15", + "port-version": 0, + "homepage": "https://github.com/VisualText/nlp-engine", + "description": "The NLP engine is a cross-platform text analysis tool that can be accessed through a command line executable or by calling its C++ functions from another language.", + "dependencies": [ + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + }, + { + "name": "icu", + "features": [ + "tools" + ] + } + ] +} \ No newline at end of file diff --git a/overlays/opentelemetry-cpp/add-missing-find-dependency.patch b/overlays/opentelemetry-cpp/add-missing-find-dependency.patch new file mode 100644 index 00000000000000..1f9c12d1636026 --- /dev/null +++ b/overlays/opentelemetry-cpp/add-missing-find-dependency.patch @@ -0,0 +1,13 @@ +diff --git a/cmake/opentelemetry-cpp-config.cmake.in b/cmake/opentelemetry-cpp-config.cmake.in +index adae58d..2642772 100644 +--- a/cmake/opentelemetry-cpp-config.cmake.in ++++ b/cmake/opentelemetry-cpp-config.cmake.in +@@ -69,6 +69,8 @@ set(OPENTELEMETRY_VERSION + # ############################################################################## + + find_package(Threads) ++include(CMakeFindDependencyMacro) ++find_dependency(absl) + + set_and_check(OPENTELEMETRY_CPP_INCLUDE_DIRS "@PACKAGE_INCLUDE_INSTALL_DIR@") + set_and_check(OPENTELEMETRY_CPP_LIBRARY_DIRS "@PACKAGE_CMAKE_INSTALL_LIBDIR@") diff --git a/overlays/opentelemetry-cpp/fix-nominmax-problems.patch b/overlays/opentelemetry-cpp/fix-nominmax-problems.patch new file mode 100644 index 00000000000000..7cf003711337ea --- /dev/null +++ b/overlays/opentelemetry-cpp/fix-nominmax-problems.patch @@ -0,0 +1,224 @@ +diff --git a/api/include/opentelemetry/std/span.h b/api/include/opentelemetry/std/span.h +index 2a3dc12a84..1160d54fbe 100644 +--- a/api/include/opentelemetry/std/span.h ++++ b/api/include/opentelemetry/std/span.h +@@ -60,7 +60,7 @@ OPENTELEMETRY_END_NAMESPACE + OPENTELEMETRY_BEGIN_NAMESPACE + namespace nostd + { +-constexpr std::size_t dynamic_extent = (std::numeric_limits::max()); ++constexpr std::size_t dynamic_extent = (std::numeric_limits::max)(); + + template + using span = std::span; +index 7deb369ab3..6da8bdd032 100644 +--- a/docs/cpp-ostream-exporter-design.md ++++ b/docs/cpp-ostream-exporter-design.md +@@ -154,7 +154,7 @@ public: + return sdktrace::ExportResult::kSuccess; + } + +- bool Shutdown(std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept ++ bool Shutdown(std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept + { + isShutdown = true; + return true; +diff --git a/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_record_exporter.h b/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_record_exporter.h +index 8579c99138..b72ff4f917 100644 +--- a/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_record_exporter.h ++++ b/exporters/elasticsearch/include/opentelemetry/exporters/elasticsearch/es_log_record_exporter.h +@@ -100,14 +100,14 @@ class ElasticsearchLogRecordExporter final : public opentelemetry::sdk::logs::Lo + * @return return true when all data are exported, and false when timeout + */ + bool ForceFlush( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + /** + * Shutdown this exporter. + * @param timeout The maximum time to wait for the shutdown method to return + */ + bool Shutdown( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + private: + // Stores if this exporter had its Shutdown() method called +diff --git a/exporters/elasticsearch/src/es_log_record_exporter.cc b/exporters/elasticsearch/src/es_log_record_exporter.cc +index c90072e4e4..e167faf3d9 100644 +--- a/exporters/elasticsearch/src/es_log_record_exporter.cc ++++ b/exporters/elasticsearch/src/es_log_record_exporter.cc +@@ -430,7 +430,7 @@ bool ElasticsearchLogRecordExporter::ForceFlush( + std::chrono::duration_cast(timeout); + if (timeout_steady <= std::chrono::steady_clock::duration::zero()) + { +- timeout_steady = std::chrono::steady_clock::duration::max(); ++ timeout_steady = (std::chrono::steady_clock::duration::max)(); + } + + std::unique_lock lk_cv(synchronization_data_->force_flush_cv_m); +diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h +index 7aff1e24a5..870e5a043a 100644 +--- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h ++++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_exporter.h +@@ -58,7 +58,7 @@ class OtlpGrpcExporter final : public opentelemetry::sdk::trace::SpanExporter + * @return return true when all data are exported, and false when timeout + */ + bool ForceFlush( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + /** + * Shut down the exporter. +@@ -67,7 +67,7 @@ class OtlpGrpcExporter final : public opentelemetry::sdk::trace::SpanExporter + * @return return the status of this operation + */ + bool Shutdown( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + private: + // The configuration options associated with this exporter. +diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_log_record_exporter.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_log_record_exporter.h +index 29333703b1..f1cd96888c 100644 +--- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_log_record_exporter.h ++++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_grpc_log_record_exporter.h +@@ -60,14 +60,14 @@ class OtlpGrpcLogRecordExporter : public opentelemetry::sdk::logs::LogRecordExpo + * @return return true when all data are exported, and false when timeout + */ + bool ForceFlush( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + /** + * Shutdown this exporter. + * @param timeout The maximum time to wait for the shutdown method to return. + */ + bool Shutdown( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + private: + // Configuration options for the exporter +diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter.h +index 1adbbc70b9..b5faf1a9b8 100644 +--- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter.h ++++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_exporter.h +@@ -59,7 +59,7 @@ class OPENTELEMETRY_EXPORT OtlpHttpExporter final : public opentelemetry::sdk::t + * @return return true when all data are exported, and false when timeout + */ + bool ForceFlush( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + /** + * Shut down the exporter. +@@ -68,7 +68,7 @@ class OPENTELEMETRY_EXPORT OtlpHttpExporter final : public opentelemetry::sdk::t + * @return return the status of this operation + */ + bool Shutdown( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + private: + // The configuration options associated with this exporter. +diff --git a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter.h b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter.h +index 4393345dfd..f481fdab0b 100644 +--- a/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter.h ++++ b/exporters/otlp/include/opentelemetry/exporters/otlp/otlp_http_log_record_exporter.h +@@ -58,14 +58,14 @@ class OtlpHttpLogRecordExporter final : public opentelemetry::sdk::logs::LogReco + * @return return true when all data are exported, and false when timeout + */ + bool ForceFlush( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + /** + * Shutdown this exporter. + * @param timeout The maximum time to wait for the shutdown method to return + */ + bool Shutdown( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + private: + // Configuration options for the exporter +diff --git a/exporters/otlp/src/otlp_http_client.cc b/exporters/otlp/src/otlp_http_client.cc +index 9c57a9bd83..7814199ef2 100644 +--- a/exporters/otlp/src/otlp_http_client.cc ++++ b/exporters/otlp/src/otlp_http_client.cc +@@ -782,7 +782,7 @@ bool OtlpHttpClient::ForceFlush(std::chrono::microseconds timeout) noexcept + std::chrono::duration_cast(timeout); + if (timeout_steady <= std::chrono::steady_clock::duration::zero()) + { +- timeout_steady = std::chrono::steady_clock::duration::max(); ++ timeout_steady = (std::chrono::steady_clock::duration::max)(); + } + + while (timeout_steady > std::chrono::steady_clock::duration::zero()) +diff --git a/sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h b/sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h +index e93ebf3d6b..d6a44df142 100644 +--- a/sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h ++++ b/sdk/include/opentelemetry/sdk/logs/batch_log_record_processor.h +@@ -72,7 +72,7 @@ class BatchLogRecordProcessor : public LogRecordProcessor + * NOTE: Timeout functionality not supported yet. + */ + bool ForceFlush( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + /** + * Shuts down the processor and does any cleanup required. Completely drains the buffer/queue of +@@ -82,7 +82,7 @@ class BatchLogRecordProcessor : public LogRecordProcessor + * NOTE: Timeout functionality not supported yet. + */ + bool Shutdown( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + /** + * Class destructor which invokes the Shutdown() method. +diff --git a/sdk/include/opentelemetry/sdk/logs/multi_log_record_processor.h b/sdk/include/opentelemetry/sdk/logs/multi_log_record_processor.h +index 335da7f668..8ca5cffcca 100644 +--- a/sdk/include/opentelemetry/sdk/logs/multi_log_record_processor.h ++++ b/sdk/include/opentelemetry/sdk/logs/multi_log_record_processor.h +@@ -45,7 +45,7 @@ class MultiLogRecordProcessor : public LogRecordProcessor + * @return a result code indicating whether it succeeded, failed or timed out + */ + bool ForceFlush( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + /** + * Shuts down the processor and does any cleanup required. +@@ -55,7 +55,7 @@ class MultiLogRecordProcessor : public LogRecordProcessor + * @return true if the shutdown succeeded, false otherwise + */ + bool Shutdown( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + private: + std::vector> processors_; +diff --git a/sdk/include/opentelemetry/sdk/trace/batch_span_processor.h b/sdk/include/opentelemetry/sdk/trace/batch_span_processor.h +index a748b06361..afbf4486b0 100644 +--- a/sdk/include/opentelemetry/sdk/trace/batch_span_processor.h ++++ b/sdk/include/opentelemetry/sdk/trace/batch_span_processor.h +@@ -69,7 +69,7 @@ class BatchSpanProcessor : public SpanProcessor + * NOTE: Timeout functionality not supported yet. + */ + bool ForceFlush( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + /** + * Shuts down the processor and does any cleanup required. Completely drains the buffer/queue of +@@ -79,7 +79,7 @@ class BatchSpanProcessor : public SpanProcessor + * NOTE: Timeout functionality not supported yet. + */ + bool Shutdown( +- std::chrono::microseconds timeout = std::chrono::microseconds::max()) noexcept override; ++ std::chrono::microseconds timeout = (std::chrono::microseconds::max)()) noexcept override; + + /** + * Class destructor which invokes the Shutdown() method. The Shutdown() method is supposed to be diff --git a/overlays/opentelemetry-cpp/hpcc-remove-unsafe-onfork.patch b/overlays/opentelemetry-cpp/hpcc-remove-unsafe-onfork.patch new file mode 100644 index 00000000000000..b9a0a16725a7a3 --- /dev/null +++ b/overlays/opentelemetry-cpp/hpcc-remove-unsafe-onfork.patch @@ -0,0 +1,56 @@ +diff --git a/sdk/src/common/random.cc b/sdk/src/common/random.cc +index 77b88cfa..14e94d0c 100644 +--- a/sdk/src/common/random.cc ++++ b/sdk/src/common/random.cc +@@ -13,11 +13,10 @@ namespace sdk + { + namespace common + { +-// Wraps a thread_local random number generator, but adds a fork handler so that +-// the generator will be correctly seeded after forking. +-// +-// See https://stackoverflow.com/q/51882689/4447365 and +-// https://github.com/opentracing-contrib/nginx-opentracing/issues/52 ++// Wraps a thread_local random number generator. ++// The previous fork handler is removed because it was not safe and was solving a problem that did ++// not need to be solved since there should be no logic in the child() before it calls exec(). ++ + namespace + { + class TlsRandomNumberGenerator +@@ -26,17 +25,14 @@ class TlsRandomNumberGenerator + TlsRandomNumberGenerator() noexcept + { + Seed(); +- platform::AtFork(nullptr, nullptr, OnFork); + } + +- static FastRandomNumberGenerator &engine() noexcept { return engine_; } ++ FastRandomNumberGenerator & engine() noexcept { return engine_; } + + private: +- static thread_local FastRandomNumberGenerator engine_; +- +- static void OnFork() noexcept { Seed(); } ++ FastRandomNumberGenerator engine_; + +- static void Seed() noexcept ++ void Seed() noexcept + { + std::random_device random_device; + std::seed_seq seed_seq{random_device(), random_device(), random_device(), random_device()}; +@@ -44,13 +40,12 @@ class TlsRandomNumberGenerator + } + }; + +-thread_local FastRandomNumberGenerator TlsRandomNumberGenerator::engine_{}; + } // namespace + + FastRandomNumberGenerator &Random::GetRandomNumberGenerator() noexcept + { + static thread_local TlsRandomNumberGenerator random_number_generator{}; +- return TlsRandomNumberGenerator::engine(); ++ return random_number_generator.engine(); + } + + uint64_t Random::GenerateRandom64() noexcept diff --git a/overlays/opentelemetry-cpp/portfile.cmake b/overlays/opentelemetry-cpp/portfile.cmake new file mode 100644 index 00000000000000..127a18e4df2f17 --- /dev/null +++ b/overlays/opentelemetry-cpp/portfile.cmake @@ -0,0 +1,83 @@ +if(VCPKG_TARGET_IS_WINDOWS) + vcpkg_check_linkage(ONLY_STATIC_LIBRARY) +endif() + +vcpkg_from_github( + OUT_SOURCE_PATH SOURCE_PATH + REPO open-telemetry/opentelemetry-cpp + REF "v${VERSION}" + SHA512 38a3796a5f4c28fd54cc2a5475b3a024e2e73594acbc635fccc6358bf4d93ae897fc0ce55a93d27736a08622869ccc9fe9a9ee62e3884adadb3f135c27d378ec + HEAD_REF main + PATCHES + # Missing find_dependency for Abseil + add-missing-find-dependency.patch + # Fix problems from removing NOMINMAX on Windows. Fixed in 1.14.0 + fix-nominmax-problems.patch + # HPCC-fix: Remove code that reinitialised the random number generator on fork() + hpcc-remove-unsafe-onfork.patch +) + +vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS + FEATURES + etw WITH_ETW + zipkin WITH_ZIPKIN + prometheus WITH_PROMETHEUS + elasticsearch WITH_ELASTICSEARCH + otlp-http WITH_OTLP_HTTP + otlp-grpc WITH_OTLP_GRPC + geneva WITH_GENEVA +) + +# opentelemetry-proto is a third party submodule and opentelemetry-cpp release did not pack it. +if(WITH_OTLP_GRPC OR WITH_OTLP_HTTP) + set(OTEL_PROTO_VERSION "1.0.0") + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/open-telemetry/opentelemetry-proto/archive/v${OTEL_PROTO_VERSION}.tar.gz" + FILENAME "opentelemetry-proto-${OTEL_PROTO_VERSION}.tar.gz" + SHA512 74de78304a91fe72cfcdbd87fcb19c0d6338c161d6624ce09eac0527b1b43b8a5d8790ae055e1d3d44319eaa070a506f47e740f888c91d724a0aef8b509688f0 + ) + + vcpkg_extract_source_archive(src ARCHIVE "${ARCHIVE}") + file(REMOVE_RECURSE "${SOURCE_PATH}/third_party/opentelemetry-proto") + file(COPY "${src}/." DESTINATION "${SOURCE_PATH}/third_party/opentelemetry-proto") + # Create empty .git directory to prevent opentelemetry from cloning it during build time + file(MAKE_DIRECTORY "${SOURCE_PATH}/third_party/opentelemetry-proto/.git") + list(APPEND FEATURE_OPTIONS -DCMAKE_CXX_STANDARD=14) + list(APPEND FEATURE_OPTIONS "-DgRPC_CPP_PLUGIN_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/grpc/grpc_cpp_plugin${VCPKG_HOST_EXECUTABLE_SUFFIX}") +endif() + +set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS "OFF") +if(WITH_GENEVA) +# Geneva exporters from opentelemetry-cpp-contrib are tightly coupled with opentelemetry-cpp repo, so they should be ported as a feature under opentelemetry-cpp. +# TODO: merge the opentelemetry-fluentd port to opentelemery-cpp port. + vcpkg_from_github( + OUT_SOURCE_PATH CONTRIB_SOURCE_PATH + REPO open-telemetry/opentelemetry-cpp-contrib + REF 26e5ed48d81bb03fde52848ab394605dde0fb1a8 + HEAD_REF main + SHA512 f483dc96a884450fbb17fdaf0b5514ba44546f1742c2f80f552fcb442e08fbfe399441594e95ffd2c644c20907baef83d52c326dd6d3d5eb70cf29d30b2c5a0e + ) + set(OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS "") + list(APPEND OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS "${CONTRIB_SOURCE_PATH}/exporters/geneva") +endif() + +vcpkg_cmake_configure( + SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DBUILD_TESTING=OFF + -DWITH_EXAMPLES=OFF + -DOPENTELEMETRY_INSTALL=ON + -DWITH_ABSEIL=ON + -DOPENTELEMETRY_EXTERNAL_COMPONENT_PATH="${OPENTELEMETRY_CPP_EXTERNAL_COMPONENTS}" + ${FEATURE_OPTIONS} + MAYBE_UNUSED_VARIABLES + WITH_GENEVA +) + +vcpkg_cmake_install() +vcpkg_cmake_config_fixup(CONFIG_PATH "lib/cmake/${PORT}") +vcpkg_copy_pdbs() + +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share") +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/LICENSE") diff --git a/overlays/opentelemetry-cpp/vcpkg.json b/overlays/opentelemetry-cpp/vcpkg.json new file mode 100644 index 00000000000000..dda8cae1a3c184 --- /dev/null +++ b/overlays/opentelemetry-cpp/vcpkg.json @@ -0,0 +1,62 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg-tool/main/docs/vcpkg.schema.json", + "name": "opentelemetry-cpp", + "version-semver": "1.13.0", + "port-version": 4, + "description": [ + "OpenTelemetry is a collection of tools, APIs, and SDKs.", + "You use it to instrument, generate, collect, and export telemetry data (metrics, logs, and traces) for analysis in order to understand your software's performance and behavior." + ], + "homepage": "https://github.com/open-telemetry/opentelemetry-cpp", + "license": "Apache-2.0", + "dependencies": [ + "abseil", + "nlohmann-json", + { + "name": "vcpkg-cmake", + "host": true + }, + { + "name": "vcpkg-cmake-config", + "host": true + } + ], + "features": { + "elasticsearch": { + "description": "Whether to include the Elasticsearch Client in the SDK" + }, + "etw": { + "description": "Whether to include the ETW Exporter in the SDK", + "supports": "windows" + }, + "geneva": { + "description": "Whether to include the Geneva Exporter from the opentelemetry-cpp-contrib repository" + }, + "otlp-grpc": { + "description": "Whether to include the OTLP gRPC exporter in the SDK", + "dependencies": [ + "grpc", + { + "name": "grpc", + "host": true + } + ] + }, + "otlp-http": { + "description": "Whether to include the OpenTelemetry Protocol over HTTP in the SDK", + "dependencies": [ + "curl", + "protobuf" + ] + }, + "prometheus": { + "description": "Whether to include the Prometheus Client in the SDK", + "dependencies": [ + "prometheus-cpp" + ] + }, + "zipkin": { + "description": "Whether to include the Zipkin exporter in the SDK" + } + } +} diff --git a/overlays/wasmtime-c-api/portfile.cmake b/overlays/wasmtime-c-api/portfile.cmake new file mode 100644 index 00000000000000..21c9f1cbabef9a --- /dev/null +++ b/overlays/wasmtime-c-api/portfile.cmake @@ -0,0 +1,37 @@ +if (WIN32) + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/bytecodealliance/wasmtime/releases/download/v${VERSION}/wasmtime-v${VERSION}-x86_64-windows-c-api.zip" + FILENAME "wasmtime-v${VERSION}-x86_64-windows-c-api.zip" + SHA512 4ebe734178ebc14d647ac1646f7a6aa9058fecb542e34200062c9d9a338b4e94a9c071b1bb7b148d7fc66851903769022e775833626df4c9e4ef073417aa4199 + ) +elseif (APPLE) + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/bytecodealliance/wasmtime/releases/download/v${VERSION}/wasmtime-v${VERSION}-x86_64-macos-c-api.tar.xz" + FILENAME "wasmtime-v${VERSION}-x86_64-macos-c-api.tar.xz" + SHA512 ec3c3c71bbb295c6ecda7ce5d8e9624e5fe108081f5ca21ccfd0a1095524676f45e7d401ed976e8298e903565040ec94fa8843969835bdbfe659412d866d8532 + ) +elseif (LINUX) + vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/bytecodealliance/wasmtime/releases/download/v${VERSION}/wasmtime-v${VERSION}-x86_64-linux-c-api.tar.xz" + FILENAME "wasmtime-v${VERSION}-x86_64-linux-c-api.tar.xz" + SHA512 2d100ce77f971209a99146ea6bc94f94096b7b2dbd296755f9f873f2ac2e4907dd8fb2a5eefb863ac1c633ad0ffe4ad3126e0f2952836be4a03bcb37c4e11299 + ) +endif() + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${SOURCE_PATH}/include/. DESTINATION ${CURRENT_PACKAGES_DIR}/include/wasmtime-c-api) +if (WIN32) + file(COPY ${SOURCE_PATH}/lib/. DESTINATION ${CURRENT_PACKAGES_DIR}/debug/bin) + file(COPY ${SOURCE_PATH}/lib/. DESTINATION ${CURRENT_PACKAGES_DIR}/bin) +else () + file(COPY ${SOURCE_PATH}/lib/. DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib) + file(COPY ${SOURCE_PATH}/lib/. DESTINATION ${CURRENT_PACKAGES_DIR}/lib) +endif () + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wasmtime-c-api RENAME copyright) + diff --git a/overlays/wasmtime-c-api/vcpkg.json b/overlays/wasmtime-c-api/vcpkg.json new file mode 100644 index 00000000000000..96958e6fadd290 --- /dev/null +++ b/overlays/wasmtime-c-api/vcpkg.json @@ -0,0 +1,7 @@ +{ + "name": "wasmtime-c-api", + "version-string": "13.0.0", + "description": "Wasmtime is a standalone runtime for WebAssembly, using Cranelift to JIT-compile from WebAssembly to native code.", + "homepage": "https://github.com/bytecodealliance/wasmtime", + "license": "Apache-2.0" +} \ No newline at end of file diff --git a/overlays/wasmtime-cpp-api/portfile.cmake b/overlays/wasmtime-cpp-api/portfile.cmake new file mode 100644 index 00000000000000..fd39c6bb1cefeb --- /dev/null +++ b/overlays/wasmtime-cpp-api/portfile.cmake @@ -0,0 +1,16 @@ +vcpkg_download_distfile(ARCHIVE + URLS "https://github.com/bytecodealliance/wasmtime-cpp/archive/refs/tags/v${VERSION}.tar.gz" + FILENAME "v${VERSION}.tar.gz" + SHA512 6440472084198572b2f00f455e100c9cc0f8a6c76f5f6278432756335f4a340e1af347d6a88ad2e06e0d22a5b84f240a210a9ecfcab1699c1b0fa21cedb8574d +) + +vcpkg_extract_source_archive_ex( + OUT_SOURCE_PATH SOURCE_PATH + ARCHIVE ${ARCHIVE} +) + +file(COPY ${SOURCE_PATH}/include/. DESTINATION ${CURRENT_PACKAGES_DIR}/include/wasmtime-cpp-api) + +# Handle copyright +file(INSTALL ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/wasmtime-cpp-api RENAME copyright) + diff --git a/overlays/wasmtime-cpp-api/vcpkg.json b/overlays/wasmtime-cpp-api/vcpkg.json new file mode 100644 index 00000000000000..6cda053f2b33f4 --- /dev/null +++ b/overlays/wasmtime-cpp-api/vcpkg.json @@ -0,0 +1,10 @@ +{ + "name": "wasmtime-cpp-api", + "version-string": "9.0.0", + "description": "Wasmtime is a standalone runtime for WebAssembly, using Cranelift to JIT-compile from WebAssembly to native code.", + "homepage": "https://github.com/bytecodealliance/wasmtime-cpp", + "license": "Apache-2.0", + "dependencies": [ + "wasmtime-c-api" + ] +} \ No newline at end of file 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/overlays/x64-amazonlinux-dynamic.cmake b/overlays/x64-amazonlinux-dynamic.cmake new file mode 100644 index 00000000000000..c7c785f8634fe2 --- /dev/null +++ b/overlays/x64-amazonlinux-dynamic.cmake @@ -0,0 +1,10 @@ +# Amazon Linux triplet (force unique ABI) + +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + +set(VCPKG_CMAKE_SYSTEM_NAME Linux) + +set(VCPKG_FIXUP_ELF_RPATH ON) +set(VCPKG_BUILD_TYPE release) diff --git a/overlays/x64-centos-7-dynamic.cmake b/overlays/x64-centos-7-dynamic.cmake new file mode 100644 index 00000000000000..8f4c7d9676a430 --- /dev/null +++ b/overlays/x64-centos-7-dynamic.cmake @@ -0,0 +1,10 @@ +# CentOS 7 triplet (force unique ABI) + +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + +set(VCPKG_CMAKE_SYSTEM_NAME Linux) + +set(VCPKG_FIXUP_ELF_RPATH ON) +set(VCPKG_BUILD_TYPE release) diff --git a/overlays/x64-linux-dynamic.cmake b/overlays/x64-linux-dynamic.cmake new file mode 100644 index 00000000000000..29837722f0c668 --- /dev/null +++ b/overlays/x64-linux-dynamic.cmake @@ -0,0 +1,8 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) + +set(VCPKG_CMAKE_SYSTEM_NAME Linux) + +set(VCPKG_FIXUP_ELF_RPATH ON) +set(VCPKG_BUILD_TYPE release) diff --git a/overlays/x64-windows.cmake b/overlays/x64-windows.cmake new file mode 100644 index 00000000000000..f6c40253a080c7 --- /dev/null +++ b/overlays/x64-windows.cmake @@ -0,0 +1,4 @@ +set(VCPKG_TARGET_ARCHITECTURE x64) +set(VCPKG_CRT_LINKAGE dynamic) +set(VCPKG_LIBRARY_LINKAGE dynamic) +set(VCPKG_BUILD_TYPE release) diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json new file mode 100644 index 00000000000000..8c566b7c814a0b --- /dev/null +++ b/vcpkg-configuration.json @@ -0,0 +1,14 @@ +{ + "default-registry": { + "kind": "git", + "repository": "https://github.com/microsoft/vcpkg", + "baseline": "fba75d09065fcc76a25dcf386b1d00d33f5175af" + }, + "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..11997256611a2e --- /dev/null +++ b/vcpkg.json @@ -0,0 +1,132 @@ +{ + "$schema": "https://raw.githubusercontent.com/microsoft/vcpkg/master/scripts/vcpkg.schema.json", + "name": "hpcc-platform", + "version": "9.2.0", + "dependencies": [ + "apr", + "apr-util", + { + "name": "aws-sdk-cpp", + "default-features": false, + "features": [ + "s3", + "sqs" + ] + }, + { + "name": "arrow", + "default-features": false, + "features": [ + "acero", + "dataset", + "filesystem", + "parquet" + ], + "platform": "!(windows & x86)" + }, + "azure-storage-blobs-cpp", + "azure-storage-files-shares-cpp", + "boost-circular-buffer", + "boost-property-tree", + "boost-regex", + "cpp-driver", + "cppunit", + "cpr", + "curl", + { + "name": "elasticlient", + "platform": "!windows" + }, + "h3", + "hiredis", + { + "name": "icu", + "features": [ + "tools" + ] + }, + "jsoncpp", + "jwt-cpp", + { + "name": "libarchive", + "default-features": false, + "features": [ + "bzip2" + ] + }, + "libcouchbase-cxx", + "libgit2", + { + "name": "libiconv", + "platform": "osx" + }, + { + "name": "libmemcached", + "platform": "!windows & !osx" + }, + { + "name": "libmysql", + "platform": "!(windows & x86)" + }, + "librdkafka", + "libuv", + "libxml2", + { + "name": "libxslt", + "default-features": false, + "features": [] + }, + "libyaml", + "lz4", + "minizip", + "mongo-cxx-driver", + "nlohmann-json", + "nlp-engine", + { + "name": "numactl", + "platform": "!windows & !osx" + }, + { + "name": "openblas", + "features": [ + "dynamic-arch", + "threads" + ], + "platform": "!windows" + }, + { + "name": "openblas", + "features": [ + "threads" + ], + "platform": "windows" + }, + { + "name": "openldap", + "platform": "!windows" + }, + "openssl", + { + "name": "opentelemetry-cpp", + "default-features": false, + "features": [ + "otlp-http", + "otlp-grpc" + ] + }, + "pcre2", + { + "name": "python3", + "platform": "windows" + }, + "rapidjson", + "sqlite3", + "tbb", + "wasmtime-cpp-api", + { + "name": "winflexbison", + "platform": "windows" + }, + "zlib" + ] +} \ No newline at end of file