Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix macos 13 build #69

Merged
merged 4 commits into from
Jan 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions Build-qt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@
set -ex
set -o pipefail

script_dir=$(cd $(dirname $0) || exit 1; pwd)


#
# Configuration
#
Expand Down Expand Up @@ -345,6 +348,28 @@ then
fi
cd ..

# Build Python 2.7: required to build QtWebEngine and QtPdf in Qt 5.15.x
echo "Build Python 2.7"

cwd=$(pwd)

mkdir -p python-cmake-buildsystem-build
if [[ ! -d python-cmake-buildsystem ]]
then
git clone https://github.com/python-cmake-buildsystem/python-cmake-buildsystem.git
fi
cd python-cmake-buildsystem-build
$cmake \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DCMAKE_INSTALL_PREFIX:PATH=$cwd/python-cmake-buildsystem-install \
-DPYTHON_VERSION:STRING=2.7.15 \
-DBUILD_LIBPYTHON_SHARED:BOOL=ON \
-DENABLE_SSL:BOOL=OFF \
../python-cmake-buildsystem

$cmake --build $cwd/python-cmake-buildsystem-build --config Release --target install -- -j$nbthreads
cd ..

popd

# Build Qt
Expand All @@ -358,13 +383,16 @@ qt_install_dir_options="-prefix $install_dir"
if [[ ! -d $src_dir ]]
then
tar --no-same-owner -xf $deps_dir/$qt_archive

# Apply patches
pushd $src_dir
git apply --ignore-whitespace $script_dir/patches/*.patch
popd

fi
cd $src_dir

# Options used to mimic the homebrew packaging of Qt5
#qt_homebrew_package_options="-system-zlib -qt-libpng -qt-libjpeg -qt-freetype -qt-pcre -dbus-runtime -proprietary-codecs"
qt_build_mode="-silent"
qt_build_mode="-verbose"
export PATH=$deps_dir/python-cmake-buildsystem-install/bin:$PATH

# NOTE: C++14 is needed to support QtWebEngine from chromium
./configure $qt_install_dir_options \
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 8467beddb7239cc213ae13900fa30e3d26df5e78 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=98ystein=20Heskestad?= <[email protected]>
Date: Wed, 27 Oct 2021 13:07:46 +0200
Subject: [PATCH] Add missing macOS header file that was indirectly included
before

Change-Id: I4d4c7d4f957fc36dea5e06eb6d661aeecf6385f1
(cherry picked from commit dece6f5840463ae2ddf927d65eb1b3680e34a547)
Reviewed-by: Volker Hilsheimer <[email protected]>
---
src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h | 2 ++
1 file changed, 2 insertions(+)

diff --git a/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h b/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
index dd3ebca4a65..ee7ac5c0143 100644
--- a/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
+++ b/qtbase/src/plugins/platforms/cocoa/qiosurfacegraphicsbuffer.h
@@ -43,6 +43,8 @@
#include <qpa/qplatformgraphicsbuffer.h>
#include <private/qcore_mac_p.h>

+#include <CoreGraphics/CGColorSpace.h>
+
QT_BEGIN_NAMESPACE

class QIOSurfaceGraphicsBuffer : public QPlatformGraphicsBuffer
11 changes: 11 additions & 0 deletions patches/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Qt Patches

Fixes and improvements to Qt that should first be contributed upstream. The [Qt Contribution Guidelines](https://wiki.qt.io/Qt_Contribution_Guidelines) is a great resource to guide you through the process.

Each patch is documented by adding an entry below. Whenever possible, references to bugs.python.org https://bugreports.qt.io/, corresponding GitHub PRs and any related discussions on forums or mailing lists are also provided.

Before being applied, patches are sorted alphabetically. This ensures that patch starting with 0001- is applied before the one starting with 0002-.

## Patches

* [0001-8467beddb-add-missing-macos-header-file-that-was-indirectly-included.patch][0001-8467beddb-add-missing-macos-header-file-that-was-indirectly-included.patch] adapted from [qt/qtbase@8467beddb](https://github.com/qt/qtbase/commit/8467beddb7239cc213ae13900fa30e3d26df5e78). The `qtbase/` sub-directory has been added to the patch.