98 lines
3.2 KiB
Bash
98 lines
3.2 KiB
Bash
# Contributor: Mehdi Chinoune <mehdi.chinoune@hotmail.com>
|
|
|
|
_realname=qt6-activeqt
|
|
pkgbase=mingw-w64-${_realname}
|
|
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
|
|
"${MINGW_PACKAGE_PREFIX}-${_realname}-debug")
|
|
_qtver=6.10.0
|
|
pkgver=${_qtver/-/}
|
|
pkgrel=1
|
|
pkgdesc='Qt5 ActiveQt Module - ActiveX components (mingw-w64)'
|
|
arch=(any)
|
|
url='https://www.qt.io'
|
|
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
|
|
msys2_repository_url="https://code.qt.io/cgit/qt/qtactiveqt.git"
|
|
msys2_references=(
|
|
'aur: mingw-w64-qt6-activeqt'
|
|
"cpe: cpe:/a:qt:qt"
|
|
)
|
|
license=('spdx:GPL-3.0-only WITH Qt-GPL-exception-1.0 AND BSD-3-Clause AND GFDL-1.3-no-invariants-only')
|
|
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
|
"${MINGW_PACKAGE_PREFIX}-cmake"
|
|
"${MINGW_PACKAGE_PREFIX}-ninja"
|
|
"${MINGW_PACKAGE_PREFIX}-qt6-base"
|
|
"${MINGW_PACKAGE_PREFIX}-qt6-declarative"
|
|
"rsync")
|
|
_pkgfn="${_realname/6-/}-everywhere-src-${_qtver}"
|
|
source=("https://download.qt.io/official_releases/qt/${pkgver%.*}/${_qtver}/submodules/${_pkgfn}.tar.xz"
|
|
001-appending-qt6-to-remove-qt5-conflict.patch
|
|
002-Handle-win64-in-dumpcpp-and-MetaObjectGenerator-read.patch)
|
|
sha256sums=('f5d25ac73950d59c973897986eed6c7de2b640bb6a584570996e28452079a796'
|
|
'66b9460aeb5dd1144a04448cc461811157b100cb765e84d6af24fd83476a4217'
|
|
'93e1c08068e45372fb02e9a33e3366b5067817ea7de4bba4e91b6c165645cb41')
|
|
|
|
# Helper macros to help make tasks easier #
|
|
apply_patch_with_msg() {
|
|
for _patch in "$@"
|
|
do
|
|
msg2 "Applying ${_patch}"
|
|
patch -Nbp1 -i "${srcdir}/${_patch}"
|
|
done
|
|
}
|
|
|
|
prepare() {
|
|
cd $srcdir/${_pkgfn}
|
|
|
|
apply_patch_with_msg \
|
|
001-appending-qt6-to-remove-qt5-conflict.patch \
|
|
002-Handle-win64-in-dumpcpp-and-MetaObjectGenerator-read.patch
|
|
}
|
|
|
|
build() {
|
|
mkdir -p build-${MSYSTEM} && cd build-${MSYSTEM}
|
|
|
|
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
|
${MINGW_PREFIX}/bin/cmake \
|
|
--log-level=STATUS \
|
|
-GNinja \
|
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
|
../${_pkgfn}
|
|
|
|
${MINGW_PREFIX}/bin/cmake --build .
|
|
}
|
|
|
|
package_qt6-activeqt() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-qt6-base")
|
|
optdepends=("${MINGW_PACKAGE_PREFIX}-qt6-declarative")
|
|
groups=("${MINGW_PACKAGE_PREFIX}-qt6")
|
|
|
|
DESTDIR="${pkgdir}" ${MINGW_PREFIX}/bin/cmake --install build-${MSYSTEM}
|
|
|
|
# Seperate debug-info files
|
|
rsync -armR --remove-source-files --include="*/" --include="*.debug" --exclude="*" --prune-empty-dirs "${pkgdir}"/.${MINGW_PREFIX} "${srcdir}"/${MSYSTEM}-debug/
|
|
|
|
install -d "$pkgdir${MINGW_PREFIX}"/share/licenses/${_realname}
|
|
install -Dm644 $_pkgfn/LICENSES/* -t "$pkgdir${MINGW_PREFIX}"/share/licenses/${_realname}
|
|
}
|
|
|
|
package_qt6-activeqt-debug() {
|
|
depends=("${MINGW_PACKAGE_PREFIX}-qt6-base-debug"
|
|
"${MINGW_PACKAGE_PREFIX}-${_realname}")
|
|
groups=("${MINGW_PACKAGE_PREFIX}-qt6-debug")
|
|
options=('!strip')
|
|
|
|
cp -rf "${srcdir}"/${MSYSTEM}-debug${MINGW_PREFIX} "${pkgdir}"/
|
|
}
|
|
|
|
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
|
|
# vim: set ft=bash :
|
|
|
|
# generate wrappers
|
|
for _name in "${pkgname[@]}"; do
|
|
_short="package_${_name#${MINGW_PACKAGE_PREFIX}-}"
|
|
_func="$(declare -f "${_short}")"
|
|
eval "${_func/#${_short}/package_${_name}}"
|
|
done
|
|
# template end;
|