This is an automated email from the ASF dual-hosted git repository.

yuanzhou pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-gluten.git


The following commit(s) were added to refs/heads/main by this push:
     new c3e5a634b1 [GLUTEN-10926][VL] Add GCC-13 image for CI (#10993)
c3e5a634b1 is described below

commit c3e5a634b1f6ab2350bedee3961bf15c94146f16
Author: Yuan <[email protected]>
AuthorDate: Fri Nov 7 23:08:45 2025 +0000

    [GLUTEN-10926][VL] Add GCC-13 image for CI (#10993)
    
    Velox community is trying to upgrade to GCC-13 which has better support of 
C++-20
    facebookincubator/velox#15236
    This patch adds the Gcc-13 image for CI. Will switch to it after Velox 
upgrade is done
    
    fixes: #10926
    
    ---------
    
    Signed-off-by: Yuan <[email protected]>
---
 .github/workflows/docker_image.yml                 |  80 ++++++++-
 dev/builddeps-veloxbe.sh                           |   7 +-
 dev/docker/Dockerfile.centos7-gcc13                | 194 ++++++++++++++++++++
 ...build => Dockerfile.centos7-gcc13-static-build} |  34 ++--
 dev/docker/Dockerfile.centos8-gcc13                | 197 +++++++++++++++++++++
 ...build => Dockerfile.centos8-gcc13-static-build} |  12 +-
 dev/docker/Dockerfile.centos9-dynamic-build        |   2 +-
 dev/docker/Dockerfile.centos9-static-build         |   2 +-
 dev/vcpkg/ports/azure-core-cpp/portfile.cmake      |  42 +++++
 dev/vcpkg/ports/azure-core-cpp/vcpkg.json          |  81 +++++++++
 .../0003-Fix-win-unicode-paths.patch               |  62 +++++++
 dev/vcpkg/ports/gettext-libintl/android.patch      |  12 ++
 dev/vcpkg/ports/gettext-libintl/bashify.cmake      |  16 ++
 dev/vcpkg/ports/gettext-libintl/portfile.cmake     | 123 +++++++++++++
 dev/vcpkg/ports/gettext-libintl/usage              |   4 +
 dev/vcpkg/ports/gettext-libintl/uwp.patch          |  72 ++++++++
 .../gettext-libintl/vcpkg-cmake-wrapper.cmake      |  14 ++
 dev/vcpkg/ports/gettext-libintl/vcpkg.json         |  15 ++
 .../ports/gettext/0003-Fix-win-unicode-paths.patch |  62 +++++++
 dev/vcpkg/ports/gettext/android.patch              |  12 ++
 dev/vcpkg/ports/gettext/bashify.cmake              |  16 ++
 dev/vcpkg/ports/gettext/install-autopoint.cmake    |  48 +++++
 dev/vcpkg/ports/gettext/macosx-libs.patch          |  13 ++
 .../ports/gettext/parallel-gettext-tools.patch     |  25 +++
 dev/vcpkg/ports/gettext/portfile.cmake             | 197 +++++++++++++++++++++
 dev/vcpkg/ports/gettext/rel_path.patch             |  31 ++++
 dev/vcpkg/ports/gettext/subdirs.patch              | 115 ++++++++++++
 dev/vcpkg/ports/gettext/uwp.patch                  |  72 ++++++++
 dev/vcpkg/ports/gettext/vcpkg-port-config.cmake    |   6 +
 dev/vcpkg/ports/gettext/vcpkg.json                 |  25 +++
 dev/vcpkg/ports/gettext/win-gethostname.patch      |  45 +++++
 dev/vcpkg/ports/liblzma/build-tools.patch          |  19 ++
 dev/vcpkg/ports/liblzma/portfile.cmake             |  86 +++++++++
 dev/vcpkg/ports/liblzma/usage                      |   9 +
 dev/vcpkg/ports/liblzma/vcpkg-cmake-wrapper.cmake  |  64 +++++++
 dev/vcpkg/ports/liblzma/vcpkg.json                 |  22 +++
 dev/vcpkg/ports/liblzma/win_output_name.patch      |  19 ++
 dev/vcpkg/triplets/x64-linux-avx.cmake             |   5 +
 dev/vcpkg/vcpkg.json                               |   1 +
 39 files changed, 1830 insertions(+), 31 deletions(-)

diff --git a/.github/workflows/docker_image.yml 
b/.github/workflows/docker_image.yml
index 5342cc2129..ad72a9cf25 100644
--- a/.github/workflows/docker_image.yml
+++ b/.github/workflows/docker_image.yml
@@ -22,12 +22,8 @@ on:
     paths:
       - '.github/workflows/docker_image.yml'
       - '.github/workflows/util/install-spark-resources.sh'
-      - 'dev/docker/Dockerfile.centos7-static-build'
-      - 'dev/docker/Dockerfile.centos8-static-build'
-      - 'dev/docker/Dockerfile.centos9-static-build'
-      - 'dev/docker/Dockerfile.centos8-dynamic-build'
-      - 'dev/docker/Dockerfile.centos9-dynamic-build'
-      - 'dev/docker/cudf/Dockerfile'
+      - 'dev/docker/*'
+      - 'dev/docker/cudf/*'
   schedule:
     - cron: '0 20 * * 0'
 
@@ -60,6 +56,31 @@ jobs:
           push: true
           tags: ${{ env.DOCKERHUB_REPO }}:vcpkg-centos-7
 
+  build-vcpkg-centos-7-gcc13:
+    if: ${{ startsWith(github.repository, 'apache/') }}
+    runs-on: ubuntu-latest
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v4
+
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3
+
+      - name: Login to Docker Hub
+        uses: docker/login-action@v2
+        with:
+          username: ${{ secrets.DOCKERHUB_USER }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+      - name: Build and push Docker image
+        uses: docker/build-push-action@v6
+        with:
+          context: .
+          file: dev/docker/Dockerfile.centos7-gcc13-static-build
+          push: true
+          tags: ${{ env.DOCKERHUB_REPO }}:vcpkg-centos-7-gcc13
+
   build-centos-9-jdk8-cudf:
     if: ${{ startsWith(github.repository, 'apache/') }}
     runs-on: ubuntu-22.04
@@ -133,10 +154,52 @@ jobs:
           digest="${{ steps.build.outputs.digest }}"
           touch "${{ runner.temp }}/digests/${digest#sha256:}"
 
+  build-vcpkg-centos-8-gcc13:
+    if: ${{ startsWith(github.repository, 'apache/') }}
+    runs-on: ${{ matrix.os }}
+    strategy:
+      matrix:
+        os: [ ubuntu-latest ] #TODO: adding arm back
+
+    steps:
+      - name: Checkout repository
+        uses: actions/checkout@v2
+
+      - name: Docker meta
+        id: meta
+        uses: docker/metadata-action@v5
+        with:
+          images: ${{ env.DOCKERHUB_REPO }}
+          tags: vcpkg-centos-8-gcc13
+
+      - name: Set up Docker Buildx
+        uses: docker/setup-buildx-action@v3
+
+      - name: Login to Docker Hub
+        uses: docker/login-action@v2
+        with:
+          username: ${{ secrets.DOCKERHUB_USER }}
+          password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+      - name: Build and push by digest
+        id: build
+        uses: docker/build-push-action@v6
+        with:
+          context: .
+          file: dev/docker/Dockerfile.centos8-gcc13-static-build
+          labels: ${{ steps.meta.outputs.labels }}
+          outputs: type=image,"name=${{ env.DOCKERHUB_REPO 
}}",push-by-digest=true,push=true
+
+      - name: Export digest
+        run: |
+          mkdir -p ${{ runner.temp }}/digests
+          digest="${{ steps.build.outputs.digest }}"
+          touch "${{ runner.temp }}/digests/${digest#sha256:}"
+
       - name: Upload digest
         uses: actions/upload-artifact@v4
         with:
-          name: digests-vcpkg-centos-8-${{ matrix.os }}
+          name: digests-vcpkg-centos-8-gcc13-${{ matrix.os }}
           path: ${{ runner.temp }}/digests/*
           if-no-files-found: error
           retention-days: 1
@@ -322,9 +385,10 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        digests: [ vcpkg-centos-8, vcpkg-centos-9, centos-8-jdk8, 
centos-8-jdk11, centos-8-jdk17, centos-9-jdk8, centos-9-jdk11, centos-9-jdk17 ]
+        digests: [ vcpkg-centos-8, vcpkg-centos-8-gcc13, vcpkg-centos-9, 
centos-8-jdk8, centos-8-jdk11, centos-8-jdk17, centos-9-jdk8, centos-9-jdk11, 
centos-9-jdk17 ]
     needs:
       - build-vcpkg-centos-8
+      - build-vcpkg-centos-8-gcc13
       - build-vcpkg-centos-9
       - build-centos-8
       - build-centos-9
diff --git a/dev/builddeps-veloxbe.sh b/dev/builddeps-veloxbe.sh
index 7f0c3ee6b4..61202df476 100755
--- a/dev/builddeps-veloxbe.sh
+++ b/dev/builddeps-veloxbe.sh
@@ -207,7 +207,12 @@ concat_velox_param
 
 function build_arrow {
   if [ ! -d "$VELOX_HOME" ]; then
-    get_velox && setup_dependencies_arrow
+    get_velox
+    if [ -z "${GLUTEN_VCPKG_ENABLED:-}" ] && [ $RUN_SETUP_SCRIPT == "ON" ]; 
then
+      setup_dependencies
+    else
+      setup_dependencies_arrow
+    fi
   fi
   cd $GLUTEN_DIR/dev
   source ./build-arrow.sh
diff --git a/dev/docker/Dockerfile.centos7-gcc13 
b/dev/docker/Dockerfile.centos7-gcc13
new file mode 100644
index 0000000000..0eeb9545f7
--- /dev/null
+++ b/dev/docker/Dockerfile.centos7-gcc13
@@ -0,0 +1,194 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# copied from https://github.com/jeromerobert/centos7-gcc13
+FROM centos:7 as base0
+
+FROM base0 as base
+RUN /usr/bin/sed -i -e "s|mirrorlist=|#mirrorlist=|g" 
/etc/yum.repos.d/CentOS-*; sed -i -e 
"s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" 
/etc/yum.repos.d/CentOS-*;
+
+
+# Git
+FROM base as git
+RUN curl -kLO 
https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.42.0.tar.xz
+RUN sha256sum *.tar.xz
+RUN echo "3278210e9fd2994b8484dd7e3ddd9ea8b940ef52170cdb606daa94d887c93b0d " 
*.tar.* | sha256sum -c -
+RUN tar xf *.tar.xz
+WORKDIR git-2.42.0
+RUN yum -y install gcc make zlib-devel gettext libcurl-devel
+RUN ./configure --prefix=/usr/local
+RUN make -j $(nproc)
+RUN make NO_INSTALL_HARDLINKS=YesPlease install
+
+# Binutils
+FROM base as binutils
+RUN curl -LO https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.xz
+RUN sha256sum binutils*.tar.*
+RUN echo "ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450 " 
binutils*.tar.* | sha256sum -c -
+RUN tar xf binutils*.tar.*
+WORKDIR build-binutils
+RUN yum -y install gcc-c++ make zlib-devel gettext bison texinfo
+RUN ../binutils*/configure
+RUN make -j$(nproc)
+RUN make install
+
+# GMP
+FROM base as gmp
+RUN curl -LO https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz
+RUN sha256sum gmp*.tar.*
+RUN echo "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2 " 
gmp*.tar.* | sha256sum -c -
+RUN tar xf gmp*.tar.*
+WORKDIR build-gmp
+RUN yum -y install gcc make m4
+RUN ../gmp*/configure
+RUN make -j$(nproc)
+RUN make install
+
+# mpfr
+FROM base as mpfr
+RUN curl -LO https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.0.tar.xz
+RUN sha256sum mpfr*.tar.*
+RUN echo "06a378df13501248c1b2db5aa977a2c8126ae849a9d9b7be2546fb4a9c26d993 " 
mpfr*.tar.* | sha256sum -c -
+RUN tar xf mpfr*.tar.*
+WORKDIR build-mpfr
+RUN yum -y install gcc make
+COPY --from=gmp /usr/local/ /usr/local/
+RUN ../mpfr*/configure
+RUN make -j$(nproc)
+RUN before=$(find /usr/local -type f ; find /usr/local -type l ; find 
/usr/local -type d -empty) ; \
+    make install ; rm -rf $before
+
+# mpc
+FROM base as mpc
+RUN curl -LO https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz
+RUN sha256sum mpc*.tar.*
+RUN echo "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8 " 
mpc*.tar.* | sha256sum -c -
+RUN tar xf mpc*.tar.*
+WORKDIR build-mpc
+RUN yum -y install gcc make
+COPY --from=mpfr /usr/local/ /usr/local/
+COPY --from=gmp /usr/local/ /usr/local/
+RUN ../mpc*/configure
+RUN make -j$(nproc)
+RUN before=$(find /usr/local -type f ; find /usr/local -type l ; find 
/usr/local -type d -empty) ; \
+    make install ; rm -rf $before
+
+# OpenSSL
+FROM base as openssl
+RUN curl -LO https://www.openssl.org/source/openssl-3.0.10.tar.gz
+RUN sha256sum openssl*.tar.gz
+RUN echo "1761d4f5b13a1028b9b6f3d4b8e17feb0cedc9370f6afe61d7193d2cdce83323 " 
openssl*.tar.gz | sha256sum -c -
+RUN tar xf openssl*.tar.gz
+WORKDIR openssl-3.0.10
+RUN yum -y install gcc make perl-IPC-Cmd
+RUN ./config --prefix=/usr/local --openssldir=/usr/local shared
+RUN make -j$(nproc)
+RUN make install_sw install_ssldirs
+
+# cmake
+FROM base as cmake
+RUN curl -kLO 
https://github.com/Kitware/CMake/releases/download/v3.27.4/cmake-3.27.4.tar.gz
+RUN sha256sum cmake-*.tar.gz
+RUN echo "0a905ca8635ca81aa152e123bdde7e54cbe764fdd9a70d62af44cad8b92967af " 
cmake-*.tar.gz | sha256sum -c -
+RUN tar xf *.tar.gz
+WORKDIR cmake-3.27.4
+RUN yum -y install gcc-c++ make
+COPY --from=openssl /usr/local/ /usr/local/
+RUN ./bootstrap --parallel=$(nproc)
+RUN make -j$(nproc)
+RUN before=$(find /usr/local -type f ; find /usr/local -type l ; find 
/usr/local -type d -empty) ; \
+    make install ; rm -rf $before
+
+# Autotools
+FROM base as autotools
+RUN curl -kLO https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz
+RUN curl -kLO https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz
+RUN curl -kLO https://ftp.gnu.org/gnu/libtool/libtool-2.4.7.tar.xz
+RUN sha256sum *.tar.*
+RUN echo "f14c83cfebcc9427f2c3cea7258bd90df972d92eb26752da4ddad81c87a0faa4 " 
autoconf*.tar.* | sha256sum -c -
+RUN echo "f01d58cd6d9d77fbdca9eb4bbd5ead1988228fdb73d6f7a201f5f8d6b118b469 " 
automake*.tar.* | sha256sum -c -
+RUN echo "4f7f217f057ce655ff22559ad221a0fd8ef84ad1fc5fcb6990cecc333aa1635d " 
libtool*.tar.* | sha256sum -c -
+RUN tar xf autoconf*.tar.*
+RUN tar xf automake*.tar.*
+RUN tar xf libtool*.tar.*
+RUN yum -y install m4 make perl-Data-Dumper perl-Thread-Queue gcc
+WORKDIR /autoconf-2.71
+RUN ./configure
+RUN make -j$(nproc)
+RUN make install
+WORKDIR /automake-1.16.5
+RUN ./configure
+RUN make -j$(nproc)
+RUN make install
+WORKDIR /libtool-2.4.7
+RUN ./configure
+RUN make -j$(nproc)
+RUN make install
+
+#hwloc
+FROM base as hwloc
+RUN curl -kLO 
https://download.open-mpi.org/release/hwloc/v2.9/hwloc-2.9.2.tar.gz
+RUN sha256sum *.tar.*
+RUN echo "ffb554d5735e0e0a19d1fd4b2b86e771d3b58b2d97f257eedacae67ade5054b3 " 
*.tar.* | sha256sum -c -
+RUN tar xf *.tar.*
+WORKDIR hwloc-2.9.2
+RUN yum -y install gcc make
+RUN ./configure
+RUN make -j$(nproc)
+RUN make install
+
+# gcc
+FROM base as gcc
+RUN curl -kLO 
https://sourceware.org/pub/gcc/releases/gcc-13.2.0/gcc-13.2.0.tar.xz
+RUN sha256sum *.tar.*
+RUN echo "e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da " 
*.tar.* | sha256sum -c -
+RUN tar xf *.tar.*
+WORKDIR build-gcc
+RUN yum -y install gcc-c++ make
+COPY --from=binutils /usr/local/ /usr/local/
+COPY --from=gmp /usr/local/ /usr/local/
+COPY --from=mpfr /usr/local/ /usr/local/
+COPY --from=mpc /usr/local/ /usr/local/
+RUN echo -e '/usr/local/lib\n/usr/local/lib64' > /etc/ld.so.conf.d/local.conf 
&& ldconfig
+# Use symlinks instead of hardlinks because hardlinks get duplicated in the 
stripping stage
+RUN sed -i 's/LN=@LN@/LN=@LN_S@/g' /gcc-*/gcc/Makefile.in
+RUN ../gcc-*/configure --enable-languages=c,c++,fortran --disable-multilib
+RUN make -j$(nproc)
+RUN before=$(find /usr/local -type f ; find /usr/local -type l) ; \
+    make install ; rm -rf $before $(find /usr/local -type d -empty)
+
+# Intermediate stage for stripping
+FROM base as stripped
+RUN yum -y install file
+COPY --from=binutils /usr/local/ /usr/local/
+COPY --from=gmp /usr/local/ /usr/local/
+COPY --from=mpfr /usr/local/ /usr/local/
+COPY --from=mpc /usr/local/ /usr/local/
+COPY --from=git /usr/local/ /usr/local/
+COPY --from=openssl /usr/local/ /usr/local/
+COPY --from=cmake /usr/local/ /usr/local/
+COPY --from=autotools /usr/local/ /usr/local/
+COPY --from=hwloc /usr/local/ /usr/local/
+COPY --from=gcc /usr/local/ /usr/local/
+RUN find /usr/local ! -name '*.o' -type f -exec sh -c "file -b {} | grep -Eq 
'^ELF.*, not stripped' && strip {}" \;
+
+# Final stage
+FROM base as final
+RUN yum install -y glibc-devel make zlib-devel swig chrpath libffi-devel 
perl-Data-Dumper bzip2 m4 \
+    perl-Thread-Queue patch mesa-libGLU-devel libXt-devel unzip libXtst 
libXrender libXi \
+    libmount-devel gettext pcre-devel
+COPY --from=stripped /usr/local /usr/local
+RUN echo -e '/usr/local/lib\n/usr/local/lib64' > /etc/ld.so.conf.d/local.conf 
&& ldconfig
+ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig
diff --git a/dev/docker/Dockerfile.centos9-static-build 
b/dev/docker/Dockerfile.centos7-gcc13-static-build
similarity index 65%
copy from dev/docker/Dockerfile.centos9-static-build
copy to dev/docker/Dockerfile.centos7-gcc13-static-build
index d50837c8ac..7704d691dc 100644
--- a/dev/docker/Dockerfile.centos9-static-build
+++ b/dev/docker/Dockerfile.centos7-gcc13-static-build
@@ -13,36 +13,40 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM quay.io/centos/centos:stream9
+FROM inteldpo/gluten:centos7_gcc13
 
-
-ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk
+ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
 ENV PATH=$JAVA_HOME/bin:$PATH
-ENV PATH=${PATH}:/usr/lib/maven/bin
 
 # An actual path used for vcpkg cache.
 ENV VCPKG_PATH=/var/cache/vcpkg
 # Set vcpkg cache path.
 ENV VCPKG_BINARY_SOURCES=clear;files,${VCPKG_PATH},readwrite
 
+
 RUN set -ex; \
-    yum update -y && yum install -y epel-release sudo dnf && yum install -y 
ccache; \
-    dnf install -y --setopt=install_weak_deps=False gcc-toolset-12; \
-    echo "check_certificate = off" >> ~/.wgetrc; \
-    yum install -y java-17-openjdk-devel patch wget git perl; \
-    dnf clean all; \
+    sed -i -e "s|mirrorlist=|#mirrorlist=|g" /etc/yum.repos.d/CentOS-* || 
true; \
+    sed -i -e 
"s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" 
/etc/yum.repos.d/CentOS-* || true; \
+    yum install -y epel-release centos-release-scl; \
+    rm /etc/yum.repos.d/CentOS-SCLo-scl.repo -f; \
+    sed -i \
+       -e 's/^mirrorlist/#mirrorlist/' \
+       -e 's/^#baseurl/baseurl/' \
+       -e 's/mirror\.centos\.org/vault.centos.org/' \
+       /etc/yum.repos.d/CentOS-SCLo-scl-rh.repo; \
+    yum install -y git patch wget sudo java-1.8.0-openjdk-devel ccache; \
     git clone --depth=1 https://github.com/apache/incubator-gluten 
/opt/gluten; \
+    echo "check_certificate = off" >> ~/.wgetrc; \
     cd /opt/gluten && bash ./dev/vcpkg/setup-build-depends.sh; \
+    yum remove gcc -y && yum clean all; \
+    yes | cp -rf /usr/share/aclocal/* /usr/local/share/aclocal/; \
     mkdir -p ${VCPKG_PATH}; \
     echo "Build arrow, then install the native libs to system paths and jar 
package to .m2/ directory."; \
-    if [ "$(uname -m)" = "aarch64" ]; then \
-        export CPU_TARGET="aarch64"; \
-        export VCPKG_FORCE_SYSTEM_BINARIES=1; \
-    fi; \
-    source /opt/rh/gcc-toolset-12/enable; \
     cd /opt/gluten; \
     bash ./dev/builddeps-veloxbe.sh --enable_vcpkg=ON --build_tests=ON 
--enable_s3=ON --enable_gcs=ON \
-                                    --enable_hdfs=ON --enable_abfs=ON  
build_arrow; \
+                                       --enable_hdfs=ON --enable_abfs=ON  
build_arrow; \
     mvn dependency:go-offline -Pbackends-velox -Piceberg -Pdelta -Pspark-3.5 
-DskipTests; \
+    dnf clean all; \
     rm -rf /opt/gluten; \
     rm -rf /root/.cache/ccache;
+    
diff --git a/dev/docker/Dockerfile.centos8-gcc13 
b/dev/docker/Dockerfile.centos8-gcc13
new file mode 100644
index 0000000000..e37a35dc67
--- /dev/null
+++ b/dev/docker/Dockerfile.centos8-gcc13
@@ -0,0 +1,197 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# copied from https://github.com/jeromerobert/centos7-gcc13
+FROM centos:8 as base0
+
+FROM base0 as base
+RUN /usr/bin/sed -i -e "s|mirrorlist=|#mirrorlist=|g" 
/etc/yum.repos.d/CentOS-*; sed -i -e 
"s|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g" 
/etc/yum.repos.d/CentOS-*;
+RUN yum update -y && yum install epel-release wget perl -y
+RUN yum -y install 
ftp://ftp.icm.edu.pl/vol/rzm5/linux-centos-vault/8.0.1905/PowerTools/aarch64/kickstart/Packages/perl-Unicode-EastAsianWidth-1.33-13.el8.noarch.rpm
 
ftp://ftp.icm.edu.pl/vol/rzm5/linux-centos-vault/8.2.2004/PowerTools/x86_64/kickstart/Packages/texinfo-6.5-6.el8.x86_64.rpm
+
+
+# Git
+FROM base as git
+RUN curl -kLO 
https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.42.0.tar.xz
+RUN sha256sum *.tar.xz
+RUN echo "3278210e9fd2994b8484dd7e3ddd9ea8b940ef52170cdb606daa94d887c93b0d " 
*.tar.* | sha256sum -c -
+RUN tar xf *.tar.xz
+WORKDIR git-2.42.0
+RUN yum -y install gcc make zlib-devel gettext libcurl-devel 
+RUN ./configure --prefix=/usr/local
+RUN make -j $(nproc)
+RUN make NO_INSTALL_HARDLINKS=YesPlease install
+
+# Binutils
+FROM base as binutils
+#RUN curl -LO https://ftp.gnu.org/gnu/binutils/binutils-2.41.tar.xz
+RUN curl -LO https://ftp.wayne.edu/gnu/binutils/binutils-2.41.tar.xz
+RUN sha256sum binutils*.tar.*
+RUN echo "ae9a5789e23459e59606e6714723f2d3ffc31c03174191ef0d015bdf06007450 " 
binutils*.tar.* | sha256sum -c -
+RUN tar xf binutils*.tar.*
+WORKDIR build-binutils
+RUN yum -y install gcc-c++ make zlib-devel gettext bison
+RUN ../binutils*/configure
+RUN make -j$(nproc)
+RUN make install
+
+# GMP
+FROM base as gmp
+RUN curl -LO https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz
+RUN sha256sum gmp*.tar.*
+RUN echo "fd4829912cddd12f84181c3451cc752be224643e87fac497b69edddadc49b4f2 " 
gmp*.tar.* | sha256sum -c -
+RUN tar xf gmp*.tar.*
+WORKDIR build-gmp
+RUN yum -y install gcc make m4
+RUN ../gmp*/configure
+RUN make -j$(nproc)
+RUN make install
+
+# mpfr
+FROM base as mpfr
+RUN curl -LO https://ftp.gnu.org/gnu/mpfr/mpfr-4.2.0.tar.xz
+RUN sha256sum mpfr*.tar.*
+RUN echo "06a378df13501248c1b2db5aa977a2c8126ae849a9d9b7be2546fb4a9c26d993 " 
mpfr*.tar.* | sha256sum -c -
+RUN tar xf mpfr*.tar.*
+WORKDIR build-mpfr
+RUN yum -y install gcc make
+COPY --from=gmp /usr/local/ /usr/local/
+RUN ../mpfr*/configure
+RUN make -j$(nproc)
+RUN before=$(find /usr/local -type f ; find /usr/local -type l ; find 
/usr/local -type d -empty) ; \
+    make install ; rm -rf $before
+
+# mpc
+FROM base as mpc
+RUN curl -LO https://ftp.gnu.org/gnu/mpc/mpc-1.3.1.tar.gz
+RUN sha256sum mpc*.tar.*
+RUN echo "ab642492f5cf882b74aa0cb730cd410a81edcdbec895183ce930e706c1c759b8 " 
mpc*.tar.* | sha256sum -c -
+RUN tar xf mpc*.tar.*
+WORKDIR build-mpc
+RUN yum -y install gcc make
+COPY --from=mpfr /usr/local/ /usr/local/
+COPY --from=gmp /usr/local/ /usr/local/
+RUN ../mpc*/configure
+RUN make -j$(nproc)
+RUN before=$(find /usr/local -type f ; find /usr/local -type l ; find 
/usr/local -type d -empty) ; \
+    make install ; rm -rf $before
+
+# OpenSSL
+FROM base as openssl
+RUN curl -LO https://www.openssl.org/source/openssl-3.0.10.tar.gz
+RUN sha256sum openssl*.tar.gz
+RUN echo "1761d4f5b13a1028b9b6f3d4b8e17feb0cedc9370f6afe61d7193d2cdce83323 " 
openssl*.tar.gz | sha256sum -c -
+RUN tar xf openssl*.tar.gz
+WORKDIR openssl-3.0.10
+RUN yum -y install gcc make perl-IPC-Cmd
+RUN ./config --prefix=/usr/local --openssldir=/usr/local shared
+RUN make -j$(nproc)
+RUN make install_sw install_ssldirs
+
+# cmake
+FROM base as cmake
+RUN curl -kLO 
https://github.com/Kitware/CMake/releases/download/v3.27.4/cmake-3.27.4.tar.gz
+RUN sha256sum cmake-*.tar.gz
+RUN echo "0a905ca8635ca81aa152e123bdde7e54cbe764fdd9a70d62af44cad8b92967af " 
cmake-*.tar.gz | sha256sum -c -
+RUN tar xf *.tar.gz
+WORKDIR cmake-3.27.4
+RUN yum -y install gcc-c++ make
+COPY --from=openssl /usr/local/ /usr/local/
+RUN ./bootstrap --parallel=$(nproc)
+RUN make -j$(nproc)
+RUN before=$(find /usr/local -type f ; find /usr/local -type l ; find 
/usr/local -type d -empty) ; \
+    make install ; rm -rf $before
+
+# Autotools
+FROM base as autotools
+RUN curl -kLO https://ftp.gnu.org/gnu/autoconf/autoconf-2.71.tar.xz
+RUN curl -kLO https://ftp.gnu.org/gnu/automake/automake-1.16.5.tar.xz
+RUN curl -kLO https://ftp.gnu.org/gnu/libtool/libtool-2.4.7.tar.xz
+RUN sha256sum *.tar.*
+RUN echo "f14c83cfebcc9427f2c3cea7258bd90df972d92eb26752da4ddad81c87a0faa4 " 
autoconf*.tar.* | sha256sum -c -
+RUN echo "f01d58cd6d9d77fbdca9eb4bbd5ead1988228fdb73d6f7a201f5f8d6b118b469 " 
automake*.tar.* | sha256sum -c -
+RUN echo "4f7f217f057ce655ff22559ad221a0fd8ef84ad1fc5fcb6990cecc333aa1635d " 
libtool*.tar.* | sha256sum -c -
+RUN tar xf autoconf*.tar.*
+RUN tar xf automake*.tar.*
+RUN tar xf libtool*.tar.*
+RUN yum -y install m4 make perl-Data-Dumper perl-Thread-Queue gcc
+WORKDIR /autoconf-2.71
+RUN ./configure
+RUN make -j$(nproc)
+RUN make install
+WORKDIR /automake-1.16.5
+RUN ./configure
+RUN make -j$(nproc)
+RUN make install
+WORKDIR /libtool-2.4.7
+RUN ./configure
+RUN make -j$(nproc)
+RUN make install
+
+#hwloc
+FROM base as hwloc
+RUN curl -kLO 
https://download.open-mpi.org/release/hwloc/v2.9/hwloc-2.9.2.tar.gz
+RUN sha256sum *.tar.*
+RUN echo "ffb554d5735e0e0a19d1fd4b2b86e771d3b58b2d97f257eedacae67ade5054b3 " 
*.tar.* | sha256sum -c -
+RUN tar xf *.tar.*
+WORKDIR hwloc-2.9.2
+RUN yum -y install gcc make
+RUN ./configure
+RUN make -j$(nproc)
+RUN make install
+
+# gcc
+FROM base as gcc
+RUN curl -kLO 
https://sourceware.org/pub/gcc/releases/gcc-13.4.0/gcc-13.4.0.tar.xz
+#RUN sha256sum *.tar.*
+#RUN echo "e275e76442a6067341a27f04c5c6b83d8613144004c0413528863dc6b5c743da " 
*.tar.* | sha256sum -c -
+RUN tar xf *.tar.*
+WORKDIR build-gcc
+RUN yum -y install gcc-c++ make
+COPY --from=binutils /usr/local/ /usr/local/
+COPY --from=gmp /usr/local/ /usr/local/
+COPY --from=mpfr /usr/local/ /usr/local/
+COPY --from=mpc /usr/local/ /usr/local/
+RUN echo -e '/usr/local/lib\n/usr/local/lib64' > /etc/ld.so.conf.d/local.conf 
&& ldconfig
+# Use symlinks instead of hardlinks because hardlinks get duplicated in the 
stripping stage
+RUN sed -i 's/LN=@LN@/LN=@LN_S@/g' /gcc-*/gcc/Makefile.in
+RUN ../gcc-*/configure --enable-languages=c,c++,fortran --disable-multilib
+RUN make -j$(nproc)
+RUN before=$(find /usr/local -type f ; find /usr/local -type l) ; \
+    make install ; rm -rf $before $(find /usr/local -type d -empty)
+
+# Intermediate stage for stripping
+FROM base as stripped
+RUN yum -y install file
+COPY --from=binutils /usr/local/ /usr/local/
+COPY --from=gmp /usr/local/ /usr/local/
+COPY --from=mpfr /usr/local/ /usr/local/
+COPY --from=mpc /usr/local/ /usr/local/
+COPY --from=git /usr/local/ /usr/local/
+COPY --from=openssl /usr/local/ /usr/local/
+COPY --from=cmake /usr/local/ /usr/local/
+COPY --from=autotools /usr/local/ /usr/local/
+COPY --from=hwloc /usr/local/ /usr/local/
+COPY --from=gcc /usr/local/ /usr/local/
+RUN find /usr/local ! -name '*.o' -type f -exec sh -c "file -b {} | grep -Eq 
'^ELF.*, not stripped' && strip {}" \;
+
+# Final stage
+FROM base as final
+RUN yum install -y glibc-devel make zlib-devel swig chrpath libffi-devel 
perl-Data-Dumper bzip2 m4 \
+    perl-Thread-Queue patch mesa-libGLU-devel libXt-devel unzip libXtst 
libXrender libXi \
+    gettext pcre-devel
+COPY --from=stripped /usr/local /usr/local
+RUN echo -e '/usr/local/lib\n/usr/local/lib64' > /etc/ld.so.conf.d/local.conf 
&& ldconfig
+ENV PKG_CONFIG_PATH=/usr/local/lib64/pkgconfig:/usr/local/lib/pkgconfig
diff --git a/dev/docker/Dockerfile.centos9-static-build 
b/dev/docker/Dockerfile.centos8-gcc13-static-build
similarity index 87%
copy from dev/docker/Dockerfile.centos9-static-build
copy to dev/docker/Dockerfile.centos8-gcc13-static-build
index d50837c8ac..c5ad38e630 100644
--- a/dev/docker/Dockerfile.centos9-static-build
+++ b/dev/docker/Dockerfile.centos8-gcc13-static-build
@@ -13,10 +13,10 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-FROM quay.io/centos/centos:stream9
+FROM inteldpo/gluten:centos8_gcc13
 
 
-ENV JAVA_HOME=/usr/lib/jvm/java-17-openjdk
+ENV JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk
 ENV PATH=$JAVA_HOME/bin:$PATH
 ENV PATH=${PATH}:/usr/lib/maven/bin
 
@@ -27,19 +27,21 @@ ENV VCPKG_BINARY_SOURCES=clear;files,${VCPKG_PATH},readwrite
 
 RUN set -ex; \
     yum update -y && yum install -y epel-release sudo dnf && yum install -y 
ccache; \
-    dnf install -y --setopt=install_weak_deps=False gcc-toolset-12; \
+    dnf install -y --setopt=install_weak_deps=False gcc-toolset-11; \
     echo "check_certificate = off" >> ~/.wgetrc; \
-    yum install -y java-17-openjdk-devel patch wget git perl; \
+    yum install -y java-1.8.0-openjdk-devel patch wget git perl; \
+    rpm -qa | grep tzdata; \
     dnf clean all; \
     git clone --depth=1 https://github.com/apache/incubator-gluten 
/opt/gluten; \
     cd /opt/gluten && bash ./dev/vcpkg/setup-build-depends.sh; \
+    yum remove gcc -y && yum clean all; \
+    yes | cp -rf /usr/share/aclocal/* /usr/local/share/aclocal/; \
     mkdir -p ${VCPKG_PATH}; \
     echo "Build arrow, then install the native libs to system paths and jar 
package to .m2/ directory."; \
     if [ "$(uname -m)" = "aarch64" ]; then \
         export CPU_TARGET="aarch64"; \
         export VCPKG_FORCE_SYSTEM_BINARIES=1; \
     fi; \
-    source /opt/rh/gcc-toolset-12/enable; \
     cd /opt/gluten; \
     bash ./dev/builddeps-veloxbe.sh --enable_vcpkg=ON --build_tests=ON 
--enable_s3=ON --enable_gcs=ON \
                                     --enable_hdfs=ON --enable_abfs=ON  
build_arrow; \
diff --git a/dev/docker/Dockerfile.centos9-dynamic-build 
b/dev/docker/Dockerfile.centos9-dynamic-build
index 230947a6ff..2a4db45e4c 100644
--- a/dev/docker/Dockerfile.centos9-dynamic-build
+++ b/dev/docker/Dockerfile.centos9-dynamic-build
@@ -27,7 +27,7 @@ ENV PATH=${PATH}:/usr/lib/maven/bin
 
 RUN set -ex; \
     yum update -y && yum install -y epel-release sudo dnf && yum install -y 
ccache; \
-    dnf install -y --setopt=install_weak_deps=False gcc-toolset-12; \
+    dnf install -y --setopt=install_weak_deps=False gcc-toolset-12 
gcc-toolset-13; \
     echo "check_certificate = off" >> ~/.wgetrc; \
     yum install -y java-${JAVA_VERSION}-openjdk-devel patch wget git perl; \
     maven_version=3.9.2; \
diff --git a/dev/docker/Dockerfile.centos9-static-build 
b/dev/docker/Dockerfile.centos9-static-build
index d50837c8ac..3e8ff26309 100644
--- a/dev/docker/Dockerfile.centos9-static-build
+++ b/dev/docker/Dockerfile.centos9-static-build
@@ -27,7 +27,7 @@ ENV VCPKG_BINARY_SOURCES=clear;files,${VCPKG_PATH},readwrite
 
 RUN set -ex; \
     yum update -y && yum install -y epel-release sudo dnf && yum install -y 
ccache; \
-    dnf install -y --setopt=install_weak_deps=False gcc-toolset-12; \
+    dnf install -y --setopt=install_weak_deps=False gcc-toolset-12 
gcc-toolset-13; \
     echo "check_certificate = off" >> ~/.wgetrc; \
     yum install -y java-17-openjdk-devel patch wget git perl; \
     dnf clean all; \
diff --git a/dev/vcpkg/ports/azure-core-cpp/portfile.cmake 
b/dev/vcpkg/ports/azure-core-cpp/portfile.cmake
new file mode 100644
index 0000000000..f4ef39f821
--- /dev/null
+++ b/dev/vcpkg/ports/azure-core-cpp/portfile.cmake
@@ -0,0 +1,42 @@
+# NOTE: All changes made to this file will get overwritten by the next port 
release.
+# Please contribute your changes to https://github.com/Azure/azure-sdk-for-cpp.
+
+vcpkg_from_github(
+    OUT_SOURCE_PATH SOURCE_PATH
+    REPO Azure/azure-sdk-for-cpp
+    REF "azure-core_${VERSION}"
+    SHA512 
e24c4d2b90fa83e108b5e87242265eea8da3be6441e8cbdaf652c417c292f38af52c23d5e1d142f8ffc99c8b3334f4c3cbc0874fb70115ae3b5197ff4f52acdd
+    HEAD_REF main
+)
+
+vcpkg_check_features(
+    OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+    FEATURES
+        curl BUILD_TRANSPORT_CURL
+        winhttp BUILD_TRANSPORT_WINHTTP
+)
+
+if(EXISTS "${SOURCE_PATH}/sdk/core/azure-core")
+  file(REMOVE_RECURSE "${SOURCE_PATH}/sdk/core/_")
+  file(REMOVE_RECURSE "${SOURCE_PATH}/sdk/_")
+  file(REMOVE_RECURSE "${SOURCE_PATH}/_")
+
+  file(RENAME "${SOURCE_PATH}/sdk/core/azure-core" "${SOURCE_PATH}/sdk/core/_")
+  file(RENAME "${SOURCE_PATH}/sdk/core" "${SOURCE_PATH}/sdk/_")
+  file(RENAME "${SOURCE_PATH}/sdk" "${SOURCE_PATH}/_")
+endif()
+
+vcpkg_cmake_configure(
+    SOURCE_PATH "${SOURCE_PATH}/_/_/_"
+    OPTIONS
+        ${FEATURE_OPTIONS}
+        -DWARNINGS_AS_ERRORS=OFF
+        -DBUILD_TESTING=OFF
+        -DNO_AUTOMATIC_TRANSPORT_BUILD=ON
+)
+
+vcpkg_cmake_install()
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
+vcpkg_cmake_config_fixup()
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+vcpkg_copy_pdbs()
diff --git a/dev/vcpkg/ports/azure-core-cpp/vcpkg.json 
b/dev/vcpkg/ports/azure-core-cpp/vcpkg.json
new file mode 100644
index 0000000000..7ff5726a75
--- /dev/null
+++ b/dev/vcpkg/ports/azure-core-cpp/vcpkg.json
@@ -0,0 +1,81 @@
+{
+  "$comment": [
+    "NOTE: All changes made to this file will get overwritten by the next port 
release.",
+    "Please contribute your changes to 
https://github.com/Azure/azure-sdk-for-cpp.";
+  ],
+  "name": "azure-core-cpp",
+  "version-semver": "1.15.0",
+  "description": [
+    "Microsoft Azure Core SDK for C++",
+    "This library provides shared primitives, abstractions, and helpers for 
modern Azure SDK client libraries written in the C++."
+  ],
+  "homepage": 
"https://github.com/Azure/azure-sdk-for-cpp/tree/main/sdk/core/azure-core";,
+  "license": "MIT",
+  "dependencies": [
+    {
+      "name": "openssl",
+      "platform": "!windows & !uwp"
+    },
+    {
+      "name": "vcpkg-cmake",
+      "host": true
+    },
+    {
+      "name": "vcpkg-cmake-config",
+      "host": true
+    }
+  ],
+  "default-features": [
+    "http"
+  ],
+  "features": {
+    "curl": {
+      "description": "Libcurl HTTP transport implementation",
+      "dependencies": [
+        {
+          "name": "azure-core-cpp",
+          "default-features": false
+        },
+        {
+          "name": "curl",
+          "default-features": false,
+          "features": [
+            "ssl"
+          ]
+        }
+      ]
+    },
+    "http": {
+      "description": "All HTTP transport implementations available on the 
platform",
+      "dependencies": [
+        {
+          "name": "azure-core-cpp",
+          "default-features": false,
+          "features": [
+            "curl"
+          ]
+        },
+        {
+          "name": "azure-core-cpp",
+          "default-features": false,
+          "features": [
+            "curl",
+            "winhttp"
+          ],
+          "platform": "windows & !uwp"
+        }
+      ]
+    },
+    "winhttp": {
+      "description": "WinHTTP HTTP transport implementation",
+      "supports": "windows & !uwp",
+      "dependencies": [
+        {
+          "name": "azure-core-cpp",
+          "default-features": false
+        },
+        "wil"
+      ]
+    }
+  }
+}
diff --git a/dev/vcpkg/ports/gettext-libintl/0003-Fix-win-unicode-paths.patch 
b/dev/vcpkg/ports/gettext-libintl/0003-Fix-win-unicode-paths.patch
new file mode 100644
index 0000000000..e15e08755f
--- /dev/null
+++ b/dev/vcpkg/ports/gettext-libintl/0003-Fix-win-unicode-paths.patch
@@ -0,0 +1,62 @@
+diff --git a/gettext-runtime/intl/loadmsgcat.c 
b/gettext-runtime/intl/loadmsgcat.c
+index d5a5fe1..5c47f48 100644
+--- a/gettext-runtime/intl/loadmsgcat.c
++++ b/gettext-runtime/intl/loadmsgcat.c
+@@ -390,9 +390,56 @@ char *alloca ();
+ # define munmap(addr, len)    __munmap (addr, len)
+ #elif defined _WIN32 && !defined __CYGWIN__
+ /* On native Windows, don't require linking with '-loldnames'.  */
+-# define open _open
++# define open(name, flags)    _open_utf8_windows_wrapper(name, flags)
+ # define read _read
+ # define close _close
++
++/* Provide wrapper of "open" for Windows that supports UTF-8 filenames. */
++# ifndef WIN32_LEAN_AND_MEAN
++#  define WIN32_LEAN_AND_MEAN
++# endif
++# ifndef WIN32_EXTRA_LEAN
++#  define WIN32_EXTRA_LEAN
++# endif
++# ifndef NOMINMAX
++#  define NOMINMAX
++# endif
++# include <windows.h> // For: MultiByteToWideChar
++# include <io.h>
++# include <wchar.h>
++
++int _open_utf8_windows_wrapper(
++   const char *filename,
++   int flags
++)
++{
++      int wstr_len = -1;
++      wchar_t* pUtf16FileName = NULL;
++      int fh = -1;
++
++      // on Windows, convert the filename from UTF-8 to UTF-16
++      wstr_len = MultiByteToWideChar(CP_UTF8, 0, filename, -1, NULL, 0);
++      if (wstr_len <= 0)
++      {
++              // MultiByteToWideChar failed
++              errno = ENOENT;
++              return -1;
++      }
++      pUtf16FileName = malloc(wstr_len * sizeof(wchar_t));
++      if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, pUtf16FileName, 
wstr_len) == 0)
++      {
++              // MultiByteToWideChar failed
++              free(pUtf16FileName);
++              errno = ENOENT;
++              return -1;
++      }
++
++      // and call _wopen
++      fh = _wopen(pUtf16FileName, flags);
++
++      free(pUtf16FileName);
++      return fh;
++}
+ #endif
+ 
+ /* For those losing systems which don't have `alloca' we have to add
diff --git a/dev/vcpkg/ports/gettext-libintl/android.patch 
b/dev/vcpkg/ports/gettext-libintl/android.patch
new file mode 100644
index 0000000000..6f2a7d43fa
--- /dev/null
+++ b/dev/vcpkg/ports/gettext-libintl/android.patch
@@ -0,0 +1,12 @@
+diff --color -ruN a/gettext-runtime/intl/dcigettext.c 
src/gettext-runtime/intl/dcigettext.c
+--- a/gettext-runtime/intl/dcigettext.c        2021-05-26 16:27:55.420544597 
+0200
++++ src/gettext-runtime/intl/dcigettext.c      2021-05-26 16:29:14.546516701 
+0200
+@@ -143,7 +143,7 @@
+ # else
+ #  if VMS
+ #   define getcwd(buf, max) (getcwd) (buf, max, 0)
+-#  else
++#  elif !(defined(__clang__) && defined(__BIONIC_FORTIFY))
+ char *getcwd ();
+ #  endif
+ # endif
diff --git a/dev/vcpkg/ports/gettext-libintl/bashify.cmake 
b/dev/vcpkg/ports/gettext-libintl/bashify.cmake
new file mode 100644
index 0000000000..8b3d87e7b8
--- /dev/null
+++ b/dev/vcpkg/ports/gettext-libintl/bashify.cmake
@@ -0,0 +1,16 @@
+# By using bash builtin expansion, we can avoid
+# expensively spawing three sub-processes (bash, echo, sed).
+foreach(dir IN LISTS SOURCE_DIRS)
+    file(READ "${dir}/configure" script)
+    string(REGEX REPLACE
+        "(\n[a-zA-Z0-9_]*)='`[\$]ECHO \"[\$]([^\"]*)\" \\| [\$]SED 
\"[\$]delay_single_quote_subst\"`'"
+        [[\1='${\2//\\'/\\'\\\\\\'\\'}']]
+        script "${script}"
+    )
+    string(REPLACE
+        [[    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in]]
+        [[    case "\${!var}" in]]
+        script "${script}"
+    )
+    file(WRITE "${dir}/configure" "${script}")
+endforeach()
diff --git a/dev/vcpkg/ports/gettext-libintl/portfile.cmake 
b/dev/vcpkg/ports/gettext-libintl/portfile.cmake
new file mode 100644
index 0000000000..e65edae63d
--- /dev/null
+++ b/dev/vcpkg/ports/gettext-libintl/portfile.cmake
@@ -0,0 +1,123 @@
+if(VCPKG_TARGET_IS_LINUX)
+    set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
+    if(NOT EXISTS "/usr/include/libintl.h")
+        message(FATAL_ERROR
+            "When targeting Linux, `libintl.h` is expected to come from the C 
Runtime Library (glibc). "
+            "Please use \"sudo apt-get install libc-dev\" or the equivalent to 
install development files."
+        )
+    endif()
+    file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION 
"${CURRENT_PACKAGES_DIR}/share/${PORT}")
+    return()
+endif()
+
+set(VCPKG_POLICY_ALLOW_RESTRICTED_HEADERS enabled)
+
+vcpkg_download_distfile(ARCHIVE
+    URLS "https://ftp.gnu.org/pub/gnu/gettext/gettext-${VERSION}.tar.gz";
+         
"https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gettext/gettext-${VERSION}.tar.gz";
+    FILENAME "gettext-${VERSION}.tar.gz"
+    SHA512 
ccd43a43fab3c90ed99b3e27628c9aeb7186398153b137a4997f8c7ddfd9729b0ba9d15348567e5206af50ac027673d2b8a3415bb3fc65f87ad778f85dc03a05
+)
+
+vcpkg_extract_source_archive(SOURCE_PATH
+    ARCHIVE "${ARCHIVE}"
+    PATCHES
+        # Shared with port gettext
+        android.patch
+        uwp.patch
+        0003-Fix-win-unicode-paths.patch
+)
+
+if(VCPKG_HOST_IS_WINDOWS)
+    message(STATUS "Modifying 'configure' to use fast bash variable expansion")
+    set(ENV{CONFIG_SHELL} "/usr/bin/bash")
+    vcpkg_execute_required_process(
+        COMMAND "${CMAKE_COMMAND}"
+            "-DSOURCE_DIRS=gettext-runtime"
+            -P "${CMAKE_CURRENT_LIST_DIR}/bashify.cmake"
+        WORKING_DIRECTORY "${SOURCE_PATH}"
+        LOGNAME "bashify-${TARGET_TRIPLET}"
+    )
+endif()
+
+set(OPTIONS
+    --no-recursion
+    --enable-relocatable #symbol duplication with glib-init.c?
+    --enable-c++
+    --disable-acl
+    --disable-csharp
+    --disable-curses
+    --disable-java
+    --disable-libasprintf
+    --disable-openmp
+    --with-included-gettext
+    --without-libintl-prefix
+    --disable-dependency-tracking # Faster ?
+    ac_cv_path_DVIPS=:
+    ac_cv_path_GMSGFMT=:
+    ac_cv_path_MSGFMT=:
+    ac_cv_path_MSGMERGE=:
+    ac_cv_path_TEXI2PDF=:
+    ac_cv_path_XGETTEXT=:
+    ac_cv_prog_INTLBISON=:
+)
+if(VCPKG_TARGET_IS_WINDOWS)
+    list(APPEND OPTIONS
+        # Avoid unnecessary tests.
+        am_cv_func_iconv_works=yes
+        "--with-libiconv-prefix=${CURRENT_INSTALLED_DIR}"
+        ## This is required. For some reason these do not get correctly 
identified for release builds.
+        ac_cv_func_wcslen=yes
+        ac_cv_func_memmove=yes
+    )
+    if(NOT VCPKG_TARGET_IS_MINGW)
+        list(APPEND OPTIONS
+            # Don't take from port getopt-win32
+            ac_cv_header_getopt_h=no
+            # Don't take from port pthreads
+            ac_cv_header_pthread_h=no
+            # Detected 'no' everywhere except x64-windows-static
+            ac_cv_func_snprintf=no
+            # Detected x64 values for gnulib, overriding guesses for cross 
builds
+            gl_cv_func_mbrtowc_empty_input=no
+            # Detected x64 values for gettext, overriding guesses for x86 & 
x64-uwp
+            gt_cv_int_divbyzero_sigfpe=no
+        )
+    endif()
+endif()
+
+file(REMOVE "${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}-rel.log")
+file(REMOVE "${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}-dbg.log")
+vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}/gettext-runtime"
+    DETERMINE_BUILD_TRIPLET
+    USE_WRAPPERS
+    OPTIONS
+        ${OPTIONS}
+    OPTIONS_RELEASE
+        
"--cache-file=${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}-rel.log"
+    OPTIONS_DEBUG
+        
"--cache-file=${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}-dbg.log"
+    )
+
+# This helps with Windows build times, but should work everywhere in vcpkg.
+# - Avoid an extra command to move a temporary file, we are building out of 
source.
+# - Avoid a subshell just to add comments, the build dir is temporary.
+# - Avoid cygpath -w when other tools handle this for us.
+file(GLOB_RECURSE makefiles 
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}*/intl/Makefile")
+foreach(file IN LISTS makefiles)
+    file(READ "${file}" rules)
+    string(REGEX REPLACE "(\n\ttest -d [^ ]* [|][|] 
[\$][(]MKDIR_P[)][^\n;]*)(\n\t)" "\\1 || exit 1 ; \\\\\\2" rules "${rules}")
+    string(REGEX REPLACE "(\n\t){ echo '/[*] [^*]* [*]/'; \\\\\n\t  cat 
([^;\n]*); \\\\\n\t[}] > [\$]@-t\n\tmv -f [\$]@-t ([\$]@\n)" "\\1cp \\2 \\3" 
rules "${rules}")
+    string(REGEX REPLACE " > [\$]@-t\n\t[\$][(]AM_V_at[)]mv [\$]@-t ([\$]@\n)" 
"> \\1" rules "${rules}")
+    string(REGEX REPLACE "([\$}[(]COMPILE[)] -c -o [\$]@) `[\$][(]CYGPATH_W[)] 
'[\$]<'`" "\\1 \$<" rules "${rules}")
+    file(WRITE "${file}" "${rules}")
+endforeach()
+
+vcpkg_install_make(SUBPATH intl)
+vcpkg_copy_pdbs()
+
+file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")
+
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION 
"${CURRENT_PACKAGES_DIR}/share/intl")
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION 
"${CURRENT_PACKAGES_DIR}/share/${PORT}")
+vcpkg_install_copyright(FILE_LIST 
"${SOURCE_PATH}/gettext-runtime/intl/COPYING.LIB")
diff --git a/dev/vcpkg/ports/gettext-libintl/usage 
b/dev/vcpkg/ports/gettext-libintl/usage
new file mode 100644
index 0000000000..35472de10f
--- /dev/null
+++ b/dev/vcpkg/ports/gettext-libintl/usage
@@ -0,0 +1,4 @@
+gettext-libintl is compatible with built-in CMake targets:
+
+    find_package(Intl REQUIRED)
+    target_link_libraries(main PRIVATE Intl::Intl) # since CMake 3.20
diff --git a/dev/vcpkg/ports/gettext-libintl/uwp.patch 
b/dev/vcpkg/ports/gettext-libintl/uwp.patch
new file mode 100644
index 0000000000..416e2ea3c5
--- /dev/null
+++ b/dev/vcpkg/ports/gettext-libintl/uwp.patch
@@ -0,0 +1,72 @@
+diff --git a/gettext-runtime/gnulib-lib/fcntl.c 
b/gettext-runtime/gnulib-lib/fcntl.c
+index f9753c4..3a3caee 100644
+--- a/gettext-runtime/gnulib-lib/fcntl.c
++++ b/gettext-runtime/gnulib-lib/fcntl.c
+@@ -38,6 +38,12 @@
+ # define WIN32_LEAN_AND_MEAN
+ # include <windows.h>
+ 
++# if defined(WINAPI_FAMILY_PARTITION)
++#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
++#   define HANDLE_FLAG_INHERIT 0
++#  endif
++# endif
++
+ /* Get _get_osfhandle.  */
+ # if GNULIB_MSVC_NOTHROW
+ #  include "msvc-nothrow.h"
+diff --git a/gettext-runtime/intl/langprefs.c 
b/gettext-runtime/intl/langprefs.c
+index f774ba2..f488b7f 100644
+--- a/gettext-runtime/intl/langprefs.c
++++ b/gettext-runtime/intl/langprefs.c
+@@ -38,6 +38,11 @@ extern void _nl_locale_name_canonicalize (char *name);
+ 
+ #if defined _WIN32
+ # define WIN32_NATIVE
++# if defined(WINAPI_FAMILY_PARTITION)
++#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
++#   undef WIN32_NATIVE
++#  endif
++# endif
+ #endif
+ 
+ #ifdef WIN32_NATIVE
+diff --git a/gettext-runtime/intl/localcharset.c 
b/gettext-runtime/intl/localcharset.c
+index ec75427..9e063e4 100644
+--- a/gettext-runtime/intl/localcharset.c
++++ b/gettext-runtime/intl/localcharset.c
+@@ -34,6 +34,9 @@
+ #if defined _WIN32 && !defined __CYGWIN__
+ # define WINDOWS_NATIVE
+ # include <locale.h>
++# if !defined(WINAPI_FAMILY_PARTITION)
++#  define WINAPI_FAMILY_PARTITION(x) (0)
++# endif
+ #endif
+ 
+ #if defined __EMX__
+@@ -912,6 +915,8 @@ locale_charset (void)
+     /* The canonical name cannot be determined.  */
+     codeset = "";
+ 
++# elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
++    codeset = "";
+ # elif defined WINDOWS_NATIVE
+ 
+   char buf[2 + 10 + 1];
+diff --git a/gettext-runtime/intl/localename.c 
b/gettext-runtime/intl/localename.c
+index d77bb81..3c6e055 100644
+--- a/gettext-runtime/intl/localename.c
++++ b/gettext-runtime/intl/localename.c
+@@ -69,6 +69,11 @@ extern char * getlocalename_l(int, locale_t);
+ 
+ #if defined _WIN32 && !defined __CYGWIN__
+ # define WINDOWS_NATIVE
++# if defined(WINAPI_FAMILY_PARTITION)
++#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
++#   undef WIN32_NATIVE
++#  endif
++# endif
+ # if !defined IN_LIBINTL
+ #  include "glthread/lock.h"
+ # endif
diff --git a/dev/vcpkg/ports/gettext-libintl/vcpkg-cmake-wrapper.cmake 
b/dev/vcpkg/ports/gettext-libintl/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 0000000000..03bcb0569d
--- /dev/null
+++ b/dev/vcpkg/ports/gettext-libintl/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,14 @@
+_find_package(${ARGS})
+
+if(Intl_FOUND AND Intl_LIBRARIES)
+    include(SelectLibraryConfigurations)
+    find_library(Intl_LIBRARY_DEBUG NAMES intl libintl intl-8 NAMES_PER_DIR 
PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug" 
NO_DEFAULT_PATH)
+    find_library(Intl_LIBRARY_RELEASE NAMES intl libintl intl-8 NAMES_PER_DIR 
PATH_SUFFIXES lib PATHS "${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}" 
NO_DEFAULT_PATH)
+    unset(Intl_LIBRARIES)
+    unset(Intl_LIBRARIES CACHE)
+    select_library_configurations(Intl)
+    find_package(Iconv) # Since CMake 3.11
+    if(Iconv_FOUND AND NOT Iconv_IS_BUILT_IN)
+        list(APPEND Intl_LIBRARIES ${Iconv_LIBRARIES})
+    endif()
+endif()
diff --git a/dev/vcpkg/ports/gettext-libintl/vcpkg.json 
b/dev/vcpkg/ports/gettext-libintl/vcpkg.json
new file mode 100644
index 0000000000..89ad8f2fa2
--- /dev/null
+++ b/dev/vcpkg/ports/gettext-libintl/vcpkg.json
@@ -0,0 +1,15 @@
+{
+  "name": "gettext-libintl",
+  "version": "0.21.1",
+  "port-version": 1,
+  "description": "The libintl C library from GNU gettext-runtime.",
+  "homepage": "https://www.gnu.org/software/gettext/";,
+  "license": "LGPL-2.1-or-later",
+  "supports": "!xbox",
+  "dependencies": [
+    {
+      "name": "libiconv",
+      "platform": "!linux"
+    }
+  ]
+}
diff --git a/dev/vcpkg/ports/gettext/0003-Fix-win-unicode-paths.patch 
b/dev/vcpkg/ports/gettext/0003-Fix-win-unicode-paths.patch
new file mode 100644
index 0000000000..e15e08755f
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/0003-Fix-win-unicode-paths.patch
@@ -0,0 +1,62 @@
+diff --git a/gettext-runtime/intl/loadmsgcat.c 
b/gettext-runtime/intl/loadmsgcat.c
+index d5a5fe1..5c47f48 100644
+--- a/gettext-runtime/intl/loadmsgcat.c
++++ b/gettext-runtime/intl/loadmsgcat.c
+@@ -390,9 +390,56 @@ char *alloca ();
+ # define munmap(addr, len)    __munmap (addr, len)
+ #elif defined _WIN32 && !defined __CYGWIN__
+ /* On native Windows, don't require linking with '-loldnames'.  */
+-# define open _open
++# define open(name, flags)    _open_utf8_windows_wrapper(name, flags)
+ # define read _read
+ # define close _close
++
++/* Provide wrapper of "open" for Windows that supports UTF-8 filenames. */
++# ifndef WIN32_LEAN_AND_MEAN
++#  define WIN32_LEAN_AND_MEAN
++# endif
++# ifndef WIN32_EXTRA_LEAN
++#  define WIN32_EXTRA_LEAN
++# endif
++# ifndef NOMINMAX
++#  define NOMINMAX
++# endif
++# include <windows.h> // For: MultiByteToWideChar
++# include <io.h>
++# include <wchar.h>
++
++int _open_utf8_windows_wrapper(
++   const char *filename,
++   int flags
++)
++{
++      int wstr_len = -1;
++      wchar_t* pUtf16FileName = NULL;
++      int fh = -1;
++
++      // on Windows, convert the filename from UTF-8 to UTF-16
++      wstr_len = MultiByteToWideChar(CP_UTF8, 0, filename, -1, NULL, 0);
++      if (wstr_len <= 0)
++      {
++              // MultiByteToWideChar failed
++              errno = ENOENT;
++              return -1;
++      }
++      pUtf16FileName = malloc(wstr_len * sizeof(wchar_t));
++      if (MultiByteToWideChar(CP_UTF8, 0, filename, -1, pUtf16FileName, 
wstr_len) == 0)
++      {
++              // MultiByteToWideChar failed
++              free(pUtf16FileName);
++              errno = ENOENT;
++              return -1;
++      }
++
++      // and call _wopen
++      fh = _wopen(pUtf16FileName, flags);
++
++      free(pUtf16FileName);
++      return fh;
++}
+ #endif
+ 
+ /* For those losing systems which don't have `alloca' we have to add
diff --git a/dev/vcpkg/ports/gettext/android.patch 
b/dev/vcpkg/ports/gettext/android.patch
new file mode 100644
index 0000000000..6f2a7d43fa
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/android.patch
@@ -0,0 +1,12 @@
+diff --color -ruN a/gettext-runtime/intl/dcigettext.c 
src/gettext-runtime/intl/dcigettext.c
+--- a/gettext-runtime/intl/dcigettext.c        2021-05-26 16:27:55.420544597 
+0200
++++ src/gettext-runtime/intl/dcigettext.c      2021-05-26 16:29:14.546516701 
+0200
+@@ -143,7 +143,7 @@
+ # else
+ #  if VMS
+ #   define getcwd(buf, max) (getcwd) (buf, max, 0)
+-#  else
++#  elif !(defined(__clang__) && defined(__BIONIC_FORTIFY))
+ char *getcwd ();
+ #  endif
+ # endif
diff --git a/dev/vcpkg/ports/gettext/bashify.cmake 
b/dev/vcpkg/ports/gettext/bashify.cmake
new file mode 100644
index 0000000000..8b3d87e7b8
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/bashify.cmake
@@ -0,0 +1,16 @@
+# By using bash builtin expansion, we can avoid
+# expensively spawing three sub-processes (bash, echo, sed).
+foreach(dir IN LISTS SOURCE_DIRS)
+    file(READ "${dir}/configure" script)
+    string(REGEX REPLACE
+        "(\n[a-zA-Z0-9_]*)='`[\$]ECHO \"[\$]([^\"]*)\" \\| [\$]SED 
\"[\$]delay_single_quote_subst\"`'"
+        [[\1='${\2//\\'/\\'\\\\\\'\\'}']]
+        script "${script}"
+    )
+    string(REPLACE
+        [[    case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in]]
+        [[    case "\${!var}" in]]
+        script "${script}"
+    )
+    file(WRITE "${dir}/configure" "${script}")
+endforeach()
diff --git a/dev/vcpkg/ports/gettext/install-autopoint.cmake 
b/dev/vcpkg/ports/gettext/install-autopoint.cmake
new file mode 100644
index 0000000000..6406b25085
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/install-autopoint.cmake
@@ -0,0 +1,48 @@
+function(install_autopoint)
+    # variables for configuring autopoint.in
+    set(PACKAGE "gettext-tools")
+    set(ARCHIVE_VERSION "${VERSION}")
+    set(ARCHIVE_FORMAT "dirgz")
+    set(bindir [[${prefix}/tools/gettext/bin]])
+    set(datadir [[${datarootdir}]])
+    set(exec_prefix [[${prefix}]])
+    set(PATH_SEPARATOR ":")
+    set(RELOCATABLE "yes")
+
+    file(STRINGS "${SOURCE_PATH}/gettext-tools/configure"
+        VERSIONS_FROM_CONFIGURE
+        REGEX "^ *(ARCHIVE_VERSION|VERSION)=.*$"
+    )
+    foreach(LINE IN LISTS VERSIONS_FROM_CONFIGURE)
+        if(LINE MATCHES "^ *(ARCHIVE_VERSION|VERSION)='?([0-9.]+)'?$")
+            set(${CMAKE_MATCH_1} "${CMAKE_MATCH_2}")
+        endif()
+    endforeach()
+
+    set(WORKING_DIR "${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}")
+    file(MAKE_DIRECTORY "${WORKING_DIR}")
+
+    # autopoint script
+    configure_file("${SOURCE_PATH}/gettext-tools/misc/autopoint.in" 
"${WORKING_DIR}/autopoint" @ONLY)
+
+    # data tarball
+    if(WIN32)
+        vcpkg_acquire_msys(MSYS_ROOT PACKAGES gzip)
+        vcpkg_add_to_path("${MSYS_ROOT}/usr/bin")
+    endif()
+    file(COPY "${SOURCE_PATH}/gettext-tools/misc/archive.dir.tar" DESTINATION 
"${WORKING_DIR}")
+    vcpkg_execute_required_process(
+        COMMAND gzip -f archive.dir.tar
+        WORKING_DIRECTORY "${WORKING_DIR}"
+        LOGNAME gzip-${TARGET_TRIPLET}
+    )
+
+    # installation
+    file(INSTALL "${WORKING_DIR}/autopoint" DESTINATION 
"${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin"
+      FILE_PERMISSIONS
+        OWNER_WRITE OWNER_READ OWNER_EXECUTE
+        GROUP_READ GROUP_EXECUTE
+        WORLD_READ WORLD_EXECUTE
+    )
+    file(INSTALL "${WORKING_DIR}/archive.dir.tar.gz" DESTINATION 
"${CURRENT_PACKAGES_DIR}/share/gettext/gettext")
+endfunction()
diff --git a/dev/vcpkg/ports/gettext/macosx-libs.patch 
b/dev/vcpkg/ports/gettext/macosx-libs.patch
new file mode 100644
index 0000000000..c8936492b4
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/macosx-libs.patch
@@ -0,0 +1,13 @@
+diff --git a/gettext-runtime/configure b/gettext-runtime/configure
+index c21955a..902729a 100755
+--- a/gettext-runtime/configure
++++ b/gettext-runtime/configure
+@@ -26819,7 +26819,7 @@ else $as_nop
+   gt_save_CPPFLAGS="$CPPFLAGS"
+             CPPFLAGS="$CPPFLAGS $INCINTL"
+             gt_save_LIBS="$LIBS"
+-            LIBS="$LIBS $LIBINTL"
++            LIBS="$LIBS $LIBINTL $INTL_MACOSX_LIBS"
+                         cat confdefs.h - <<_ACEOF >conftest.$ac_ext
+ /* end confdefs.h.  */
+ 
diff --git a/dev/vcpkg/ports/gettext/parallel-gettext-tools.patch 
b/dev/vcpkg/ports/gettext/parallel-gettext-tools.patch
new file mode 100644
index 0000000000..65199bc128
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/parallel-gettext-tools.patch
@@ -0,0 +1,25 @@
+diff --git a/gettext-tools/src/Makefile.in b/gettext-tools/src/Makefile.in
+index 5d60b99..d86232d 100644
+--- a/gettext-tools/src/Makefile.in
++++ b/gettext-tools/src/Makefile.in
+@@ -3625,7 +3625,10 @@ USEJAVA_no = 0
+ 
+ # Version information according to Woe32 conventions.
+ @WOE32_TRUE@WOE32_LDADD = gettext.res
+-all: $(BUILT_SOURCES)
++@USE_INSTALLED_LIBTEXTSTYLE_FALSE@all: textstyle.h
++all:
++      $(MAKE) $(AM_MAKEFLAGS) all-parallel
++all-parallel: $(BUILT_SOURCES)
+       $(MAKE) $(AM_MAKEFLAGS) all-am
+ 
+ .SUFFIXES:
+@@ -5045,7 +5048,7 @@ uninstall-tcl:
+ # namely those which build textstyle.h, po-gram-gen.c, cldr-plural.c.
+ # See <https://lists.gnu.org/archive/html/bug-make/2019-05/msg00011.html>.
+ # So, turn off parallel execution in this Makefile.
+-.NOTPARALLEL:
++# .NOTPARALLEL:
+ 
+ # Tell versions [3.59,3.63) of GNU make to not export all variables.
+ # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/dev/vcpkg/ports/gettext/portfile.cmake 
b/dev/vcpkg/ports/gettext/portfile.cmake
new file mode 100644
index 0000000000..8f15fee8de
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/portfile.cmake
@@ -0,0 +1,197 @@
+# This port is just to provide gettext tools and build data, not libs.
+# The "core" feature depends on port gettext-libintl which provides libintl.
+# The "core" feature also installs enough for running autoreconf.
+# The actual tools are only enabled by opt-in features.
+# These features are typically used as a host dependency.
+# For fast builds in particular on Windows, the following choices are made:
+# - only release build type
+# - namespacing disabled (windows only)
+# - configuration cache
+# - using preinstalled gettext-libintl
+# - skipping some subdirs
+set(VCPKG_BUILD_TYPE release)
+set(VCPKG_POLICY_EMPTY_PACKAGE enabled)
+
+vcpkg_download_distfile(ARCHIVE
+    URLS "https://ftpmirror.gnu.org/gnu/gettext/gettext-${VERSION}.tar.gz";
+         "https://ftp.gnu.org/pub/gnu/gettext/gettext-${VERSION}.tar.gz";
+         
"https://www.mirrorservice.org/sites/ftp.gnu.org/gnu/gettext/gettext-${VERSION}.tar.gz";
+    FILENAME "gettext-${VERSION}.tar.gz"
+    SHA512 
ccd43a43fab3c90ed99b3e27628c9aeb7186398153b137a4997f8c7ddfd9729b0ba9d15348567e5206af50ac027673d2b8a3415bb3fc65f87ad778f85dc03a05
+)
+
+vcpkg_extract_source_archive(SOURCE_PATH
+    ARCHIVE "${ARCHIVE}"
+    PATCHES
+        # shared with port gettext-libintl
+        android.patch
+        uwp.patch
+        0003-Fix-win-unicode-paths.patch
+        # unique to port gettext
+        win-gethostname.patch
+        rel_path.patch
+        subdirs.patch
+        parallel-gettext-tools.patch
+        macosx-libs.patch
+)
+
+set(subdirs "")
+if("runtime-tools" IN_LIST FEATURES)
+    string(APPEND subdirs " gettext-runtime")
+endif()
+if("tools" IN_LIST FEATURES)
+    string(APPEND subdirs " libtextstyle gettext-tools")
+endif()
+if(subdirs)
+    set(ENV{VCPKG_GETTEXT_SUBDIRS} "${subdirs}")
+
+    vcpkg_find_acquire_program(BISON)
+    get_filename_component(BISON_PATH "${BISON}" DIRECTORY)
+    vcpkg_add_to_path("${BISON_PATH}")
+
+    if(VCPKG_HOST_IS_WINDOWS)
+        message(STATUS "Modifying build system for less forks")
+        set(ENV{CONFIG_SHELL} "/usr/bin/bash")
+        vcpkg_execute_required_process(
+            COMMAND "${CMAKE_COMMAND}"
+                "-DSOURCE_DIRS=.;gettext-runtime;libtextstyle;gettext-tools"
+                -P "${CMAKE_CURRENT_LIST_DIR}/bashify.cmake"
+            WORKING_DIRECTORY "${SOURCE_PATH}"
+            LOGNAME "bashify-${TARGET_TRIPLET}"
+        )
+    endif()
+
+    set(OPTIONS
+        --enable-relocatable #symbol duplication with glib-init.c?
+        --enable-c++
+        --disable-acl
+        --disable-csharp
+        --disable-curses
+        --disable-java
+        --disable-openmp
+        --disable-dependency-tracking
+        # Avoiding system dependencies and unnecessary tests
+        --with-included-glib
+        --with-included-libxml # libtextstyle won't use external libxml
+        --with-included-libunistring
+        --with-installed-libtextstyle=no
+        --without-cvs
+        --without-emacs
+        --without-git
+        --without-libcurses-prefix
+        --without-libncurses-prefix
+        --without-libtermcap-prefix
+        --without-libxcurses-prefix
+    )
+    if(VCPKG_TARGET_IS_WINDOWS)
+        list(APPEND OPTIONS
+            # Faster, but not for export
+            --disable-namespacing
+            # Avoid unnecessary tests.
+            am_cv_func_iconv_works=yes
+            "--with-libiconv-prefix=${CURRENT_INSTALLED_DIR}"
+            "--with-libintl-prefix=${CURRENT_INSTALLED_DIR}"
+            # This is required. For some reason these do not get correctly 
identified for release builds.
+            ac_cv_func_wcslen=yes
+            ac_cv_func_memmove=yes
+            # The following are required for a full gettext built (libintl and 
tools).
+            gl_cv_func_printf_directive_n=no  # segfaults otherwise with popup 
window
+            ac_cv_func_memset=yes             # not detected in release builds
+        )
+        if(NOT VCPKG_TARGET_IS_MINGW)
+            list(APPEND OPTIONS
+                # Don't take from port dirent
+                ac_cv_header_dirent_h=no
+                # Don't take from port getopt-win32
+                ac_cv_header_getopt_h=no
+                # Don't take from port pthreads
+                ac_cv_header_pthread_h=no
+                ac_cv_header_sched_h=no
+                ac_cv_header_semaphore_h=no
+                # Detected 'no' everywhere except x64-windows-static
+                ac_cv_func_snprintf=no
+                # Detected x64 values for gnulib, overriding guesses for cross 
builds
+                gl_cv_func_fopen_mode_x=yes
+                gl_cv_func_frexpl_works=yes
+                gl_cv_func_getcwd_null=yes
+                gl_cv_func_mbrtowc_empty_input=no
+                gl_cv_func_mbsrtowcs_works=yes
+                gl_cv_func_printf_flag_zero=yes
+                gl_cv_func_printf_infinite_long_double=yes
+                gl_cv_func_printf_precision=yes
+                gl_cv_func_snprintf_truncation_c99=yes
+                # Detected x64 values for gettext, overriding guesses for x86 
& x64-uwp
+                gt_cv_int_divbyzero_sigfpe=no
+            )
+        endif()
+    endif()
+
+    file(REMOVE 
"${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}-rel.log")
+    vcpkg_configure_make(SOURCE_PATH "${SOURCE_PATH}"
+        DETERMINE_BUILD_TRIPLET
+        USE_WRAPPERS
+        ADDITIONAL_MSYS_PACKAGES gzip
+        OPTIONS
+            ${OPTIONS}
+        OPTIONS_RELEASE
+            
"--cache-file=${CURRENT_BUILDTREES_DIR}/config.cache-${TARGET_TRIPLET}-rel.log"
+    )
+
+    # This helps with Windows build times, but should work everywhere in vcpkg.
+    # - Avoid an extra command to move a temporary file, we are building out 
of source.
+    # - Avoid a subshell just to add comments, the build dir is temporary.
+    # - Avoid cygpath -w when other tools handle this for us.
+    file(GLOB_RECURSE makefiles 
"${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}*/*Makefile")
+    foreach(file IN LISTS makefiles)
+        file(READ "${file}" rules)
+        string(REGEX REPLACE "(\n\ttest -d [^ ]* [|][|] 
[\$][(]MKDIR_P[)][^\n;]*)(\n\t)" "\\1 || exit 1 ; \\\\\\2" rules "${rules}")
+        string(REGEX REPLACE "(\n\t){ echo '/[*] [^*]* [*]/'; \\\\\n\t  cat 
([^;\n]*); \\\\\n\t[}] > [\$]@-t\n\tmv -f [\$]@-t ([\$]@\n)" "\\1cp \\2 \\3" 
rules "${rules}")
+        string(REGEX REPLACE " > [\$]@-t\n\t[\$][(]AM_V_at[)]mv [\$]@-t 
([\$]@\n)" "> \\1" rules "${rules}")
+        string(REGEX REPLACE "([\$}[(]COMPILE[)] -c -o [\$]@) 
`[\$][(]CYGPATH_W[)] '[\$]<'`" "\\1 \$<" rules "${rules}")
+        file(WRITE "${file}" "${rules}")
+    endforeach()
+
+    vcpkg_install_make()
+    vcpkg_copy_pdbs()
+    vcpkg_copy_tool_dependencies("${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
+    file(GLOB unix_runtime LIST_DIRECTORIES false
+        
"${CURRENT_PACKAGES_DIR}/lib/libgettext*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}*"
+        
"${CURRENT_PACKAGES_DIR}/lib/libtextstyle*${VCPKG_TARGET_SHARED_LIBRARY_SUFFIX}*"
+    )
+    if(unix_runtime)
+        file(INSTALL ${unix_runtime} DESTINATION 
"${CURRENT_PACKAGES_DIR}/tools/${PORT}/bin")
+    endif()
+    file(GLOB link_libs LIST_DIRECTORIES false "${CURRENT_PACKAGES_DIR}/lib/*" 
"${CURRENT_PACKAGES_DIR}/bin/*.dll")
+    file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/include" ${link_libs})
+endif()
+
+if("tools" IN_LIST FEATURES)
+    vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/gettext/user-email" 
"${CURRENT_INSTALLED_DIR}" "`dirname $0`/../..")
+else()
+    # A fast installation of the autopoint tool and data, needed for autoconfig
+    include("${CMAKE_CURRENT_LIST_DIR}/install-autopoint.cmake")
+    install_autopoint()
+endif()
+
+# These files can be needed to run `autoreconf`.
+# We want to install these files also for fast "core" builds without "tools".
+# Cf. PACKAGING for the file list.
+file(INSTALL
+    "${SOURCE_PATH}/gettext-runtime/m4/gettext.m4"
+    "${SOURCE_PATH}/gettext-runtime/m4/iconv.m4"
+    "${SOURCE_PATH}/gettext-runtime/m4/intlmacosx.m4"
+    "${SOURCE_PATH}/gettext-runtime/m4/nls.m4"
+    "${SOURCE_PATH}/gettext-runtime/m4/po.m4"
+    "${SOURCE_PATH}/gettext-runtime/m4/progtest.m4"
+    "${SOURCE_PATH}/gettext-runtime/gnulib-m4/host-cpu-c-abi.m4"
+    "${SOURCE_PATH}/gettext-runtime/gnulib-m4/lib-ld.m4"
+    "${SOURCE_PATH}/gettext-runtime/gnulib-m4/lib-link.m4"
+    "${SOURCE_PATH}/gettext-runtime/gnulib-m4/lib-prefix.m4"
+    DESTINATION "${CURRENT_PACKAGES_DIR}/share/gettext/aclocal"
+)
+
+if(NOT VCPKG_CROSSCOMPILING)
+    file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-port-config.cmake" DESTINATION 
"${CURRENT_PACKAGES_DIR}/share/gettext")
+endif()
+
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/gettext-runtime/COPYING" 
"${SOURCE_PATH}/COPYING")
diff --git a/dev/vcpkg/ports/gettext/rel_path.patch 
b/dev/vcpkg/ports/gettext/rel_path.patch
new file mode 100644
index 0000000000..c0301cc75c
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/rel_path.patch
@@ -0,0 +1,31 @@
+diff --git a/gettext-tools/misc/autopoint.in b/gettext-tools/misc/autopoint.in
+index 3a24eee5d..56b36d5ff 100644
+--- a/gettext-tools/misc/autopoint.in
++++ b/gettext-tools/misc/autopoint.in
+@@ -27,8 +27,9 @@ archive_version=@ARCHIVE_VERSION@
+ 
+ # Set variables
+ # - gettext_datadir     directory where the data files are stored.
+-prefix="@prefix@"
+-datarootdir="@datarootdir@"
++
++prefix="$(dirname "$0")/../../../"
++datarootdir="${prefix}/share/gettext"
+ : ${gettext_datadir="@datadir@/gettext"}
+ : ${AUTOM4TE=autom4te}
+ 
+diff --git a/gettext-tools/misc/gettextize.in 
b/gettext-tools/misc/gettextize.in
+index c78c308bf..175ad57e7 100644
+--- a/gettext-tools/misc/gettextize.in
++++ b/gettext-tools/misc/gettextize.in
+@@ -27,8 +27,8 @@ archive_version=@ARCHIVE_VERSION@
+ 
+ # Set variables
+ # - gettext_datadir     directory where the data files are stored.
+-prefix="@prefix@"
+-datarootdir="@datarootdir@"
++prefix="$(dirname "$0")/../../../"
++datarootdir="${prefix}/share/gettext"
+ : ${gettext_datadir="@datadir@/gettext"}
+ : ${AUTOM4TE=autom4te}
+ 
diff --git a/dev/vcpkg/ports/gettext/subdirs.patch 
b/dev/vcpkg/ports/gettext/subdirs.patch
new file mode 100644
index 0000000000..21964d6e54
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/subdirs.patch
@@ -0,0 +1,115 @@
+diff --git a/configure b/configure
+index 904bdf5..e751ffc 100755
+--- a/configure
++++ b/configure
+@@ -2797,7 +2797,7 @@ am__tar='${AMTAR} chf - --format=ustar --owner=root 
--group=root "$$tardir"'
+ 
+ 
+ 
+-subdirs="$subdirs gettext-runtime libtextstyle gettext-tools"
++subdirs="$subdirs $VCPKG_GETTEXT_SUBDIRS"
+ 
+ 
+ 
+diff --git a/Makefile.in b/Makefile.in
+index a287d38..075ddc5 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -311,7 +311,7 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
+ ACLOCAL_AMFLAGS = -I m4
+-SUBDIRS = gnulib-local gettext-runtime libtextstyle gettext-tools
++SUBDIRS = $(VCPKG_GETTEXT_SUBDIRS)
+ changelog_etc = \
+   gettext-runtime/ChangeLog.0 \
+   gettext-runtime/doc/ChangeLog.0 \
+diff --git a/gettext-runtime/Makefile.in b/gettext-runtime/Makefile.in
+index 8b8b5bc..bb75447 100644
+--- a/gettext-runtime/Makefile.in
++++ b/gettext-runtime/Makefile.in
+@@ -1487,7 +1487,7 @@ ACLOCAL_AMFLAGS = -I m4 -I ../m4 -I gnulib-m4
+ # The list of subdirectories depends on whether --disable-libasprintf was
+ # specified.
+ @ENABLE_LIBASPRINTF_TRUE@SUBDIR_libasprintf = libasprintf
+-SUBDIRS = doc intl intl-java intl-csharp gnulib-lib $(SUBDIR_libasprintf) src 
po man m4 tests
++SUBDIRS =     $(VCPKG_INTL)              gnulib-lib                       src 
po
+ 
+ # Allow users to use "gnulib-tool --update".
+ 
+diff --git a/gettext-runtime/configure b/gettext-runtime/configure
+index a7594ed..296f3b7 100644
+--- a/gettext-runtime/configure
++++ b/gettext-runtime/configure
+@@ -26906,7 +26906,7 @@ printf "%s\n" "$ac_res" >&6; }
+ 
+                                         if { eval 
"gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" 
= "yes"; } \
+-                && test "$PACKAGE" != gettext-runtime \
++                && test "$PACKAGE" != pristine-gettext-runtime \
+                 && test "$PACKAGE" != gettext-tools; }; then
+           gt_use_preinstalled_gnugettext=yes
+         else
+diff --git a/gettext-runtime/libasprintf/configure 
b/gettext-runtime/libasprintf/configure
+--- a/gettext-runtime/libasprintf/configure
++++ b/gettext-runtime/libasprintf/configure
+index ff1c212..0c0dbcd 100644
+@@ -11,6 +11,7 @@
+ #
+ # This configure script is free software; the Free Software Foundation
+ # gives unlimited permission to copy, distribute and modify it.
++exit 0;
+ ## -------------------- ##
+ ## M4sh Initialization. ##
+ ## -------------------- ##
+diff --git a/gettext-tools/Makefile.in b/gettext-tools/Makefile.in
+index 59e81a8..107856d 100644
+--- a/gettext-tools/Makefile.in
++++ b/gettext-tools/Makefile.in
+@@ -2872,7 +2872,7 @@ top_builddir = @top_builddir@
+ top_srcdir = @top_srcdir@
+ AUTOMAKE_OPTIONS = 1.5 gnu no-dependencies
+ ACLOCAL_AMFLAGS = -I m4 -I ../gettext-runtime/m4 -I ../m4 -I gnulib-m4 -I 
libgrep/gnulib-m4 -I libgettextpo/gnulib-m4
+-SUBDIRS = intl gnulib-lib libgrep src libgettextpo po its projects styles 
emacs misc man m4 tests system-tests gnulib-tests examples doc
++SUBDIRS = intl gnulib-lib libgrep src              po its projects styles     
  misc
+ 
+ # Allow users to use "gnulib-tool --update".
+ 
+diff --git a/gettext-tools/configure b/gettext-tools/configure
+index 056a830..9abca7e 100644
+--- a/gettext-tools/configure
++++ b/gettext-tools/configure
+@@ -29661,7 +29661,7 @@ printf "%s\n" "$ac_res" >&6; }
+                                         if { eval 
"gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
+            || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" 
= "yes"; } \
+                 && test "$PACKAGE" != gettext-runtime \
+-                && test "$PACKAGE" != gettext-tools; }; then
++                && test "$PACKAGE" != pristine-gettext-tools; }; then
+           gt_use_preinstalled_gnugettext=yes
+         else
+                     LIBINTL=
+diff --git a/gettext-tools/examples/configure 
b/gettext-tools/examples/configure
+--- a/gettext-tools/examples/configure
++++ b/gettext-tools/examples/configure
+index ff1c212..0c0dbcd 100644
+@@ -11,6 +11,7 @@
+ #
+ # This configure script is free software; the Free Software Foundation
+ # gives unlimited permission to copy, distribute and modify it.
++exit 0;
+ ## -------------------- ##
+ ## M4sh Initialization. ##
+ ## -------------------- ##
+diff --git a/libtextstyle/Makefile.in b/libtextstyle/Makefile.in
+index ff1c212..0c0dbcd 100644
+--- a/libtextstyle/Makefile.in
++++ b/libtextstyle/Makefile.in
+@@ -1667,7 +1667,7 @@ AUTOMAKE_OPTIONS = 1.13 gnu no-dependencies
+ ACLOCAL_AMFLAGS = -I m4 -I gnulib-m4
+ 
+ # The list of subdirectories containing Makefiles.
+-SUBDIRS = lib tests adhoc-tests doc
++SUBDIRS = lib
+ 
+ # Allow users to use "gnulib-tool --update".
+ 
diff --git a/dev/vcpkg/ports/gettext/uwp.patch 
b/dev/vcpkg/ports/gettext/uwp.patch
new file mode 100644
index 0000000000..416e2ea3c5
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/uwp.patch
@@ -0,0 +1,72 @@
+diff --git a/gettext-runtime/gnulib-lib/fcntl.c 
b/gettext-runtime/gnulib-lib/fcntl.c
+index f9753c4..3a3caee 100644
+--- a/gettext-runtime/gnulib-lib/fcntl.c
++++ b/gettext-runtime/gnulib-lib/fcntl.c
+@@ -38,6 +38,12 @@
+ # define WIN32_LEAN_AND_MEAN
+ # include <windows.h>
+ 
++# if defined(WINAPI_FAMILY_PARTITION)
++#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
++#   define HANDLE_FLAG_INHERIT 0
++#  endif
++# endif
++
+ /* Get _get_osfhandle.  */
+ # if GNULIB_MSVC_NOTHROW
+ #  include "msvc-nothrow.h"
+diff --git a/gettext-runtime/intl/langprefs.c 
b/gettext-runtime/intl/langprefs.c
+index f774ba2..f488b7f 100644
+--- a/gettext-runtime/intl/langprefs.c
++++ b/gettext-runtime/intl/langprefs.c
+@@ -38,6 +38,11 @@ extern void _nl_locale_name_canonicalize (char *name);
+ 
+ #if defined _WIN32
+ # define WIN32_NATIVE
++# if defined(WINAPI_FAMILY_PARTITION)
++#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
++#   undef WIN32_NATIVE
++#  endif
++# endif
+ #endif
+ 
+ #ifdef WIN32_NATIVE
+diff --git a/gettext-runtime/intl/localcharset.c 
b/gettext-runtime/intl/localcharset.c
+index ec75427..9e063e4 100644
+--- a/gettext-runtime/intl/localcharset.c
++++ b/gettext-runtime/intl/localcharset.c
+@@ -34,6 +34,9 @@
+ #if defined _WIN32 && !defined __CYGWIN__
+ # define WINDOWS_NATIVE
+ # include <locale.h>
++# if !defined(WINAPI_FAMILY_PARTITION)
++#  define WINAPI_FAMILY_PARTITION(x) (0)
++# endif
+ #endif
+ 
+ #if defined __EMX__
+@@ -912,6 +915,8 @@ locale_charset (void)
+     /* The canonical name cannot be determined.  */
+     codeset = "";
+ 
++# elif WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
++    codeset = "";
+ # elif defined WINDOWS_NATIVE
+ 
+   char buf[2 + 10 + 1];
+diff --git a/gettext-runtime/intl/localename.c 
b/gettext-runtime/intl/localename.c
+index d77bb81..3c6e055 100644
+--- a/gettext-runtime/intl/localename.c
++++ b/gettext-runtime/intl/localename.c
+@@ -69,6 +69,11 @@ extern char * getlocalename_l(int, locale_t);
+ 
+ #if defined _WIN32 && !defined __CYGWIN__
+ # define WINDOWS_NATIVE
++# if defined(WINAPI_FAMILY_PARTITION)
++#  if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP)
++#   undef WIN32_NATIVE
++#  endif
++# endif
+ # if !defined IN_LIBINTL
+ #  include "glthread/lock.h"
+ # endif
diff --git a/dev/vcpkg/ports/gettext/vcpkg-port-config.cmake 
b/dev/vcpkg/ports/gettext/vcpkg-port-config.cmake
new file mode 100644
index 0000000000..67a636bd3f
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/vcpkg-port-config.cmake
@@ -0,0 +1,6 @@
+get_filename_component(gettext_tools_dir 
"${CMAKE_CURRENT_LIST_DIR}/../../tools/gettext/bin" ABSOLUTE)
+if(CMAKE_HOST_WIN32)
+    set(ENV{PATH} "$ENV{PATH};${gettext_tools_dir}")
+else()
+    set(ENV{PATH} "$ENV{PATH}:${gettext_tools_dir}")
+endif()
diff --git a/dev/vcpkg/ports/gettext/vcpkg.json 
b/dev/vcpkg/ports/gettext/vcpkg.json
new file mode 100644
index 0000000000..e3428cfaeb
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/vcpkg.json
@@ -0,0 +1,25 @@
+{
+  "name": "gettext",
+  "version": "0.21.1",
+  "port-version": 3,
+  "description": "A GNU framework to help produce multi-lingual messages.",
+  "homepage": "https://www.gnu.org/software/gettext/";,
+  "license": "GPL-3.0-only",
+  "supports": "!xbox",
+  "dependencies": [
+    "gettext-libintl"
+  ],
+  "features": {
+    "runtime-tools": {
+      "description": "Build runtime tools for internationalization of scripts",
+      "supports": "!uwp"
+    },
+    "tools": {
+      "description": "Build gettext tools",
+      "supports": "!uwp",
+      "dependencies": [
+        "libiconv"
+      ]
+    }
+  }
+}
diff --git a/dev/vcpkg/ports/gettext/win-gethostname.patch 
b/dev/vcpkg/ports/gettext/win-gethostname.patch
new file mode 100644
index 0000000000..3e3f399df6
--- /dev/null
+++ b/dev/vcpkg/ports/gettext/win-gethostname.patch
@@ -0,0 +1,45 @@
+diff --git a/gettext-tools/src/hostname.c b/gettext-tools/src/hostname.c
+index e909637..c2e8065 100644
+--- a/gettext-tools/src/hostname.c
++++ b/gettext-tools/src/hostname.c
+@@ -29,7 +29,9 @@
+ #include <locale.h>
+ 
+ #if defined _WIN32
++# if !HAVE_GETHOSTNAME
+ # define WIN32_NATIVE
++# endif
+ #endif
+ 
+ /* Get gethostname().  */
+@@ -56,6 +58,9 @@
+ 
+ /* Support for using gethostbyname().  */
+ #if HAVE_GETHOSTBYNAME
++# if HAVE_WINSOCK2_H
++#  include <winsock2.h>
++# else
+ # include <sys/types.h>
+ # include <sys/socket.h> /* defines AF_INET, AF_INET6 */
+ # include <netinet/in.h> /* declares ntohs(), defines struct sockaddr_in */
+@@ -76,6 +81,7 @@
+ #  endif
+ # endif
+ # include <netdb.h> /* defines struct hostent, declares gethostbyname() */
++# endif
+ #endif
+ 
+ /* Include this after <sys/socket.h>, to avoid a syntax error on BeOS.  */
+diff --git a/libtextstyle/lib/unistd.in.h b/libtextstyle/lib/unistd.in.h
+index fd69a48..4ebdcaa 100644
+--- a/libtextstyle/lib/unistd.in.h
++++ b/libtextstyle/lib/unistd.in.h
+@@ -1240,7 +1240,7 @@ _GL_WARN_ON_USE (getgroups, "getgroups is unportable - "
+    Null terminate it if the name is shorter than LEN.
+    If the host name is longer than LEN, set errno = EINVAL and return -1.
+    Return 0 if successful, otherwise set errno and return -1.  */
+-# if @UNISTD_H_HAVE_WINSOCK2_H@
++# if @UNISTD_H_HAVE_WINSOCK2_H@ && !@HAVE_GETHOSTNAME@
+ #  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
+ #   undef gethostname
+ #   define gethostname rpl_gethostname
diff --git a/dev/vcpkg/ports/liblzma/build-tools.patch 
b/dev/vcpkg/ports/liblzma/build-tools.patch
new file mode 100644
index 0000000000..12926a9358
--- /dev/null
+++ b/dev/vcpkg/ports/liblzma/build-tools.patch
@@ -0,0 +1,19 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1484,7 +1484,7 @@ function(my_install_man COMPONENT SRC_FILE LINK_NAMES)
+     endif()
+ endfunction()
+ 
+-
++if(BUILD_TOOLS)
+ #############################################################################
+ # libgnu (getopt_long)
+ #############################################################################
+@@ -1982,6 +1982,7 @@ if(UNIX)
+     my_install_man(scripts_Documentation src/scripts/xzless.1 
"${XZLESS_LINKS}")
+ endif()
+ 
++endif()
+ 
+ #############################################################################
+ # Documentation
diff --git a/dev/vcpkg/ports/liblzma/portfile.cmake 
b/dev/vcpkg/ports/liblzma/portfile.cmake
new file mode 100644
index 0000000000..1bd72943ac
--- /dev/null
+++ b/dev/vcpkg/ports/liblzma/portfile.cmake
@@ -0,0 +1,86 @@
+vcpkg_from_github(
+    OUT_SOURCE_PATH SOURCE_PATH
+    REPO tukaani-project/xz
+    REF "v${VERSION}"
+    SHA512 
ec708bcddc64285b0c36b89c9e6413994af4c15bb6865a7bc243a048ce86afccd0df88d46d55aa23fb8071d137dcc19cf357117adc92f030919540f8993cacf9
+    HEAD_REF master
+    PATCHES
+        win_output_name.patch # Fix output name on Windows. Autotool build 
does not generate lib prefixed libraries on windows. 
+        build-tools.patch
+)
+
+vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
+    FEATURES
+        tools BUILD_TOOLS
+)
+
+if(VCPKG_TARGET_ARCHITECTURE STREQUAL "wasm32")
+    set(WASM_OPTIONS -DCMAKE_C_BYTE_ORDER=LITTLE_ENDIAN 
-DCMAKE_CXX_BYTE_ORDER=LITTLE_ENDIAN)
+endif()
+
+vcpkg_cmake_configure(
+    SOURCE_PATH "${SOURCE_PATH}"
+    OPTIONS
+        ${FEATURE_OPTIONS}
+        ${WASM_OPTIONS}
+        -DBUILD_TESTING=OFF
+        -DCREATE_XZ_SYMLINKS=OFF
+        -DCREATE_LZMA_SYMLINKS=OFF
+        -DCMAKE_MSVC_DEBUG_INFORMATION_FORMAT=   # using flags from (vcpkg) 
toolchain
+        -DENABLE_NLS=OFF # nls is not supported by this port, yet
+    MAYBE_UNUSED_VARIABLES
+        CMAKE_MSVC_DEBUG_INFORMATION_FORMAT
+        CREATE_XZ_SYMLINKS
+        CREATE_LZMA_SYMLINKS
+        ENABLE_NLS
+)
+vcpkg_cmake_install()
+vcpkg_copy_pdbs()
+
+set(exec_prefix "\${prefix}")
+set(libdir "\${prefix}/lib")
+set(includedir "\${prefix}/include")
+set(PACKAGE_URL https://tukaani.org/xz/)
+set(PACKAGE_VERSION "${VERSION}")
+if(NOT VCPKG_TARGET_IS_WINDOWS)
+    set(PTHREAD_CFLAGS -pthread)
+endif()
+set(prefix "${CURRENT_INSTALLED_DIR}")
+configure_file("${SOURCE_PATH}/src/liblzma/liblzma.pc.in" 
"${CURRENT_PACKAGES_DIR}/lib/pkgconfig/liblzma.pc" @ONLY)
+if (NOT VCPKG_BUILD_TYPE)
+  set(prefix "${CURRENT_INSTALLED_DIR}/debug")
+  configure_file("${SOURCE_PATH}/src/liblzma/liblzma.pc.in" 
"${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/liblzma.pc" @ONLY)
+endif()
+vcpkg_fixup_pkgconfig()
+
+vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/liblzma)
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+    vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/lzma.h" 
"defined(LZMA_API_STATIC)" "1")
+else()
+    vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/include/lzma.h" 
"defined(LZMA_API_STATIC)" "0")
+endif()
+
+file(REMOVE_RECURSE
+    "${CURRENT_PACKAGES_DIR}/debug/include"
+    "${CURRENT_PACKAGES_DIR}/debug/share"
+    "${CURRENT_PACKAGES_DIR}/share/man"
+)
+
+set(TOOLS xz xzdec lzmadec lzmainfo)
+foreach(_tool IN LISTS TOOLS)
+    if(NOT EXISTS 
"${CURRENT_PACKAGES_DIR}/bin/${_tool}${VCPKG_TARGET_EXECUTABLE_SUFFIX}")
+        list(REMOVE_ITEM TOOLS ${_tool})
+    endif()
+endforeach()
+if(TOOLS)
+    vcpkg_copy_tools(TOOL_NAMES ${TOOLS} AUTO_CLEAN)
+endif()
+
+if(VCPKG_LIBRARY_LINKAGE STREQUAL "static")
+    file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/bin" 
"${CURRENT_PACKAGES_DIR}/debug/bin")
+endif()
+
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/vcpkg-cmake-wrapper.cmake" DESTINATION 
"${CURRENT_PACKAGES_DIR}/share/${PORT}")
+file(COPY "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION 
"${CURRENT_PACKAGES_DIR}/share/${PORT}")
+vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/COPYING")
diff --git a/dev/vcpkg/ports/liblzma/usage b/dev/vcpkg/ports/liblzma/usage
new file mode 100644
index 0000000000..b1461c93fc
--- /dev/null
+++ b/dev/vcpkg/ports/liblzma/usage
@@ -0,0 +1,9 @@
+liblzma is compatible with built-in CMake targets:
+
+    find_package(LibLZMA REQUIRED)
+    target_link_libraries(main PRIVATE LibLZMA::LibLZMA)
+
+liblzma provides CMake targets:
+
+    find_package(liblzma CONFIG REQUIRED)
+    target_link_libraries(main PRIVATE liblzma::liblzma)
diff --git a/dev/vcpkg/ports/liblzma/vcpkg-cmake-wrapper.cmake 
b/dev/vcpkg/ports/liblzma/vcpkg-cmake-wrapper.cmake
new file mode 100644
index 0000000000..826cdba065
--- /dev/null
+++ b/dev/vcpkg/ports/liblzma/vcpkg-cmake-wrapper.cmake
@@ -0,0 +1,64 @@
+cmake_policy(PUSH)
+cmake_policy(SET CMP0012 NEW)
+cmake_policy(SET CMP0057 NEW)
+set(z_vcpkg_liblzma_fixup_needed 0)
+if(NOT "CONFIG" IN_LIST ARGS AND NOT "NO_MODULE" IN_LIST ARGS AND NOT 
CMAKE_DISABLE_FIND_PACKAGE_LibLZMA)
+    get_filename_component(z_vcpkg_liblzma_prefix "${CMAKE_CURRENT_LIST_DIR}" 
DIRECTORY)
+    get_filename_component(z_vcpkg_liblzma_prefix "${z_vcpkg_liblzma_prefix}" 
DIRECTORY)
+    find_path(LIBLZMA_INCLUDE_DIR NAMES lzma.h PATHS 
"${z_vcpkg_liblzma_prefix}/include" NO_DEFAULT_PATH)
+    # liblzma doesn't use a debug postfix, but FindLibLZMA.cmake expects it 
+    find_library(LIBLZMA_LIBRARY_RELEASE NAMES lzma PATHS 
"${z_vcpkg_liblzma_prefix}/lib" NO_DEFAULT_PATH)
+    find_library(LIBLZMA_LIBRARY_DEBUG NAMES lzma PATHS 
"${z_vcpkg_liblzma_prefix}/debug/lib" NO_DEFAULT_PATH)
+    unset(z_vcpkg_liblzma_prefix)
+    if(CMAKE_VERSION VERSION_LESS 3.16)
+        # Older versions of FindLibLZMA.cmake need a single lib in 
LIBLZMA_LIBRARY.
+        set(z_vcpkg_liblzma_fixup_needed 1)
+        set(LIBLZMA_LIBRARY "${LIBLZMA_LIBRARY_RELEASE}" CACHE INTERNAL "")
+    elseif(NOT TARGET LibLZMA::LibLZMA)
+        set(z_vcpkg_liblzma_fixup_needed 1)
+    endif()
+    # Known values, and required. Skip expensive tests.
+    set(LIBLZMA_HAS_AUTO_DECODER 1 CACHE INTERNAL "")
+    set(LIBLZMA_HAS_EASY_ENCODER 1 CACHE INTERNAL "")
+    set(LIBLZMA_HAS_LZMA_PRESET 1 CACHE INTERNAL "")
+endif()
+
+_find_package(${ARGS})
+
+if(z_vcpkg_liblzma_fixup_needed)
+    include(SelectLibraryConfigurations)
+    select_library_configurations(LIBLZMA)
+    if(NOT TARGET LibLZMA::LibLZMA)
+        # Backfill LibLZMA::LibLZMA to versions of cmake before 3.14
+        add_library(LibLZMA::LibLZMA UNKNOWN IMPORTED)
+        if(DEFINED LIBLZMA_INCLUDE_DIRS)
+            set_target_properties(LibLZMA::LibLZMA PROPERTIES
+                INTERFACE_INCLUDE_DIRECTORIES "${LIBLZMA_INCLUDE_DIRS}")
+        endif()
+        set_property(TARGET LibLZMA::LibLZMA APPEND PROPERTY
+            IMPORTED_CONFIGURATIONS RELEASE)
+        set_target_properties(LibLZMA::LibLZMA PROPERTIES
+            IMPORTED_LINK_INTERFACE_LANGUAGES_RELEASE "C"
+            IMPORTED_LOCATION_RELEASE "${LIBLZMA_LIBRARY_RELEASE}")
+        if(EXISTS "${LIBLZMA_LIBRARY}")
+            set_target_properties(LibLZMA::LibLZMA PROPERTIES
+                IMPORTED_LINK_INTERFACE_LANGUAGES "C"
+                IMPORTED_LOCATION "${LIBLZMA_LIBRARY}")
+        endif()
+    endif()
+    if(LIBLZMA_LIBRARY_DEBUG)
+        # Backfill debug variant to versions of cmake before 3.16
+        set_property(TARGET LibLZMA::LibLZMA APPEND PROPERTY 
IMPORTED_CONFIGURATIONS DEBUG)
+        set_target_properties(LibLZMA::LibLZMA PROPERTIES 
IMPORTED_LOCATION_DEBUG "${LIBLZMA_LIBRARY_DEBUG}")
+    endif()
+endif()
+if(LIBLZMA_LIBRARIES AND NOT "Threads::Threads" IN_LIST LIBLZMA_LIBRARIES)
+    set(THREADS_PREFER_PTHREAD_FLAG TRUE)
+    find_package(Threads)
+    list(APPEND LIBLZMA_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
+    if(TARGET LibLZMA::LibLZMA)
+        set_property(TARGET LibLZMA::LibLZMA APPEND PROPERTY 
INTERFACE_LINK_LIBRARIES Threads::Threads)
+    endif()
+endif()
+unset(z_vcpkg_liblzma_fixup_needed)
+cmake_policy(POP)
diff --git a/dev/vcpkg/ports/liblzma/vcpkg.json 
b/dev/vcpkg/ports/liblzma/vcpkg.json
new file mode 100644
index 0000000000..364220e1c1
--- /dev/null
+++ b/dev/vcpkg/ports/liblzma/vcpkg.json
@@ -0,0 +1,22 @@
+{
+  "name": "liblzma",
+  "version": "5.6.2",
+  "description": "Compression library with an API similar to that of zlib.",
+  "homepage": "https://tukaani.org/xz/";,
+  "license": null,
+  "dependencies": [
+    {
+      "name": "vcpkg-cmake",
+      "host": true
+    },
+    {
+      "name": "vcpkg-cmake-config",
+      "host": true
+    }
+  ],
+  "features": {
+    "tools": {
+      "description": "Build tools"
+    }
+  }
+}
diff --git a/dev/vcpkg/ports/liblzma/win_output_name.patch 
b/dev/vcpkg/ports/liblzma/win_output_name.patch
new file mode 100644
index 0000000000..91e155ac4e
--- /dev/null
+++ b/dev/vcpkg/ports/liblzma/win_output_name.patch
@@ -0,0 +1,19 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1273,10 +1273,14 @@ set_target_properties(liblzma PROPERTIES
+ 
+     # It's liblzma.so or liblzma.dll, not libliblzma.so or lzma.dll.
+     # Avoid the name lzma.dll because it would conflict with LZMA SDK.
+-    PREFIX ""
+-    IMPORT_PREFIX ""
++    OUTPUT_NAME lzma
+ )
+ 
++if(WIN32 AND NOT MINGW)
++    set_target_properties(liblzma PROPERTIES RUNTIME_OUTPUT_NAME liblzma)
++endif()
++
++
+ # Create liblzma-config-version.cmake.
+ #
+ # FIXME: SameMajorVersion is correct for stable releases but it is wrong
diff --git a/dev/vcpkg/triplets/x64-linux-avx.cmake 
b/dev/vcpkg/triplets/x64-linux-avx.cmake
index 6ad6c2dccf..50f1bdebc9 100644
--- a/dev/vcpkg/triplets/x64-linux-avx.cmake
+++ b/dev/vcpkg/triplets/x64-linux-avx.cmake
@@ -8,3 +8,8 @@ set(VCPKG_CMAKE_SYSTEM_NAME Linux)
 set(VCPKG_C_FLAGS "-mavx2 -mfma -mavx -mf16c -mlzcnt -mbmi2")
 set(VCPKG_CXX_FLAGS "-mavx2 -mfma -mavx -mf16c -mlzcnt -std=c++20 -mbmi2")
 set(VCPKG_LINKER_FLAGS "-static-libstdc++ -static-libgcc")
+
+# require BMI2 support for snappy on GCC-13
+if("${PORT}" STREQUAL "snappy")
+    list(APPEND VCPKG_CMAKE_CONFIGURE_OPTIONS -DSNAPPY_HAVE_BMI2=ON)
+endif()
diff --git a/dev/vcpkg/vcpkg.json b/dev/vcpkg/vcpkg.json
index fb349dd05f..12a0058252 100644
--- a/dev/vcpkg/vcpkg.json
+++ b/dev/vcpkg/vcpkg.json
@@ -113,6 +113,7 @@
   },
   "overrides": [
     { "name": "fmt", "version": "10.1.1" },
+    { "name": "liblzma", "version": "5.6.2" },
     { "name": "xsimd", "version": "10.0.0" }
   ]
 }


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to