author | Antonio Rojas
<arojas@archlinux.org> 2022-03-17 21:38:57 UTC |
committer | Antonio Rojas
<arojas@archlinux.org> 2022-03-17 21:38:57 UTC |
parent | 2ff124766c9ec09888e2269dd589512b1e82e888 |
PKGBUILD | +15 | -5 |
no-qmake.patch | +110 | -0 |
qt5-webengine-python3.patch | +31 | -11 |
diff --git a/PKGBUILD b/PKGBUILD index a54fb8b..e77360a 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -10,27 +10,37 @@ arch=('any') url='https://www.qt.io' license=('GPL3' 'LGPL3' 'FDL' 'custom') makedepends=('qt5-tools' 'python' 'pciutils' 'libxtst' 'libxcursor' 'libxrandr' 'libxss' 'libxcomposite' - 'gperf' 'nss' 'clang') + 'gperf' 'nss' 'clang' 'nodejs') groups=('qt' 'qt5') _pkgfqn="qt-everywhere-opensource-src-${pkgver}" source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${pkgver}/single/${_pkgfqn}.tar.xz" - qt5-webengine-python3.patch) + qt5-webengine-python3.patch + no-qmake.patch) sha256sums=('b7412734698a87f4a0ae20751bab32b1b07fdc351476ad8e35328dbe10efdedb' - '5ad3f81a32f612872f48098354120459c7650c398cd653c3ff5e6641dfc5c615') + '398c996cb5b606695ac93645143df39e23fa67e768b09e0da6dbd37342a43f32' + '7893df4981d6611c5aaeb4cc69bc77d14b4251842b205591a563f9a7184dfb0a') prepare() { cd ${_pkgfqn/opensource-/} ln -s /usr/bin qttools/ - ln -s /usr/bin/{rcc,uic,moc} qtbase/bin/ + ln -s /usr/bin/{rcc,uic,moc,qmake} qtbase/bin/ + patch -d qtbase -p1 < "$srcdir"/no-qmake.patch # Use system qmake patch -d qtwebengine -p1 < "$srcdir"/qt5-webengine-python3.patch # Fix build with Python 3 } build() { cd ${_pkgfqn/opensource-/} - qmake CONFIG+="confirm-license opensource" + ./configure -confirm-license -opensource \ + -prefix /usr \ + -docdir /usr/share/doc/qt \ + -headerdir /usr/include/qt \ + -archdatadir /usr/lib/qt \ + -datadir /usr/share/qt \ + -sysconfdir /etc/xdg \ + -nomake examples make docs } diff --git a/no-qmake.patch b/no-qmake.patch new file mode 100644 index 0000000..9fdf5c8 --- /dev/null +++ b/no-qmake.patch @@ -0,0 +1,110 @@ +diff --git a/configure b/configure +index b6c9b462f2..b426aa2085 100755 +--- a/configure ++++ b/configure +@@ -711,105 +711,6 @@ setBootstrapVariable() + getQMakeConf "$1" | echo ${2-$1} = `if [ -n "$3" ]; then sed "$3"; else cat; fi` >> "$mkfile" + } + +-# build qmake +- echo "Creating qmake..." +- mkdir -p "$outpath/qmake" || exit +- +- in_mkfile=$relpath/qmake/Makefile.unix +- mkfile=$outpath/qmake/Makefile +- if [ -f "$mkfile" ]; then +- [ "$CFG_DEV" = "yes" ] && "$WHICH" chflags >/dev/null 2>&1 && chflags nouchg "$mkfile" +- rm -f "$mkfile" +- fi +- +- echo "########################################################################" > "$mkfile" +- echo "## This file was autogenerated by configure, all changes will be lost ##" >> "$mkfile" +- echo "########################################################################" >> "$mkfile" +- EXTRA_CXXFLAGS="\$(QMAKE_CXXFLAGS) \$(QMAKE_CXXFLAGS_CXX11) \$(QMAKE_CXXFLAGS_SPLIT_SECTIONS)" +- EXTRA_LFLAGS="\$(QMAKE_LFLAGS) \$(QMAKE_LFLAGS_GCSECTIONS)" +- +- [ "$CFG_SILENT" = "yes" ] && CC_TRANSFORM='s,^,\@,' || CC_TRANSFORM= +- setBootstrapVariable QMAKE_CC CC "$CC_TRANSFORM" +- setBootstrapVariable QMAKE_CXX CXX "$CC_TRANSFORM" +- setBootstrapVariable QMAKE_CXXFLAGS +- setBootstrapVariable QMAKE_CXXFLAGS_CXX11 +- setBootstrapVariable QMAKE_CXXFLAGS_SPLIT_SECTIONS +- setBootstrapVariable QMAKE_LFLAGS +- setBootstrapVariable QMAKE_LFLAGS_GCSECTIONS +- +- if [ "$CFG_DEBUG" = "no" ] || [ "$CFG_RELEASE_TOOLS" = "yes" ]; then +- setBootstrapVariable QMAKE_CXXFLAGS_RELEASE +- EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_RELEASE)" +- else +- setBootstrapVariable QMAKE_CXXFLAGS_DEBUG +- EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS \$(QMAKE_CXXFLAGS_DEBUG)" +- fi +- +- adjrelpath=`echo "$relpath" | sed 's/ /\\\\\\\\ /g'` +- adjoutpath=`echo "$outpath" | sed 's/ /\\\\\\\\ /g'` +- adjqmakespec=`echo "$QMAKESPEC" | sed 's/ /\\\\\\\\ /g'` +- +- echo "BUILD_PATH = .." >> "$mkfile" +- echo "SOURCE_PATH = $adjrelpath" >> "$mkfile" +- if [ -e "$relpath/.git" ]; then +- echo 'INC_PATH = $(BUILD_PATH)/include' >> "$mkfile" +- else +- echo 'INC_PATH = $(SOURCE_PATH)/include' >> "$mkfile" +- fi +- echo "QMAKESPEC = $adjqmakespec" >> "$mkfile" +- echo "QT_VERSION = $QT_VERSION" >> "$mkfile" +- echo "QT_MAJOR_VERSION = $QT_MAJOR_VERSION" >> "$mkfile" +- echo "QT_MINOR_VERSION = $QT_MINOR_VERSION" >> "$mkfile" +- echo "QT_PATCH_VERSION = $QT_PATCH_VERSION" >> "$mkfile" +- echo "CONFIG_CXXFLAGS = $EXTRA_CXXFLAGS" >> "$mkfile" +- echo "CONFIG_LFLAGS = $EXTRA_LFLAGS" >> "$mkfile" +- echo "RM_F = rm -f" >> "$mkfile" +- echo "RM_RF = rm -rf" >> "$mkfile" +- +- case `basename "$PLATFORM"` in +- win32-*g++*) +- cat "$in_mkfile.win32" >> "$mkfile" +- ;; +- *) +- cat "$in_mkfile.unix" >> "$mkfile" +- if [ "$BUILD_ON_MAC" = "yes" ]; then +- cat "$in_mkfile.macos" >> "$mkfile" +- fi +- ;; +- esac +- echo >>"$mkfile" +- +- if [ "$BUILD_ON_MAC" = "yes" ]; then +- echo "EXTRA_CXXFLAGS += -MMD" >> "$mkfile" +- cat "$in_mkfile" >> "$mkfile" +- echo "-include \$(notdir \$(DEPEND_SRC:%.cpp=%.d))" >> "$mkfile" +- else +- cat "$in_mkfile" >> "$mkfile" +- if "$WHICH" makedepend >/dev/null 2>&1 && grep 'depend:' "$mkfile" >/dev/null 2>&1; then +- (cd "$outpath/qmake" && "$MAKE" -f "$mkfile" depend) >/dev/null 2>&1 +- sed 's,^.*/\([^/]*.o\):,\1:,g' "$mkfile" >"$mkfile.tmp" +- sed "s,$outpath,$adjoutpath,g" "$mkfile.tmp" >"$mkfile" +- rm "$mkfile.tmp" +- fi +- fi +- +- if [ "$OPT_VERBOSE" = yes ]; then +- # Show the output of make +- (cd "$outpath/qmake"; "$MAKE") || exit 2 +- else +- # Hide the output of make +- # Use bash to print dots, if we have it, and stdout is a tty. +- if test -t 1 && $WHICH bash > /dev/null 2>/dev/null; then +- bash -c 'set -o pipefail +- cd "$0/qmake"; "$1" | while read line; do +- builtin echo -n . +- done' "$outpath" "$MAKE" || exit 2 +- else +- (cd "$outpath/qmake"; "$MAKE" -s) || exit 2 +- fi +- echo "Done." +- fi +- + #------------------------------------------------------------------------------- + # create a qt.conf for the Qt build tree itself + #------------------------------------------------------------------------------- diff --git a/qt5-webengine-python3.patch b/qt5-webengine-python3.patch index 3ce5043..0b75727 100644 --- a/qt5-webengine-python3.patch +++ b/qt5-webengine-python3.patch @@ -1,18 +1,29 @@ diff --git a/configure.pri b/configure.pri -index e072961f..5efe30bc 100644 +index 8705ad93..6723bffe 100644 --- a/configure.pri +++ b/configure.pri -@@ -12,10 +12,6 @@ defineTest(isPythonVersionSupported) { - python_version ~= s/[()]//g - python_version = $$split(python_version, ',') - python_major_version = $$first(python_version) +@@ -7,20 +7,7 @@ QTWEBENGINE_SOURCE_TREE = $$PWD + equals(QMAKE_HOST.os, Windows): EXE_SUFFIX = .exe + + defineTest(isPythonVersionSupported) { +- python = $$system_quote($$system_path($$1)) +- python_version = $$system('$$python -c "import sys; print(sys.version_info[0:3])"') +- python_version ~= s/[()]//g +- python_version = $$split(python_version, ',') +- python_major_version = $$first(python_version) - greaterThan(python_major_version, 2) { - qtLog("Python version 3 is not supported by Chromium.") - return(false) - } - python_minor_version = $$member(python_version, 1) - python_patch_version = $$member(python_version, 2) - greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true) +- python_minor_version = $$member(python_version, 1) +- python_patch_version = $$member(python_version, 2) +- greaterThan(python_major_version, 1): greaterThan(python_minor_version, 6): greaterThan(python_patch_version, 4): return(true) +- qtLog("Unsupported python version: $${python_major_version}.$${python_minor_version}.$${python_patch_version}.") +- return(false) ++ return(true) + } + + defineTest(qtConfTest_detectJumboBuild) { @@ -52,10 +48,10 @@ defineTest(qtConfReport_jumboBuild) { qtConfReportPadded($${1}, $$mergeLimit) } @@ -100,7 +111,7 @@ diff --git a/src/buildtools/configure.json b/src/buildtools/configure.json index 88d1790c..032aa665 100644 --- a/src/buildtools/configure.json +++ b/src/buildtools/configure.json -@@ -289,9 +289,9 @@ +@@ -295,9 +295,9 @@ "label": "system ninja", "type": "detectNinja" }, @@ -113,7 +124,16 @@ index 88d1790c..032aa665 100644 "log": "location" }, "webengine-winversion": { -@@ -394,7 +394,7 @@ +@@ -374,7 +374,7 @@ + && features.webengine-gperf + && features.webengine-bison + && features.webengine-flex +- && features.webengine-python2 ++ && features.webengine-python + && features.webengine-nodejs + && (!config.sanitizer || features.webengine-sanitizer) + && (!config.linux || features.pkg-config) +@@ -400,7 +400,7 @@ && features.webengine-gperf && features.webengine-bison && features.webengine-flex @@ -122,7 +142,7 @@ index 88d1790c..032aa665 100644 && (!config.sanitizer || features.webengine-sanitizer) && (!config.linux || features.pkg-config) && (!config.linux || features.webengine-host-pkg-config) -@@ -417,12 +417,12 @@ +@@ -423,12 +423,12 @@ "autoDetect": "features.private_tests", "output": [ "privateFeature" ] },