diff --git a/ports/harfbuzz/0003-remove-broken-test.patch b/ports/harfbuzz/0003-remove-broken-test.patch new file mode 100644 index 0000000000..2e5b78fa72 --- /dev/null +++ b/ports/harfbuzz/0003-remove-broken-test.patch @@ -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 (); + diff --git a/ports/harfbuzz/CONTROL b/ports/harfbuzz/CONTROL index 010118683b..82751a0c3b 100644 --- a/ports/harfbuzz/CONTROL +++ b/ports/harfbuzz/CONTROL @@ -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 diff --git a/ports/harfbuzz/portfile.cmake b/ports/harfbuzz/portfile.cmake index 40729c8f7e..d538c27cdf 100644 --- a/ports/harfbuzz/portfile.cmake +++ b/ports/harfbuzz/portfile.cmake @@ -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") diff --git a/ports/qt5-base/CONTROL b/ports/qt5-base/CONTROL index b9f669186c..4fd30be4ca 100644 --- a/ports/qt5-base/CONTROL +++ b/ports/qt5-base/CONTROL @@ -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 diff --git a/ports/qt5-base/portfile.cmake b/ports/qt5-base/portfile.cmake index 8a5de56d7e..ce22526229 100644 --- a/ports/qt5-base/portfile.cmake +++ b/ports/qt5-base/portfile.cmake @@ -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 diff --git a/ports/qt5-modularscripts/qt_modular_library.cmake b/ports/qt5-modularscripts/qt_modular_library.cmake index a99d184783..fc3ebdef0f 100644 --- a/ports/qt5-modularscripts/qt_modular_library.cmake +++ b/ports/qt5-modularscripts/qt_modular_library.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}) diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake index 9471786860..5b686527d1 100644 --- a/scripts/cmake/vcpkg_build_qmake.cmake +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -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} ) diff --git a/scripts/cmake/vcpkg_configure_qmake.cmake b/scripts/cmake/vcpkg_configure_qmake.cmake index 3aa30e70df..11178174e1 100644 --- a/scripts/cmake/vcpkg_configure_qmake.cmake +++ b/scripts/cmake/vcpkg_configure_qmake.cmake @@ -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.")