aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorautoantwort <41973254+autoantwort@users.noreply.github.com>2021-03-16 20:00:13 +0100
committerGitHub <noreply@github.com>2021-03-16 12:00:13 -0700
commit31534bd59bc5587d268012ae14d14c41a508ae81 (patch)
tree8cdc6e196342786e4b339504402abfc28fb3cfe0
parent38b9e63dea4930cf88a16eb137ec7028594a8a75 (diff)
downloadvcpkg-31534bd59bc5587d268012ae14d14c41a508ae81.tar.gz
vcpkg-31534bd59bc5587d268012ae14d14c41a508ae81.zip
[qt5-base] make libpq an optional dependency (#16659)
* [qt5-base] make libpq an optional dependency * add version files * [qt5-base] use IN_LIST for feature check * add version files * [qt5-base] set(WITH_PGSQL OFF) * add version files * [qt5-base] set -no-sql-psql * add version files
-rw-r--r--ports/qt5-base/portfile.cmake31
-rw-r--r--ports/qt5-base/vcpkg.json9
-rw-r--r--versions/baseline.json2
-rw-r--r--versions/q-/qt5-base.json5
4 files changed, 37 insertions, 10 deletions
diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake
index ac02f7d2f..6a92bef3f 100644
--- a/ports/qt5-base/portfile.cmake
+++ b/ports/qt5-base/portfile.cmake
@@ -45,6 +45,11 @@ else()
)
endif()
+set(WITH_PGSQL OFF)
+if("postgresqlplugin" IN_LIST FEATURES)
+ set(WITH_PGSQL ON)
+endif()
+
include(qt_port_functions)
include(configure_qt)
include(install_qt)
@@ -121,7 +126,6 @@ list(APPEND CORE_OPTIONS
-system-doubleconversion
-system-sqlite
-system-harfbuzz
- -sql-psql
-icu
-no-angle) # Qt does not need to build angle. VCPKG will build angle!
@@ -129,6 +133,12 @@ if(QT_OPENSSL_LINK)
list(APPEND CORE_OPTIONS -openssl-linked)
endif()
+if(WITH_PGSQL)
+ list(APPEND CORE_OPTIONS -sql-psql)
+else()
+ list(APPEND CORE_OPTIONS -no-sql-psql)
+endif()
+
if(VCPKG_TARGET_IS_WINDOWS)
if(QT_MYSQL_PLUGIN)
list(APPEND CORE_OPTIONS -sql-mysql)
@@ -254,18 +264,20 @@ if(VCPKG_TARGET_IS_WINDOWS)
list(APPEND CORE_OPTIONS -opengl dynamic) # other possible option without moving angle dlls: "-opengl desktop". "-opengel es2" only works with commented patch
endif()
list(APPEND RELEASE_OPTIONS
- "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib"
"SQLITE_LIBS=${SQLITE_RELEASE}"
"HARFBUZZ_LIBS=${HARFBUZZ_RELEASE} ${FREETYPE_RELEASE_ALL}"
"OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib"
)
list(APPEND DEBUG_OPTIONS
- "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib"
"SQLITE_LIBS=${SQLITE_DEBUG}"
"HARFBUZZ_LIBS=${HARFBUZZ_DEBUG} ${FREETYPE_DEBUG_ALL}"
"OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib"
)
+ if(WITH_PGSQL)
+ list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib")
+ list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} ws2_32.lib secur32.lib advapi32.lib shell32.lib crypt32.lib user32.lib gdi32.lib")
+ endif()
if (QT_MYSQL_PLUGIN)
list(APPEND RELEASE_OPTIONS "MYSQL_LIBS=${MYSQL_RELEASE}")
list(APPEND DEBUG_OPTIONS "MYSQL_LIBS=${MYSQL_DEBUG}")
@@ -277,19 +289,21 @@ elseif(VCPKG_TARGET_IS_LINUX)
message(FATAL_ERROR "qt5 requires libgl1-mesa-dev and libglu1-mesa-dev, please use your distribution's package manager to install them.\nExample: \"apt-get install libgl1-mesa-dev libglu1-mesa-dev\"")
endif()
list(APPEND RELEASE_OPTIONS
- "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread"
"SQLITE_LIBS=${SQLITE_RELEASE} -ldl -lpthread"
"HARFBUZZ_LIBS=${HARFBUZZ_RELEASE} ${FREETYPE_RELEASE_ALL} ${GLIB_RELEASE} -lpthread"
"OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread"
"FONTCONFIG_LIBS=${FONTCONFIG_RELEASE} ${FREETYPE_RELEASE} ${EXPAT_RELEASE} -luuid"
)
list(APPEND DEBUG_OPTIONS
- "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_TYPES_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread"
"SQLITE_LIBS=${SQLITE_DEBUG} -ldl -lpthread"
"HARFBUZZ_LIBS=${HARFBUZZ_DEBUG} ${FREETYPE_DEBUG_ALL} ${GLIB_DEBUG} -lpthread"
"OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread"
"FONTCONFIG_LIBS=${FONTCONFIG_DEBUG} ${FREETYPE_DEBUG} ${EXPAT_DEBUG} -luuid"
)
+ if(WITH_PGSQL)
+ list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread")
+ list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_TYPES_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread")
+ endif()
elseif(VCPKG_TARGET_IS_OSX)
list(APPEND CORE_OPTIONS -fontconfig)
if(DEFINED VCPKG_OSX_DEPLOYMENT_TARGET)
@@ -315,19 +329,22 @@ elseif(VCPKG_TARGET_IS_OSX)
endif()
#list(APPEND QT_PLATFORM_CONFIGURE_OPTIONS HOST_PLATFORM ${TARGET_MKSPEC})
list(APPEND RELEASE_OPTIONS
- "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread"
"SQLITE_LIBS=${SQLITE_RELEASE} -ldl -lpthread"
"HARFBUZZ_LIBS=${HARFBUZZ_RELEASE} ${FREETYPE_RELEASE_ALL} -framework ApplicationServices"
"OPENSSL_LIBS=${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread"
"FONTCONFIG_LIBS=${FONTCONFIG_RELEASE} ${FREETYPE_RELEASE} ${EXPAT_RELEASE} -liconv"
)
list(APPEND DEBUG_OPTIONS
- "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_TYPES_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread"
"SQLITE_LIBS=${SQLITE_DEBUG} -ldl -lpthread"
"HARFBUZZ_LIBS=${HARFBUZZ_DEBUG} ${FREETYPE_DEBUG_ALL} -framework ApplicationServices"
"OPENSSL_LIBS=${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread"
"FONTCONFIG_LIBS=${FONTCONFIG_DEBUG} ${FREETYPE_DEBUG} ${EXPAT_DEBUG} -liconv"
)
+
+ if(WITH_PGSQL)
+ list(APPEND RELEASE_OPTIONS "PSQL_LIBS=${PSQL_RELEASE} ${PSQL_PORT_RELEASE} ${PSQL_TYPES_RELEASE} ${PSQL_COMMON_RELEASE} ${SSL_RELEASE} ${EAY_RELEASE} -ldl -lpthread")
+ list(APPEND DEBUG_OPTIONS "PSQL_LIBS=${PSQL_DEBUG} ${PSQL_PORT_DEBUG} ${PSQL_TYPES_DEBUG} ${PSQL_COMMON_DEBUG} ${SSL_DEBUG} ${EAY_DEBUG} -ldl -lpthread")
+ endif()
endif()
## Do not build tests or examples
diff --git a/ports/qt5-base/vcpkg.json b/ports/qt5-base/vcpkg.json
index 53f4d7746..a582fba66 100644
--- a/ports/qt5-base/vcpkg.json
+++ b/ports/qt5-base/vcpkg.json
@@ -1,7 +1,7 @@
{
"name": "qt5-base",
"version-string": "5.15.2",
- "port-version": 1,
+ "port-version": 2,
"description": "Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.",
"homepage": "https://www.qt.io/",
"dependencies": [
@@ -23,7 +23,6 @@
},
"libjpeg-turbo",
"libpng",
- "libpq",
"openssl",
"pcre2",
"sqlite3",
@@ -39,6 +38,12 @@
"dependencies": [
"libmysql"
]
+ },
+ "postgresqlplugin": {
+ "description": "Build the sql plugin for connecting to postgresql databases",
+ "dependencies": [
+ "libpq"
+ ]
}
}
}
diff --git a/versions/baseline.json b/versions/baseline.json
index 3878d3a91..b9407e0d4 100644
--- a/versions/baseline.json
+++ b/versions/baseline.json
@@ -4858,7 +4858,7 @@
},
"qt5-base": {
"baseline": "5.15.2",
- "port-version": 1
+ "port-version": 2
},
"qt5-canvas3d": {
"baseline": "0",
diff --git a/versions/q-/qt5-base.json b/versions/q-/qt5-base.json
index f46a54f1a..d9dda75a4 100644
--- a/versions/q-/qt5-base.json
+++ b/versions/q-/qt5-base.json
@@ -1,6 +1,11 @@
{
"versions": [
{
+ "git-tree": "a21da1425e7bdf8b22cca4da750b57a6cfc2a3ee",
+ "version-string": "5.15.2",
+ "port-version": 2
+ },
+ {
"git-tree": "6ab7ac474099d1ae4d91748acc50330801ed6aed",
"version-string": "5.15.2",
"port-version": 1