2015-08-04 20:04:32 +02:00
|
|
|
# Maintainer: Martchus <martchus@gmx.net>
|
2016-03-25 21:43:59 +01:00
|
|
|
|
|
|
|
# All my PKGBUILDs are managed at https://github.com/Martchus/PKGBUILDs where
|
|
|
|
# you also find the URL of a binary repository.
|
|
|
|
|
2015-12-02 02:20:30 +01:00
|
|
|
_reponame=qtutilities
|
2015-06-24 23:12:08 +02:00
|
|
|
pkgname=mingw-w64-qtutilities
|
2016-09-11 23:37:58 +02:00
|
|
|
_name=${pkgname#mingw-w64-}
|
2024-01-02 15:29:40 +01:00
|
|
|
pkgver=6.13.4
|
2022-08-02 19:00:03 +02:00
|
|
|
pkgrel=1
|
2015-06-24 23:12:08 +02:00
|
|
|
arch=('any')
|
2016-09-11 23:37:58 +02:00
|
|
|
pkgdesc='Common Qt related C++ classes and routines used by my applications such as dialogs, widgets and models (mingw-w64)'
|
2015-06-24 23:12:08 +02:00
|
|
|
license=('GPL')
|
|
|
|
depends=('mingw-w64-crt' 'mingw-w64-qt5-base' 'mingw-w64-c++utilities')
|
2017-08-04 10:53:10 +02:00
|
|
|
optdepends=("$_name-doc: API documentation")
|
2020-06-10 18:47:25 +02:00
|
|
|
checkdepends=('mingw-w64-wine')
|
2020-10-04 01:04:01 +02:00
|
|
|
makedepends=('mingw-w64-gcc' 'mingw-w64-cmake' 'mingw-w64-qt5-tools' 'ninja')
|
2015-12-02 02:20:30 +01:00
|
|
|
url="https://github.com/Martchus/${_reponame}"
|
2016-10-03 14:23:34 +02:00
|
|
|
source=("${_name}-${pkgver}.tar.gz::https://github.com/Martchus/${_reponame}/archive/v${pkgver}.tar.gz")
|
2024-01-02 15:29:40 +01:00
|
|
|
sha256sums=('547d9e122d399ed3a86ec0b5fe078e0b54ab3e9a3e613efdaac4f6bb63fb5007')
|
2015-12-06 19:17:57 +01:00
|
|
|
options=(!buildflags staticlibs !strip !emptydirs)
|
2019-05-04 16:29:53 +02:00
|
|
|
|
|
|
|
_architectures=('i686-w64-mingw32' 'x86_64-w64-mingw32')
|
|
|
|
_configurations=()
|
|
|
|
[[ $NO_SHARED_LIBS ]] || _configurations+=('shared')
|
2020-12-19 21:30:33 +01:00
|
|
|
[[ $NO_STATIC_LIBS ]] || _configurations+=('static') makedepends+=('mingw-w64-qt5-base-static' 'mingw-w64-qt5-translations')
|
2015-06-24 23:12:08 +02:00
|
|
|
|
|
|
|
build() {
|
2015-12-24 16:50:30 +01:00
|
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
2019-05-04 16:29:53 +02:00
|
|
|
|
|
|
|
declare -A _config_flags=(
|
|
|
|
[shared]='
|
|
|
|
-DBUILD_SHARED_LIBS:BOOL=ON
|
|
|
|
'
|
|
|
|
[static]='
|
|
|
|
-DBUILD_SHARED_LIBS:BOOL=OFF
|
|
|
|
-DCMAKE_FIND_LIBRARY_SUFFIXES:STRING=.a;.lib
|
|
|
|
-DSTATIC_LINKAGE:BOOL=ON
|
|
|
|
-DSTATIC_LIBRARY_LINKAGE:BOOL=ON
|
2019-10-21 17:14:30 +02:00
|
|
|
-DBUILTIN_TRANSLATIONS:BOOL=ON
|
2019-05-04 16:29:53 +02:00
|
|
|
-DQT_PACKAGE_PREFIX=StaticQt5
|
|
|
|
-DKF_PACKAGE_PREFIX=StaticKF5
|
2022-05-03 23:45:38 +02:00
|
|
|
-DSVG_SUPPORT:BOOL=OFF
|
|
|
|
-DSVG_ICON_SUPPORT:BOOL=OFF
|
2019-05-04 16:29:53 +02:00
|
|
|
'
|
|
|
|
)
|
|
|
|
|
|
|
|
for _arch in "${_architectures[@]}"; do
|
|
|
|
for _cfg in "${_configurations[@]}"; do
|
|
|
|
msg2 "${_arch}-${_cfg}"
|
|
|
|
mkdir -p "build-${_arch}-${_cfg}" && pushd "build-${_arch}-${_cfg}"
|
|
|
|
${_arch}-cmake \
|
2020-10-04 01:04:01 +02:00
|
|
|
-G Ninja \
|
2019-05-04 16:29:53 +02:00
|
|
|
-DCMAKE_BUILD_TYPE:STRING='Release' \
|
2018-01-12 16:49:18 +01:00
|
|
|
-DCMAKE_INSTALL_PREFIX="/usr/${_arch}" \
|
2019-05-04 16:29:53 +02:00
|
|
|
-DCONFIGURATION_NAME:STRING="${_cfg}" \
|
|
|
|
-DCONFIGURATION_PACKAGE_SUFFIX:STRING="-${_cfg}" \
|
2020-10-04 01:04:01 +02:00
|
|
|
-DENABLE_TARGETS_FOR_MINGW64_CROSS_PACKAGING:BOOL=ON \
|
2019-05-04 16:29:53 +02:00
|
|
|
${_config_flags[$_cfg]} \
|
|
|
|
../
|
2020-10-04 01:04:01 +02:00
|
|
|
ninja
|
2019-05-04 16:29:53 +02:00
|
|
|
popd
|
|
|
|
done
|
2015-12-24 16:50:30 +01:00
|
|
|
done
|
2015-06-24 23:12:08 +02:00
|
|
|
}
|
|
|
|
|
2020-06-10 18:47:25 +02:00
|
|
|
check() {
|
|
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
|
|
|
|
|
|
|
for _arch in "${_architectures[@]}"; do
|
|
|
|
for _cfg in "${_configurations[@]}"; do
|
|
|
|
msg2 "${_arch}-${_cfg}"
|
|
|
|
pushd "build-${_arch}-${_cfg}"
|
2020-10-04 01:04:01 +02:00
|
|
|
export WINEPATH="/usr/${_arch}/bin" WINEDEBUG=-all
|
2020-11-04 14:28:20 +01:00
|
|
|
export QT_QPA_PLATFORM=offscreen
|
|
|
|
[[ $_cfg == shared ]] && ninja tests
|
2020-06-10 18:47:25 +02:00
|
|
|
popd
|
|
|
|
done
|
|
|
|
done
|
|
|
|
}
|
|
|
|
|
2015-06-24 23:12:08 +02:00
|
|
|
package() {
|
2015-12-24 16:50:30 +01:00
|
|
|
cd "$srcdir/${PROJECT_DIR_NAME:-$_reponame-$pkgver}"
|
2019-05-04 16:29:53 +02:00
|
|
|
|
|
|
|
for _arch in "${_architectures[@]}"; do
|
|
|
|
for _cfg in "${_configurations[@]}"; do
|
|
|
|
msg2 "${_arch}-${_cfg}"
|
|
|
|
pushd "build-${_arch}-${_cfg}"
|
2020-10-04 01:04:01 +02:00
|
|
|
DESTDIR="${pkgdir}" ninja install-mingw-w64-strip
|
2019-05-04 16:29:53 +02:00
|
|
|
popd
|
|
|
|
done
|
2015-12-24 16:50:30 +01:00
|
|
|
done
|
2015-06-24 23:12:08 +02:00
|
|
|
}
|