mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 18:31:15 +08:00
[qt5] Fix mac build (#5624)
* [qt5] Fix mac build * [qt5] Disable parallel build on mac * [qt5] Fix qmake find on mac * [qt5] Update find jom for mac * [qt5] Fix invocation of build command * [qt5-base] Rebuild packages for #5624 * [harfbuzz] Remove disabled assert (failing due to -Werror) * [qt5] Bump control version * [qt5] Disable harfbuzz on mac * [qt5-base] Disable harfbuzz on mac
This commit is contained in:
parent
e37a6c65d6
commit
f409536f5e
23
ports/harfbuzz/0003-remove-broken-test.patch
Normal file
23
ports/harfbuzz/0003-remove-broken-test.patch
Normal file
@ -0,0 +1,23 @@
|
||||
--- a/src/hb-coretext.cc
|
||||
+++ b/src/hb-coretext.cc
|
||||
@@ -1059,20 +1059,6 @@
|
||||
buffer->len += num_glyphs;
|
||||
}
|
||||
|
||||
- /* Mac OS 10.6 doesn't have kCTTypesetterOptionForcedEmbeddingLevel,
|
||||
- * or if it does, it doesn't respect it. So we get runs with wrong
|
||||
- * directions. As such, disable the assert... It wouldn't crash, but
|
||||
- * cursoring will be off...
|
||||
- *
|
||||
- * https://crbug.com/419769
|
||||
- */
|
||||
- if (false)
|
||||
- {
|
||||
- /* Make sure all runs had the expected direction. */
|
||||
- bool backward = HB_DIRECTION_IS_BACKWARD (buffer->props.direction);
|
||||
- assert (bool (status_and & kCTRunStatusRightToLeft) == backward);
|
||||
- assert (bool (status_or & kCTRunStatusRightToLeft) == backward);
|
||||
- }
|
||||
|
||||
buffer->clear_positions ();
|
||||
|
@ -1,5 +1,5 @@
|
||||
Source: harfbuzz
|
||||
Version: 2.3.1
|
||||
Version: 2.3.1-2
|
||||
Description: HarfBuzz OpenType text shaping engine
|
||||
Build-Depends: freetype, ragel, gettext (osx)
|
||||
Default-Features: ucdn
|
||||
|
@ -9,6 +9,7 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
0001-fix-cmake-export.patch
|
||||
0002-fix-uwp-build.patch
|
||||
0003-remove-broken-test.patch
|
||||
)
|
||||
|
||||
SET(HB_HAVE_ICU "OFF")
|
||||
|
@ -1,4 +1,4 @@
|
||||
Source: qt5-base
|
||||
Version: 5.12.1-2
|
||||
Version: 5.12.1-3
|
||||
Description: Qt5 Application Framework Base Module. Includes Core, GUI, Widgets, Networking, SQL, Concurrent and other essential qt components.
|
||||
Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz, sqlite3, libpq, double-conversion, openssl
|
||||
Build-Depends: zlib, libjpeg-turbo, libpng, freetype, pcre2, harfbuzz (!osx), sqlite3, libpq, double-conversion, openssl
|
||||
|
@ -48,7 +48,6 @@ set(CORE_OPTIONS
|
||||
-system-libpng
|
||||
-system-freetype
|
||||
-system-pcre
|
||||
-system-harfbuzz
|
||||
-system-doubleconversion
|
||||
-system-sqlite
|
||||
-no-fontconfig
|
||||
@ -71,6 +70,7 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore
|
||||
OPTIONS
|
||||
${CORE_OPTIONS}
|
||||
-mp
|
||||
-system-harfbuzz
|
||||
-opengl desktop # other options are "-no-opengl", "-opengl angle", and "-opengl desktop"
|
||||
OPTIONS_RELEASE
|
||||
LIBJPEG_LIBS="-ljpeg"
|
||||
@ -94,6 +94,7 @@ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
PLATFORM "linux-g++"
|
||||
OPTIONS
|
||||
${CORE_OPTIONS}
|
||||
-system-harfbuzz
|
||||
OPTIONS_RELEASE
|
||||
"LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libjpeg.a"
|
||||
"QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libpng16.a"
|
||||
@ -113,9 +114,40 @@ elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
||||
"PSQL_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpqd.a ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.a ${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.a -ldl -lpthread"
|
||||
"SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libsqlite3.a -ldl -lpthread"
|
||||
)
|
||||
|
||||
elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
configure_qt(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PLATFORM "macx-clang"
|
||||
OPTIONS
|
||||
${CORE_OPTIONS}
|
||||
-no-harfbuzz
|
||||
OPTIONS_RELEASE
|
||||
"LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libjpeg.a"
|
||||
"QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libpng16.a"
|
||||
"QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/lib/libz.a"
|
||||
"ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/lib/libz.a"
|
||||
"LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpng16.a"
|
||||
"FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libfreetype.a"
|
||||
"PSQL_LIBS=${CURRENT_INSTALLED_DIR}/lib/libpq.a ${CURRENT_INSTALLED_DIR}/lib/libssl.a ${CURRENT_INSTALLED_DIR}/lib/libcrypto.a -ldl -lpthread"
|
||||
"SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/lib/libsqlite3.a -ldl -lpthread"
|
||||
OPTIONS_DEBUG
|
||||
"LIBJPEG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libjpeg.a"
|
||||
"QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a"
|
||||
"QMAKE_LIBS_PRIVATE+=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a"
|
||||
"ZLIB_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libz.a"
|
||||
"LIBPNG_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpng16d.a"
|
||||
"FREETYPE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libfreetyped.a"
|
||||
"PSQL_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libpqd.a ${CURRENT_INSTALLED_DIR}/debug/lib/libssl.a ${CURRENT_INSTALLED_DIR}/debug/lib/libcrypto.a -ldl -lpthread"
|
||||
"SQLITE_LIBS=${CURRENT_INSTALLED_DIR}/debug/lib/libsqlite3.a -ldl -lpthread"
|
||||
)
|
||||
endif()
|
||||
|
||||
install_qt()
|
||||
if(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
||||
install_qt(DISABLE_PARALLEL) # prevent race condition on Mac
|
||||
else()
|
||||
install_qt()
|
||||
endif()
|
||||
|
||||
file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake ${CURRENT_PACKAGES_DIR}/share/cmake)
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake)
|
||||
@ -133,7 +165,7 @@ endif()
|
||||
|
||||
file(COPY ${CMAKE_CURRENT_LIST_DIR}/qt_debug.conf ${CMAKE_CURRENT_LIST_DIR}/qt_release.conf DESTINATION ${CURRENT_PACKAGES_DIR}/tools/qt5)
|
||||
|
||||
vcpkg_execute_required_process(
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${PYTHON3} ${CMAKE_CURRENT_LIST_DIR}/fixcmake.py
|
||||
WORKING_DIRECTORY ${CURRENT_PACKAGES_DIR}/share/cmake
|
||||
LOGNAME fix-cmake
|
||||
|
@ -38,8 +38,13 @@ function(qt_modular_library NAME HASH)
|
||||
file(TO_NATIVE_PATH "${CURRENT_INSTALLED_DIR}" NATIVE_INSTALLED_DIR)
|
||||
file(TO_NATIVE_PATH "${CURRENT_PACKAGES_DIR}" NATIVE_PACKAGES_DIR)
|
||||
|
||||
string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE)
|
||||
string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE)
|
||||
if(WIN32)
|
||||
string(SUBSTRING "${NATIVE_INSTALLED_DIR}" 2 -1 INSTALLED_DIR_WITHOUT_DRIVE)
|
||||
string(SUBSTRING "${NATIVE_PACKAGES_DIR}" 2 -1 PACKAGES_DIR_WITHOUT_DRIVE)
|
||||
else()
|
||||
set(INSTALLED_DIR_WITHOUT_DRIVE ${NATIVE_INSTALLED_DIR})
|
||||
set(PACKAGES_DIR_WITHOUT_DRIVE ${NATIVE_PACKAGES_DIR})
|
||||
endif()
|
||||
|
||||
#Configure debug+release
|
||||
vcpkg_configure_qmake(SOURCE_PATH ${SOURCE_PATH})
|
||||
|
@ -9,7 +9,14 @@
|
||||
|
||||
function(vcpkg_build_qmake)
|
||||
cmake_parse_arguments(_csc "SKIP_MAKEFILES" "BUILD_LOGNAME" "TARGETS;RELEASE_TARGETS;DEBUG_TARGETS" ${ARGN})
|
||||
vcpkg_find_acquire_program(JOM)
|
||||
|
||||
if(CMAKE_HOST_WIN32)
|
||||
vcpkg_find_acquire_program(JOM)
|
||||
set(INVOKE "${JOM}")
|
||||
else()
|
||||
find_program(MAKE make)
|
||||
set(INVOKE "${MAKE}")
|
||||
endif()
|
||||
|
||||
# Make sure that the linker finds the libraries used
|
||||
set(ENV_PATH_BACKUP "$ENV{PATH}")
|
||||
@ -29,7 +36,7 @@ function(vcpkg_build_qmake)
|
||||
function(run_jom TARGETS LOG_PREFIX LOG_SUFFIX)
|
||||
message(STATUS "Package ${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX}")
|
||||
vcpkg_execute_required_process(
|
||||
COMMAND ${JOM} ${TARGETS}
|
||||
COMMAND ${INVOKE} ${TARGETS}
|
||||
WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-${LOG_SUFFIX}
|
||||
LOGNAME package-${LOG_PREFIX}-${TARGET_TRIPLET}-${LOG_SUFFIX}
|
||||
)
|
||||
|
@ -17,7 +17,7 @@ function(vcpkg_configure_qmake)
|
||||
cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN})
|
||||
|
||||
# Find qmake executable
|
||||
find_program(QMAKE_COMMAND NAMES qmake.exe PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5)
|
||||
find_program(QMAKE_COMMAND NAMES qmake PATHS ${CURRENT_INSTALLED_DIR}/tools/qt5)
|
||||
|
||||
if(NOT QMAKE_COMMAND)
|
||||
message(FATAL_ERROR "vcpkg_configure_qmake: unable to find qmake.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user