From fcf0b34550edabb59e75bc10abef76214d808e17 Mon Sep 17 00:00:00 2001
From: Tal Regev <tal.regev@gmail.com>
Date: Thu, 12 May 2022 15:15:44 +0300
Subject: [PATCH 1/6] Take gperf from vcpkg tool if possible

---
 ports/fontconfig/portfile.cmake | 4 +---
 ports/fontconfig/vcpkg.json     | 6 +++++-
 versions/baseline.json          | 2 +-
 versions/f-/fontconfig.json     | 5 +++++
 4 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake
index f8f1d1f1c541df..0a5af73424e7b0 100644
--- a/ports/fontconfig/portfile.cmake
+++ b/ports/fontconfig/portfile.cmake
@@ -12,9 +12,7 @@ vcpkg_from_gitlab(
         libgetopt.patch
 )
 
-vcpkg_find_acquire_program(GPERF)
-get_filename_component(GPERF_PATH ${GPERF} DIRECTORY)
-vcpkg_add_to_path(${GPERF_PATH})
+vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/")
 
 vcpkg_configure_meson(
     SOURCE_PATH ${SOURCE_PATH}
diff --git a/ports/fontconfig/vcpkg.json b/ports/fontconfig/vcpkg.json
index 28a77f62e1ef20..7631fae57394c0 100644
--- a/ports/fontconfig/vcpkg.json
+++ b/ports/fontconfig/vcpkg.json
@@ -1,7 +1,7 @@
 {
   "name": "fontconfig",
   "version": "2.14.0",
-  "port-version": 1,
+  "port-version": 2,
   "description": "Library for configuring and customizing font access.",
   "homepage": "https://www.freedesktop.org/wiki/Software/fontconfig",
   "license": "MIT",
@@ -11,6 +11,10 @@
     "freetype",
     "getopt",
     "gettext",
+    {
+      "name": "gperf",
+      "host": true
+    },
     "libiconv",
     {
       "name": "libuuid",
diff --git a/versions/baseline.json b/versions/baseline.json
index ad426a70d7b2e0..c939282e7a6f8e 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -2290,7 +2290,7 @@
     },
     "fontconfig": {
       "baseline": "2.14.0",
-      "port-version": 1
+      "port-version": 2
     },
     "foonathan-memory": {
       "baseline": "2019-07-21",
diff --git a/versions/f-/fontconfig.json b/versions/f-/fontconfig.json
index 068c6f259ab263..cd4d92e74cc137 100644
--- a/versions/f-/fontconfig.json
+++ b/versions/f-/fontconfig.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "54f599dd541f7721dcc68e06c328e55098d0f9b5",
+      "version": "2.14.0",
+      "port-version": 2
+    },
     {
       "git-tree": "b1b1de99dba230f78c88bb9d73329bed77227ad4",
       "version": "2.14.0",

From cae2ef97acd29246283e38a53b2304bbec6d3793 Mon Sep 17 00:00:00 2001
From: Robert Schumacher <roschuma@microsoft.com>
Date: Thu, 26 May 2022 16:52:39 +0000
Subject: [PATCH 2/6] [gperf] Install binary into tools/gperf/

---
 ports/fontconfig/portfile.cmake  |  2 +-
 ports/freetds/portfile.cmake     | 10 +---------
 ports/freetds/vcpkg.json         |  5 +++++
 ports/gperf/portfile.cmake       |  2 +-
 ports/gperf/vcpkg.json           |  2 +-
 ports/kf5codecs/portfile.cmake   |  4 +---
 ports/kf5codecs/vcpkg.json       |  1 +
 ports/proxygen/portfile.cmake    | 11 +----------
 ports/proxygen/vcpkg.json        |  6 +++++-
 ports/qtwebengine/portfile.cmake |  6 +++---
 ports/qtwebengine/vcpkg.json     |  2 +-
 versions/baseline.json           | 10 +++++-----
 versions/f-/fontconfig.json      |  2 +-
 versions/f-/freetds.json         |  5 +++++
 versions/g-/gperf.json           |  5 +++++
 versions/k-/kf5codecs.json       |  5 +++++
 versions/p-/proxygen.json        |  5 +++++
 versions/q-/qtwebengine.json     |  5 +++++
 18 files changed, 52 insertions(+), 36 deletions(-)

diff --git a/ports/fontconfig/portfile.cmake b/ports/fontconfig/portfile.cmake
index 0a5af73424e7b0..da4002236c3d67 100644
--- a/ports/fontconfig/portfile.cmake
+++ b/ports/fontconfig/portfile.cmake
@@ -12,7 +12,7 @@ vcpkg_from_gitlab(
         libgetopt.patch
 )
 
-vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/")
+vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf")
 
 vcpkg_configure_meson(
     SOURCE_PATH ${SOURCE_PATH}
diff --git a/ports/freetds/portfile.cmake b/ports/freetds/portfile.cmake
index b2cc9db38b47ea..df4672ac817e67 100644
--- a/ports/freetds/portfile.cmake
+++ b/ports/freetds/portfile.cmake
@@ -18,15 +18,7 @@ vcpkg_find_acquire_program(PERL)
 get_filename_component(PERL_PATH ${PERL} DIRECTORY)
 vcpkg_add_to_path("${PERL_PATH}")
 
-if (VCPKG_TARGET_IS_WINDOWS)
-    vcpkg_find_acquire_program(GPERF)
-    get_filename_component(GPERF_PATH ${GPERF} DIRECTORY)
-    vcpkg_add_to_path(${GPERF_PATH})
-else()
-    if (NOT EXISTS /usr/bin/gperf)
-        message(FATAL_ERROR "freetds requires gperf, these can be installed on Ubuntu systems via apt-get install gperf.")
-    endif()
-endif()
+vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gperf")
 
 set(_WCHAR_SUPPORT ON)
 if(NOT VCPKG_TARGET_IS_WINDOWS)
diff --git a/ports/freetds/vcpkg.json b/ports/freetds/vcpkg.json
index 73b7bffb24fa97..5483fdf9947013 100644
--- a/ports/freetds/vcpkg.json
+++ b/ports/freetds/vcpkg.json
@@ -1,11 +1,16 @@
 {
   "name": "freetds",
   "version": "1.3.10",
+  "port-version": 1,
   "description": "Implementation of the Tabular Data Stream protocol",
   "homepage": "https://www.freetds.org",
   "license": "GPL-2.0-only",
   "supports": "windows & !uwp",
   "dependencies": [
+    {
+      "name": "gperf",
+      "host": true
+    },
     {
       "name": "libmysql",
       "platform": "windows"
diff --git a/ports/gperf/portfile.cmake b/ports/gperf/portfile.cmake
index 1e589d7c937189..4fb63cccb0411a 100644
--- a/ports/gperf/portfile.cmake
+++ b/ports/gperf/portfile.cmake
@@ -16,7 +16,7 @@ file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH})
 
 vcpkg_configure_cmake(
     SOURCE_PATH ${SOURCE_PATH}
-    OPTIONS_RELEASE -DCMAKE_INSTALL_BINDIR=tools
+    OPTIONS_RELEASE -DCMAKE_INSTALL_BINDIR=tools/gperf
 )
 
 vcpkg_install_cmake()
diff --git a/ports/gperf/vcpkg.json b/ports/gperf/vcpkg.json
index da0d637c4eee9e..b4da92bab9a0b0 100644
--- a/ports/gperf/vcpkg.json
+++ b/ports/gperf/vcpkg.json
@@ -1,7 +1,7 @@
 {
   "name": "gperf",
   "version": "3.1",
-  "port-version": 3,
+  "port-version": 4,
   "description": "GNU perfect hash function generator",
   "homepage": "https://www.gnu.org/software/gperf/"
 }
diff --git a/ports/kf5codecs/portfile.cmake b/ports/kf5codecs/portfile.cmake
index 538664fa9ec6e6..74ab1e09eb53e8 100644
--- a/ports/kf5codecs/portfile.cmake
+++ b/ports/kf5codecs/portfile.cmake
@@ -9,13 +9,11 @@ vcpkg_from_github(
 # Prevent KDEClangFormat from writing to source effectively blocking parallel configure
 file(WRITE "${SOURCE_PATH}/.clang-format" "DisableFormat: true\nSortIncludes: false\n")
 
-find_program(GPERF_EXE NAMES gperf PATHS "${CURRENT_HOST_INSTALLED_DIR}/tools" NO_DEFAULT_PATH)
-
 vcpkg_cmake_configure(
     SOURCE_PATH "${SOURCE_PATH}"
     OPTIONS
         -DBUILD_TESTING=OFF
-        "-DGperf_EXECUTABLE=${GPERF_EXE}"
+        "-DGperf_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/gperf${VCPKG_HOST_EXECUTABLE_SUFFIX}"
 )
 
 vcpkg_cmake_install()
diff --git a/ports/kf5codecs/vcpkg.json b/ports/kf5codecs/vcpkg.json
index 3e53561c2509bc..7ffe07cc435d5f 100644
--- a/ports/kf5codecs/vcpkg.json
+++ b/ports/kf5codecs/vcpkg.json
@@ -1,6 +1,7 @@
 {
   "name": "kf5codecs",
   "version": "5.89.0",
+  "port-version": 1,
   "description": "String encoding library",
   "homepage": "https://api.kde.org/frameworks/kcodecs/html/index.html",
   "dependencies": [
diff --git a/ports/proxygen/portfile.cmake b/ports/proxygen/portfile.cmake
index 524f98d401cdbe..d9767e7515b5b5 100644
--- a/ports/proxygen/portfile.cmake
+++ b/ports/proxygen/portfile.cmake
@@ -13,16 +13,7 @@ vcpkg_find_acquire_program(PYTHON3)
 get_filename_component(PYTHON3_PATH "${PYTHON3}" DIRECTORY)
 vcpkg_add_to_path(${PYTHON3_PATH})
 
-if (VCPKG_TARGET_IS_WINDOWS)
-    vcpkg_find_acquire_program(GPERF)
-    get_filename_component(GPERF_PATH ${GPERF} DIRECTORY)
-    vcpkg_add_to_path(${GPERF_PATH})
-else()
-    # gperf only have windows package in vcpkg now.
-    if (NOT EXISTS /usr/bin/gperf)
-        message(FATAL_ERROR "proxygen requires gperf, these can be installed on Ubuntu systems via apt-get install gperf.")
-    endif()
-endif()
+vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf")
 
 vcpkg_cmake_configure(
     SOURCE_PATH ${SOURCE_PATH}
diff --git a/ports/proxygen/vcpkg.json b/ports/proxygen/vcpkg.json
index a0f89963a6353f..223c1775b04009 100644
--- a/ports/proxygen/vcpkg.json
+++ b/ports/proxygen/vcpkg.json
@@ -1,7 +1,7 @@
 {
   "name": "proxygen",
   "version-string": "2022.03.21.00",
-  "port-version": 1,
+  "port-version": 2,
   "description": "It comprises the core C++ HTTP abstractions used at Facebook.",
   "homepage": "https://github.com/facebook/proxygen",
   "supports": "!windows",
@@ -16,6 +16,10 @@
     "boost-thread",
     "fizz",
     "folly",
+    {
+      "name": "gperf",
+      "host": true
+    },
     "openssl",
     {
       "name": "vcpkg-cmake",
diff --git a/ports/qtwebengine/portfile.cmake b/ports/qtwebengine/portfile.cmake
index 469852f8324e5e..71c80e132f680c 100644
--- a/ports/qtwebengine/portfile.cmake
+++ b/ports/qtwebengine/portfile.cmake
@@ -44,7 +44,6 @@ endif()
 
 vcpkg_find_acquire_program(FLEX)
 vcpkg_find_acquire_program(BISON)
-vcpkg_find_acquire_program(GPERF)
 
 #vcpkg_find_acquire_program(GN) # Qt builds its own internal version
 
@@ -54,8 +53,6 @@ if(NOT NODEJS)
     message(FATAL_ERROR "node not found! Please install it via your system package manager!")
 endif()
 
-get_filename_component(GPERF_DIR "${GPERF}" DIRECTORY )
-vcpkg_add_to_path(PREPEND "${GPERF_DIR}")
 get_filename_component(NODEJS_DIR "${NODEJS}" DIRECTORY )
 vcpkg_add_to_path(PREPEND "${NODEJS_DIR}")
 get_filename_component(FLEX_DIR "${FLEX}" DIRECTORY )
@@ -73,6 +70,9 @@ else()
     x_vcpkg_get_python_packages(PYTHON_EXECUTABLE "${PYTHON3}" PACKAGES html5lib)
 endif()
 
+vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf")
+set(GPERF "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf${VCPKG_HOST_EXECUTABLE_SUFFIX}")
+
 if(WIN32) # WIN32 HOST probably has win_flex and win_bison!
     if(NOT EXISTS "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}")
         file(CREATE_LINK "${FLEX}" "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}")
diff --git a/ports/qtwebengine/vcpkg.json b/ports/qtwebengine/vcpkg.json
index 0c84aa2301e438..23f385d67bdfa3 100644
--- a/ports/qtwebengine/vcpkg.json
+++ b/ports/qtwebengine/vcpkg.json
@@ -2,7 +2,7 @@
   "$comment": "x86-windows is not within the upstream support matrix of Qt6",
   "name": "qtwebengine",
   "version": "6.3.0",
-  "port-version": 1,
+  "port-version": 2,
   "description": "Qt WebEngine",
   "homepage": "https://www.qt.io/",
   "license": null,
diff --git a/versions/baseline.json b/versions/baseline.json
index c939282e7a6f8e..8faf14fe29ce84 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -2338,7 +2338,7 @@
     },
     "freetds": {
       "baseline": "1.3.10",
-      "port-version": 0
+      "port-version": 1
     },
     "freetype": {
       "baseline": "2.12.1",
@@ -2610,7 +2610,7 @@
     },
     "gperf": {
       "baseline": "3.1",
-      "port-version": 3
+      "port-version": 4
     },
     "gperftools": {
       "baseline": "2019-09-02",
@@ -3146,7 +3146,7 @@
     },
     "kf5codecs": {
       "baseline": "5.89.0",
-      "port-version": 0
+      "port-version": 1
     },
     "kf5completion": {
       "baseline": "5.89.0",
@@ -5606,7 +5606,7 @@
     },
     "proxygen": {
       "baseline": "2022.03.21.00",
-      "port-version": 1
+      "port-version": 2
     },
     "psimd": {
       "baseline": "2021-02-21",
@@ -6014,7 +6014,7 @@
     },
     "qtwebengine": {
       "baseline": "6.3.0",
-      "port-version": 1
+      "port-version": 2
     },
     "qtwebsockets": {
       "baseline": "6.3.0",
diff --git a/versions/f-/fontconfig.json b/versions/f-/fontconfig.json
index cd4d92e74cc137..7b747ad2ed8a11 100644
--- a/versions/f-/fontconfig.json
+++ b/versions/f-/fontconfig.json
@@ -1,7 +1,7 @@
 {
   "versions": [
     {
-      "git-tree": "54f599dd541f7721dcc68e06c328e55098d0f9b5",
+      "git-tree": "5c02d2ba027c9f390729a7e0899e63c853450dfb",
       "version": "2.14.0",
       "port-version": 2
     },
diff --git a/versions/f-/freetds.json b/versions/f-/freetds.json
index 64d7d576e5c420..dbf20710e755af 100644
--- a/versions/f-/freetds.json
+++ b/versions/f-/freetds.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "f365af451bec37affd10982bf34e555db1aa6d96",
+      "version": "1.3.10",
+      "port-version": 1
+    },
     {
       "git-tree": "c388be84a1c4bb7156aaf173f1ee348d500db8ad",
       "version": "1.3.10",
diff --git a/versions/g-/gperf.json b/versions/g-/gperf.json
index addff5181f260b..8cae417ec76312 100644
--- a/versions/g-/gperf.json
+++ b/versions/g-/gperf.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "c6e1937825fa20f40768ce8cafbe841df81a2cca",
+      "version": "3.1",
+      "port-version": 4
+    },
     {
       "git-tree": "15455ef99f1ce92d079d047e90fc486c098c6b18",
       "version": "3.1",
diff --git a/versions/k-/kf5codecs.json b/versions/k-/kf5codecs.json
index 05b772b73895fa..32c319cdcf7f5a 100644
--- a/versions/k-/kf5codecs.json
+++ b/versions/k-/kf5codecs.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "1ee95fd45b38db22662d323fde54499cd01c80f7",
+      "version": "5.89.0",
+      "port-version": 1
+    },
     {
       "git-tree": "689fa05db3db3ea404ccec181b0a8bba8e614562",
       "version": "5.89.0",
diff --git a/versions/p-/proxygen.json b/versions/p-/proxygen.json
index 3b9e342522e8b5..51842ba59d5b8e 100644
--- a/versions/p-/proxygen.json
+++ b/versions/p-/proxygen.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "27f0950fcf11ac8f561591363715ddf581146325",
+      "version-string": "2022.03.21.00",
+      "port-version": 2
+    },
     {
       "git-tree": "fb9493259e80636642c06b40479c36b6b4c9cba2",
       "version-string": "2022.03.21.00",
diff --git a/versions/q-/qtwebengine.json b/versions/q-/qtwebengine.json
index afcecd55057c15..a9b1f9957b8360 100644
--- a/versions/q-/qtwebengine.json
+++ b/versions/q-/qtwebengine.json
@@ -1,5 +1,10 @@
 {
   "versions": [
+    {
+      "git-tree": "43f41f43dcf563cdbd7718dd51b5e61f3c49c065",
+      "version": "6.3.0",
+      "port-version": 2
+    },
     {
       "git-tree": "6562d0a0294290afd20da039ff60602c1f3f4701",
       "version": "6.3.0",

From a424b69c41ecbda0015155bd0ea22929a3197565 Mon Sep 17 00:00:00 2001
From: Tal Regev <tal.regev@gmail.com>
Date: Fri, 27 May 2022 23:38:55 +0300
Subject: [PATCH 3/6] Fix kf5codecs gperf bug

---
 ports/kf5codecs/portfile.cmake | 2 +-
 versions/k-/kf5codecs.json     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ports/kf5codecs/portfile.cmake b/ports/kf5codecs/portfile.cmake
index 74ab1e09eb53e8..26713a368e4fe2 100644
--- a/ports/kf5codecs/portfile.cmake
+++ b/ports/kf5codecs/portfile.cmake
@@ -13,7 +13,7 @@ vcpkg_cmake_configure(
     SOURCE_PATH "${SOURCE_PATH}"
     OPTIONS
         -DBUILD_TESTING=OFF
-        "-DGperf_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/gperf${VCPKG_HOST_EXECUTABLE_SUFFIX}"
+        "-DGperf_EXECUTABLE=${CURRENT_HOST_INSTALLED_DIR}/tools/gperf/gperf${VCPKG_HOST_EXECUTABLE_SUFFIX}"
 )
 
 vcpkg_cmake_install()
diff --git a/versions/k-/kf5codecs.json b/versions/k-/kf5codecs.json
index 32c319cdcf7f5a..b4d9a4b4deaa35 100644
--- a/versions/k-/kf5codecs.json
+++ b/versions/k-/kf5codecs.json
@@ -1,7 +1,7 @@
 {
   "versions": [
     {
-      "git-tree": "1ee95fd45b38db22662d323fde54499cd01c80f7",
+      "git-tree": "3f089e2bf752a07b60871e0cbc1bcdf085b3e7fd",
       "version": "5.89.0",
       "port-version": 1
     },

From 8babf18dfb50c7e2b81aa42b3457275566788e67 Mon Sep 17 00:00:00 2001
From: Tal Regev <tal.regev@gmail.com>
Date: Fri, 27 May 2022 23:54:14 +0300
Subject: [PATCH 4/6] Add PREPEND to freetds port

---
 ports/freetds/portfile.cmake | 2 +-
 versions/f-/freetds.json     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ports/freetds/portfile.cmake b/ports/freetds/portfile.cmake
index df4672ac817e67..288f2de314677e 100644
--- a/ports/freetds/portfile.cmake
+++ b/ports/freetds/portfile.cmake
@@ -18,7 +18,7 @@ vcpkg_find_acquire_program(PERL)
 get_filename_component(PERL_PATH ${PERL} DIRECTORY)
 vcpkg_add_to_path("${PERL_PATH}")
 
-vcpkg_add_to_path("${CURRENT_HOST_INSTALLED_DIR}/tools/gperf")
+vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf")
 
 set(_WCHAR_SUPPORT ON)
 if(NOT VCPKG_TARGET_IS_WINDOWS)
diff --git a/versions/f-/freetds.json b/versions/f-/freetds.json
index dbf20710e755af..0deb3189ea14f7 100644
--- a/versions/f-/freetds.json
+++ b/versions/f-/freetds.json
@@ -1,7 +1,7 @@
 {
   "versions": [
     {
-      "git-tree": "f365af451bec37affd10982bf34e555db1aa6d96",
+      "git-tree": "7d2a8c09978586d81a52529c94a96dd2f1208ebe",
       "version": "1.3.10",
       "port-version": 1
     },

From 78faab248d60cbd99cccfbf032a0ec352642b9be Mon Sep 17 00:00:00 2001
From: Tal Regev <tal.regev@gmail.com>
Date: Sat, 28 May 2022 00:01:54 +0300
Subject: [PATCH 5/6] fix gperf for qtwebengine

---
 ports/qtwebengine/portfile.cmake | 2 +-
 versions/q-/qtwebengine.json     | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/ports/qtwebengine/portfile.cmake b/ports/qtwebengine/portfile.cmake
index 71c80e132f680c..f228d620affe73 100644
--- a/ports/qtwebengine/portfile.cmake
+++ b/ports/qtwebengine/portfile.cmake
@@ -71,7 +71,7 @@ else()
 endif()
 
 vcpkg_add_to_path(PREPEND "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf")
-set(GPERF "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf${VCPKG_HOST_EXECUTABLE_SUFFIX}")
+set(GPERF "${CURRENT_HOST_INSTALLED_DIR}/tools/gperf/gperf${VCPKG_HOST_EXECUTABLE_SUFFIX}")
 
 if(WIN32) # WIN32 HOST probably has win_flex and win_bison!
     if(NOT EXISTS "${FLEX_DIR}/flex${VCPKG_HOST_EXECUTABLE_SUFFIX}")
diff --git a/versions/q-/qtwebengine.json b/versions/q-/qtwebengine.json
index a9b1f9957b8360..9d0138056fb67a 100644
--- a/versions/q-/qtwebengine.json
+++ b/versions/q-/qtwebengine.json
@@ -1,7 +1,7 @@
 {
   "versions": [
     {
-      "git-tree": "43f41f43dcf563cdbd7718dd51b5e61f3c49c065",
+      "git-tree": "ba12115753d2ea8f4527fdb135447c2e76923d68",
       "version": "6.3.0",
       "port-version": 2
     },

From 4e97ff54f2d39bf8ec5567c64c386d8cb45f1e6b Mon Sep 17 00:00:00 2001
From: Tal Regev <tal.regev@gmail.com>
Date: Sat, 28 May 2022 00:19:50 +0300
Subject: [PATCH 6/6] make gperf modern port

---
 ports/gperf/portfile.cmake   |  4 ++--
 ports/gperf/vcpkg.json       | 12 +++++++++++-
 ports/qtwebengine/vcpkg.json |  4 ++++
 versions/g-/gperf.json       |  2 +-
 versions/q-/qtwebengine.json |  2 +-
 5 files changed, 19 insertions(+), 5 deletions(-)

diff --git a/ports/gperf/portfile.cmake b/ports/gperf/portfile.cmake
index 4fb63cccb0411a..34644af1b936d4 100644
--- a/ports/gperf/portfile.cmake
+++ b/ports/gperf/portfile.cmake
@@ -14,12 +14,12 @@ vcpkg_extract_source_archive_ex(
 file(COPY ${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt DESTINATION ${SOURCE_PATH})
 file(COPY ${CMAKE_CURRENT_LIST_DIR}/config.h.in DESTINATION ${SOURCE_PATH})
 
-vcpkg_configure_cmake(
+vcpkg_cmake_configure(
     SOURCE_PATH ${SOURCE_PATH}
     OPTIONS_RELEASE -DCMAKE_INSTALL_BINDIR=tools/gperf
 )
 
-vcpkg_install_cmake()
+vcpkg_cmake_install()
 
 file(INSTALL ${SOURCE_PATH}/COPYING DESTINATION ${CURRENT_PACKAGES_DIR}/share/${PORT} RENAME copyright)
 file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug)
diff --git a/ports/gperf/vcpkg.json b/ports/gperf/vcpkg.json
index b4da92bab9a0b0..02f6116f1ff0b2 100644
--- a/ports/gperf/vcpkg.json
+++ b/ports/gperf/vcpkg.json
@@ -3,5 +3,15 @@
   "version": "3.1",
   "port-version": 4,
   "description": "GNU perfect hash function generator",
-  "homepage": "https://www.gnu.org/software/gperf/"
+  "homepage": "https://www.gnu.org/software/gperf/",
+  "dependencies": [
+    {
+      "name": "vcpkg-cmake",
+      "host": true
+    },
+    {
+      "name": "vcpkg-cmake-config",
+      "host": true
+    }
+  ]
 }
diff --git a/ports/qtwebengine/vcpkg.json b/ports/qtwebengine/vcpkg.json
index 23f385d67bdfa3..9198d677d58fc3 100644
--- a/ports/qtwebengine/vcpkg.json
+++ b/ports/qtwebengine/vcpkg.json
@@ -24,6 +24,10 @@
       "name": "glib",
       "platform": "!windows"
     },
+    {
+      "name": "gperf",
+      "host": true
+    },
     {
       "name": "harfbuzz",
       "platform": "!windows"
diff --git a/versions/g-/gperf.json b/versions/g-/gperf.json
index 8cae417ec76312..9421e9188f6486 100644
--- a/versions/g-/gperf.json
+++ b/versions/g-/gperf.json
@@ -1,7 +1,7 @@
 {
   "versions": [
     {
-      "git-tree": "c6e1937825fa20f40768ce8cafbe841df81a2cca",
+      "git-tree": "2fd0763af6d1af5d123d81c77fe9062d33b3e918",
       "version": "3.1",
       "port-version": 4
     },
diff --git a/versions/q-/qtwebengine.json b/versions/q-/qtwebengine.json
index 9d0138056fb67a..842e438b99cd35 100644
--- a/versions/q-/qtwebengine.json
+++ b/versions/q-/qtwebengine.json
@@ -1,7 +1,7 @@
 {
   "versions": [
     {
-      "git-tree": "ba12115753d2ea8f4527fdb135447c2e76923d68",
+      "git-tree": "fb2bc02591f25285ed7e085bce22001d42ec5d87",
       "version": "6.3.0",
       "port-version": 2
     },