diff options
author | bill-auger <mr.j.spam.me@gmail.com> | 2024-03-18 18:14:44 -0400 |
---|---|---|
committer | bill-auger <mr.j.spam.me@gmail.com> | 2024-03-20 19:41:04 -0400 |
commit | 6e73bcae31cb367f9152c62168eca0388fd224da (patch) | |
tree | 5c48271c79607df1ae9033efcbdcb36ebfee55ab | |
parent | 1bc3fa9abe50eecd03e2771546279de1401ec058 (diff) |
qt5-webkit: rebuild against latest 'qt5-base'
-rw-r--r-- | libre/qt5-webkit/PKGBUILD | 54 |
1 files changed, 52 insertions, 2 deletions
diff --git a/libre/qt5-webkit/PKGBUILD b/libre/qt5-webkit/PKGBUILD index e99dbaa5b..139369890 100644 --- a/libre/qt5-webkit/PKGBUILD +++ b/libre/qt5-webkit/PKGBUILD @@ -15,6 +15,14 @@ # (qt5-base-N.N.N) <- qt5-webkit <- python-pyqt5 <- qutebrowser +# NOTE: This version of the PKGBUILD is quite messy. +# It is being built for armv7h with an archived 'pkgconf' package; +# because the current armv7h 'pkgconf' fails to detect sqlite libs properly. +# It includes many comments documenting various errors encountered +# with different versions of deps and compilers and attempted fixes. +# The next commit will clean-up. + + pkgname=qt5-webkit _pkgver=5.212.0-alpha4 pkgver=${_pkgver/-/} @@ -38,8 +46,11 @@ depends=(qt5-location qt5-sensors qt5-webchannel libwebp libxcomposite gst-plugi qt5-base qt5-declarative) # libxslt makedepends=(cmake ruby gperf python qt5-doc qt5-tools) +#makedepends+=(dos2unix) # FIXME: - FTBS for armv7h - this did not help +#makedepends+=(clang llvm) # FIXME: - FTBS for armv7h - this did not help either optdepends=('gst-plugins-good: Webm codec support') options=(!lto) +[[ "${CARCH}" == armv7h ]] && options+=(!debug) # reduce memory usage for armv7h sha256sums=('9ca126da9273664dd23a3ccd0c9bebceb7bb534bddd743db31caf6a5a6d4a9e6' '4c71c958eae45cae65c9f002024eb1369d06029b668e595158138ff7971e64f1' '0b40ed924f03ff6081af610bb0ee01560b7bd1fb68f8af02053304a01d4ccdf0' @@ -48,6 +59,17 @@ sha256sums=('9ca126da9273664dd23a3ccd0c9bebceb7bb534bddd743db31caf6a5a6d4a9e6' '34f37b53ee0bc31c63ce85ebd1ae95543a8ba28483e387b20efd50574bd813be') +## dependency tweaks ## + +# FIXME: Could NOT find Sqlite (missing: SQLITE_LIBRARIES) +# [[ "${CARCH}" == armv7h ]] && makedepends+=( 'sqlite<=3.45.0' ) # did not work +# [[ "${CARCH}" == armv7h ]] && makedepends=( ${makedepends[*]/cmake/} 'cmake<=3.28.1' ) # dustbin 2024-01-31 +[[ "${CARCH}" == armv7h ]] && makedepends+=( 'pkgconf<=2.1.0' ) # dustbin 2024-01-31 + +# reduce memory usage for armv7h - avoid linker OOM +#[[ "${CARCH}" == armv7h ]] && makedepends+=( lld ) + + _version_constraint() # (dep_pkgname [precision]) { Log() { [[ "${FUNCNAME[2]}" == package ]] && echo "$@" >&2 || : ; } @@ -105,11 +127,39 @@ prepare() { patch -p1 -i ../qt5-webkit-python-3.9.patch # Fix build with python 3.9 patch -p1 -i ../qt5-webkit-bison-3.7.patch # Fix build with bison 3.7 patch -p1 -i ../qtwebkit-cstdint.patch # gcc 11.1 + + # FIXME: - FTBS for armv7h - 2023-10 + # WIP - GCC failure could be due to UTF-16 sources + #echo "converting UTF-16 sources to UTF-8 ...." + #find -type f -print0 | xargs -0 dos2unix --safe --keep-bom --add-eol --quiet || : } build() { + local make_opts=() + # reduce memory usage for armv7h -# [[ "${CARCH}" != armv7h ]] || export LDFLAGS+=' -Wl,--no-keep-memory -Wl,--reduce-memory-overheads' + # FIXME: - FTBS for armv7h - 2023-10 + # > virtual memory exhausted: Connot allocate memory + # `cmake --build build -- -j1` # also fails: + # > cc1plus: out of memory allocating 1420112 bytes after a total of 41308160 bytes + # `export CC=clang CXX=clang++` # did not help + # new error 2024-01 + # > /usr/bin/ld: failed to set dynamic section sizes: memory exhausted + # also failed using -fuse-ld=bfd" + # > /usr/bin/ld.bfd: could not compute sections lists for stub generation: memory exhausted + # > qemu: uncaught target signal 11 (Segmentation fault) - core dumped + # > collect2: fatal error: ld terminated with signal 11 [Segmentation fault], core dumped + # > compilation terminated. + # also failed using -fuse-ld=lld" + # > ld.lld: error: version script assignment of 'Qt_5.15' to symbol 'qt_version_tag' failed: symbol not defined + if [[ "${CARCH}" == armv7h ]] + then export CXXFLAGS="${CXXFLAGS} -fuse-ld=bfd" + export LDFLAGS+=' -Wl,--no-keep-memory -Wl,--reduce-memory-overheads' +# then export CXXFLAGS="${CXXFLAGS} -fuse-ld=lld" +# export LDFLAGS+=' -Wl,--no-keep-memory' +# make_opts=( '--' '-j1') + make_opts=( '--' '-j4') + fi cmake -B build -S "qtwebkit-${_pkgver}" -Wno-dev \ -DCMAKE_BUILD_TYPE=Release \ @@ -118,7 +168,7 @@ build() { -DPORT=Qt \ -DENABLE_XSLT=OFF \ -DENABLE_TOOLS=OFF - cmake --build build + cmake --build build ${make_opts[*]} # disabling XSLT to build https://github.com/qtwebkit/qtwebkit/issues/1097 } |