Skip to content

Commit

Permalink
[qt5] Update to 5.15.1 (#13477)
Browse files Browse the repository at this point in the history
* update everything. Let ci test if just updating is enough

* fix some minor version details.

* remove upstream patch

* add zstdd patch and do not remove zlib since it is required for bootstrapping

* add mqtt hash

* webengine hash

* add fixup pkgconfig to assimp

* add assimp to qt-3d (still requires zlib fix)

* setup pkg-config for qt

* fix psql detection in configure

* fix build details

* fix assimp library nameing

* -rpath option is not available for static builds

* move config log somewhere where CI can catch it.

* move logs only if they exists

* append bzip2 qt-3d

* break qt3d again to get logs

* retry qt3d

* remove qt-3d failure. everything ok now

* add assistent patch for qt5-tools not building qthelp

* remove unnecessary qt5-webengine patches

* Remove PSQL_TYPES

* [qt5-3d] remove irrxml as a assimp dep

* remove unnecessary patch

* fix qt-3d on windows

* fix qt5-3d linux

Co-authored-by: Robert Schumacher <roschuma@microsoft.com>
Co-authored-by: Jack·Boos·Yu <47264268+JackBoosY@users.noreply.github.com>
  • Loading branch information
3 people authored Oct 17, 2020
1 parent 32c5722 commit aa0ffba
Show file tree
Hide file tree
Showing 57 changed files with 332 additions and 221 deletions.
26 changes: 26 additions & 0 deletions ports/assimp/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,33 @@ vcpkg_configure_cmake(
)

vcpkg_install_cmake()

if(VCPKG_TARGET_IS_WINDOWS)
set(VCVER vc140 vc141 vc142 )
set(CRT mt md)
set(DBG_NAMES)
set(REL_NAMES)
foreach(_ver IN LISTS VCVER)
foreach(_crt IN LISTS CRT)
list(APPEND DBG_NAMES assimp-${_ver}-${_crt}d)
list(APPEND REL_NAMES assimp-${_ver}-${_crt})
endforeach()
endforeach()
endif()

find_library(ASSIMP_REL NAMES assimp ${REL_NAMES} PATHS "${CURRENT_PACKAGES_DIR}/lib" NO_DEFAULT_PATH)
find_library(ASSIMP_DBG NAMES assimp assimpd ${DBG_NAMES} PATHS "${CURRENT_PACKAGES_DIR}/debug/lib" NO_DEFAULT_PATH)
if(ASSIMP_REL)
get_filename_component(ASSIMP_NAME_REL "${ASSIMP_REL}" NAME_WLE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/lib/pkgconfig/assimp.pc" "-lassimp" "-l${ASSIMP_NAME_REL}")
endif()
if(ASSIMP_DBG)
get_filename_component(ASSIMP_NAME_DBG "${ASSIMP_DBG}" NAME_WLE)
vcpkg_replace_string("${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig/assimp.pc" "-lassimp" "-l${ASSIMP_NAME_DBG}")
endif()

vcpkg_fixup_cmake_targets()
vcpkg_fixup_pkgconfig() # Probably requires more fixing for static builds. See qt5-3d and the config changes below
vcpkg_copy_pdbs()

file(READ ${CURRENT_PACKAGES_DIR}/share/assimp/AssimpConfig.cmake ASSIMP_CONFIG)
Expand Down
4 changes: 2 additions & 2 deletions ports/qt5-3d/CONTROL
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Source: qt5-3d
Version: 5.15.0
Version: 5.15.1
Description: Qt5 3d Module - Functionality for near-realtime simulation systems with support for 2D and 3D rendering
Build-Depends: qt5-base[core], qt5-declarative, qt5-imageformats, qt5-gamepad
Build-Depends: qt5-base[core], qt5-declarative, qt5-imageformats, qt5-gamepad, assimp
54 changes: 53 additions & 1 deletion ports/qt5-3d/portfile.cmake
Original file line number Diff line number Diff line change
@@ -1,2 +1,54 @@
include(${CURRENT_INSTALLED_DIR}/share/qt5/qt_port_functions.cmake)
qt_submodule_installation()

set(OPTIONS -system-assimp)

if(VCPKG_TARGET_IS_WINDOWS)
set(VCVER vc140 vc141 vc142 )
set(CRT mt md)
set(DBG_NAMES)
set(REL_NAMES)
foreach(_ver IN LISTS VCVER)
foreach(_crt IN LISTS CRT)
list(APPEND DBG_NAMES assimp-${_ver}-${_crt}d)
list(APPEND REL_NAMES assimp-${_ver}-${_crt})
endforeach()
endforeach()
endif()

find_library(ASSIMP_REL NAMES assimp ${REL_NAMES} PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(ASSIMP_DBG NAMES assimp assimpd ${DBG_NAMES} PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)

find_library(MINIZIP_REL NAMES minizip PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(MINIZIP_DBG NAMES minizip minizipd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(KUBAZIP_REL NAMES kubazip PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(KUBAZIP_DBG NAMES kubazip kubazipd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(JPEG_REL NAMES jpeg jpeg-static PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(JPEG_DBG NAMES jpeg jpeg-static jpegd jpeg-staticd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(LIBPNG_REL NAMES png16 libpng16 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH) #Depends on zlib
find_library(LIBPNG_DBG NAMES png16 png16d libpng16 libpng16d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(ZLIB_REL NAMES z zlib PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(ZLIB_DBG NAMES z zlib zd zlibd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(IRRLICHT_REL NAMES Irrlicht PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(IRRLICHT_DBG NAMES Irrlicht PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(POLYCLIPPING_REL NAMES polyclipping PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(POLYCLIPPING_DBG NAMES polyclipping polyclippingd PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
find_library(POLY2TRI_REL NAMES poly2tri PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(POLY2TRI_DBG NAMES poly2tri poly2trid PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
# poly2tri
find_library(BZ2_REL bz2 PATHS "${CURRENT_INSTALLED_DIR}/lib" NO_DEFAULT_PATH)
find_library(BZ2_DBG bz2 bz2d PATHS "${CURRENT_INSTALLED_DIR}/debug/lib" NO_DEFAULT_PATH)
if(BZ2_REL)
string(APPEND MINIZIP_REL " ${BZ2_REL}")
endif()
if(BZ2_DBG)
string(APPEND MINIZIP_DBG " ${BZ2_DBG}")
endif()
if(VCPKG_TARGET_IS_WINDOWS)
set(SYSTEM_LIBS "Advapi32.lib user32.lib gdi32.lib")
else()
set(SYSTEM_LIBS "-lGL -lXxf86vm -lX11")
endif()
set(OPT_REL "ASSIMP_LIBS=${ASSIMP_REL} ${POLYCLIPPING_REL} ${POLY2TRI_REL} ${IRRLICHT_REL} ${JPEG_REL} ${LIBPNG_REL} ${KUBAZIP_REL} ${MINIZIP_REL} ${ZLIB_REL} ${SYSTEM_LIBS}")
set(OPT_DBG "ASSIMP_LIBS=${ASSIMP_DBG} ${POLYCLIPPING_DBG} ${POLY2TRI_DBG} ${IRRLICHT_DBG} ${JPEG_DBG} ${LIBPNG_DBG} ${KUBAZIP_DBG} ${MINIZIP_DBG} ${ZLIB_DBG} ${SYSTEM_LIBS}")

qt_submodule_installation(BUILD_OPTIONS ${OPTIONS} BUILD_OPTIONS_RELEASE ${OPT_REL} BUILD_OPTIONS_DEBUG ${OPT_DBG})
2 changes: 1 addition & 1 deletion ports/qt5-activeqt/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: qt5-activeqt
Version: 5.15.0
Version: 5.15.1
Description: Qt5 ActiveQt Module - ActiveX components
Build-Depends: qt5-base[core], qt5-declarative
Supports: windows
2 changes: 1 addition & 1 deletion ports/qt5-androidextras/CONTROL
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Source: qt5-androidextras
Version: 5.15.0
Version: 5.15.1
Description: Qt5 androidextras Module;
Build-Depends: qt5-base[core]
Supports: android
5 changes: 2 additions & 3 deletions ports/qt5-base/CONTROL
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
Source: qt5-base
Version: 5.15.0
Port-Version: 3
Version: 5.15.1
Homepage: https://www.qt.io/
Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.
Build-Depends: zlib, zstd, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl, angle (!windows), egl-registry, icu (!uwp), fontconfig (!windows)

Feature: latest
Description: Build latest qt version (5.15.0) instead of LTS (latest and LTS are currently the same)
Description: Build latest qt version (5.15.1) instead of LTS (latest and LTS are currently the same)
26 changes: 21 additions & 5 deletions ports/qt5-base/cmake/configure_qt.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,34 @@ function(configure_qt)
list(APPEND BUILDTYPES ${_buildname})
set(_short_name_${_buildname} "dbg")
set(_path_suffix_${_buildname} "/debug")
set(_build_type_${_buildname} "debug")
set(_build_type_${_buildname} "debug")
endif()
if(NOT DEFINED VCPKG_BUILD_TYPE OR "${VCPKG_BUILD_TYPE}" STREQUAL "release")
set(_buildname "RELEASE")
list(APPEND BUILDTYPES ${_buildname})
set(_short_name_${_buildname} "rel")
set(_path_suffix_${_buildname} "")
set(_build_type_${_buildname} "release")
set(_build_type_${_buildname} "release")
endif()
unset(_buildname)

vcpkg_find_acquire_program(PKGCONFIG)
set(ENV{PKG_CONFIG} "${PKGCONFIG}")
get_filename_component(PKGCONFIG_PATH "${PKGCONFIG}" DIRECTORY)
vcpkg_add_to_path("${PKGCONFIG_PATH}")

foreach(_buildname ${BUILDTYPES})
set(PKGCONFIG_INSTALLED_DIR "${_VCPKG_INSTALLED_PKGCONF}${_path_suffix_${_buildname}}/lib/pkgconfig")
set(PKGCONFIG_INSTALLED_SHARE_DIR "${_VCPKG_INSTALLED_PKGCONF}/share/pkgconfig")
set(PKGCONFIG_PACKAGES_DIR "${_VCPKG_PACKAGES_PKGCONF}${_path_suffix_${_buildname}}/lib/pkgconfig")
set(PKGCONFIG_PACKAGES_SHARE_DIR "${_VCPKG_PACKAGES_PKGCONF}/share/pkgconfig")
if(DEFINED ENV{PKG_CONFIG_PATH})
set(BACKUP_ENV_PKG_CONFIG_PATH_${_config} $ENV{PKG_CONFIG_PATH})
set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}$ENV{PKG_CONFIG_PATH}")
else()
set(ENV{PKG_CONFIG_PATH} "${PKGCONFIG_INSTALLED_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_INSTALLED_SHARE_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_DIR}${VCPKG_HOST_PATH_SEPARATOR}${PKGCONFIG_PACKAGES_SHARE_DIR}")
endif()

set(_build_triplet ${TARGET_TRIPLET}-${_short_name_${_buildname}})
message(STATUS "Configuring ${_build_triplet}")
set(_build_dir "${CURRENT_BUILDTREES_DIR}/${_build_triplet}")
Expand All @@ -74,7 +90,7 @@ function(configure_qt)
# makefiles will be fixed to install into CURRENT_PACKAGES_DIR in install_qt
set(BUILD_OPTIONS ${_csc_OPTIONS} ${_csc_OPTIONS_${_buildname}}
-prefix ${CURRENT_INSTALLED_DIR}
-extprefix ${CURRENT_INSTALLED_DIR}
#-extprefix ${CURRENT_INSTALLED_DIR}
${EXT_BIN_DIR}
-hostprefix ${CURRENT_INSTALLED_DIR}/tools/qt5${_path_suffix_${_buildname}}
#-hostprefix ${CURRENT_INSTALLED_DIR}/tools/qt5
Expand All @@ -94,10 +110,10 @@ function(configure_qt)
-I ${CURRENT_INSTALLED_DIR}/include
-L ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib
-L ${CURRENT_INSTALLED_DIR}${_path_suffix_${_buildname}}/lib/manual-link
-xplatform ${_csc_TARGET_PLATFORM}
-platform ${_csc_TARGET_PLATFORM}
)

if(DEFINED _csc_HOST_TOOLS_ROOT) #use qmake
if(DEFINED _csc_HOST_TOOLS_ROOT) #use qmake
if(WIN32)
set(INVOKE_OPTIONS "QMAKE_CXX.QMAKE_MSC_VER=1911" "QMAKE_MSC_VER=1911")
endif()
Expand Down
Loading

1 comment on commit aa0ffba

@Matioupi
Copy link
Contributor

@Matioupi Matioupi commented on aa0ffba Oct 18, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On my machine, build was fully successful before this commit, but the qt5-webengine part is now failling to upgrade with the following error line in C:\Dev\vcpkg\buildtrees\qt5-webengine\package-build-x64-windows-dbg-out.log :

C:\Dev\vcpkg\buildtrees\qt5-webengine\x64-windows-dbg\src\core\debug\gen\net/third_party/quiche/src/quic/core/proto/cached_network_parameters.pb.h(17): fatal error C1189: #error: This file was generated by an older version of protoc which is

may be related to #12150

Please sign in to comment.