59 lines
2.2 KiB
Bash
59 lines
2.2 KiB
Bash
# Maintainer: Martchus <martchus@gmx.net>
|
|
|
|
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
|
|
# you also find the URL of a binary repository.
|
|
|
|
pkgname=wasm-qt6-tools
|
|
_qtver=6.7.2
|
|
pkgver=${_qtver/-/}
|
|
pkgrel=1
|
|
arch=(any)
|
|
url='https://www.qt.io'
|
|
license=(GPL3 LGPL3 FDL custom)
|
|
pkgdesc='A cross-platform application and UI framework (tools, wasm)'
|
|
depends=('wasm-qt6-base')
|
|
makedepends=('wasm-qt6-declarative' 'qt6-declarative' 'qt6-tools' 'cmake' 'ninja')
|
|
options=('!strip' '!buildflags' 'staticlibs' '!emptydirs')
|
|
groups=(wasm-qt6)
|
|
_pkgfqn="qttools-everywhere-src-${_qtver}"
|
|
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfqn}.tar.xz"
|
|
'0001-Enable-only-SQL-plugins-which-are-known-to-work.patch')
|
|
sha256sums=('58e855ad1b2533094726c8a425766b63a04a0eede2ed85086860e54593aa4b2a'
|
|
'fd92a44c8b230f20e0bd26db9569956cc26ffb417cec67f70d17cecd5321ec77')
|
|
|
|
prepare () {
|
|
cd $_pkgfqn
|
|
|
|
# apply patches; further descriptions can be found in patch files itself
|
|
for patch in "$srcdir/"*.patch; do
|
|
msg2 "Applying patch $patch"
|
|
patch -p1 -i "$patch"
|
|
done
|
|
}
|
|
|
|
build() {
|
|
export EMSDK=/usr/lib/emscripten
|
|
/usr/lib/emscripten/emcmake cmake -G Ninja -B build -S $_pkgfqn \
|
|
-DCMAKE_FIND_ROOT_PATH:PATH="/usr/lib/emscripten/system" \
|
|
-DCMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES="/usr/lib/emscripten/system/include" \
|
|
-DCMAKE_CXX_IMPLICIT_INCLUDE_DIRECTORIES="/usr/lib/emscripten/system/include" \
|
|
-DCMAKE_INSTALL_PREFIX:PATH="/usr/lib/emscripten/system" \
|
|
-DBUILD_SHARED_LIBS=OFF \
|
|
-DFEATURE_static_runtime=ON \
|
|
-DFEATURE_thread=ON \
|
|
-DQT_INCLUDE_DIRS_NO_SYSTEM=ON \
|
|
-DQT_HOST_PATH=/usr
|
|
VERBOSE=1 cmake --build build
|
|
}
|
|
|
|
package() {
|
|
DESTDIR="$pkgdir" cmake --install build
|
|
|
|
install -Dm644 $_pkgfqn/LICENSES/* -t "$pkgdir"/usr/share/licenses/$pkgname
|
|
|
|
find "${pkgdir}"/usr/lib/emscripten/system -type f -name 'lib*.so' -exec /usr/lib/emscripten/emstrip -g --strip-unneeded {} \;
|
|
find "${pkgdir}"/usr/lib/emscripten/system -type f -name 'lib*.a' -exec /usr/lib/emscripten/emstrip -g {} \;
|
|
[[ -d "${pkgdir}"/usr/lib/emscripten/system/share/doc ]] && rm -r "${pkgdir}"/usr/lib/emscripten/system/share/doc || true
|
|
|
|
}
|