/
PKGBUILD
68 lines (60 loc) · 2.11 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
# Maintainer: Biswapriyo Nath <nathbappai@gmail.com>
_realname=extra-cmake-modules
pkgbase=mingw-w64-${_realname}
pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}"
pkgver=6.1.0
pkgrel=1
pkgdesc='Extra modules and scripts for CMake (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
msys2_references=(
'archlinux: extra-cmake-modules'
)
msys2_repository_url='https://invent.kde.org/frameworks/extra-cmake-modules/'
url='https://community.kde.org/Frameworks/'
license=('spdx:BSD-3-Clause')
groups=("${MINGW_PACKAGE_PREFIX}-kf6")
depends=(
"${MINGW_PACKAGE_PREFIX}-cmake"
)
makedepends=(
"${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-ninja"
)
source=("https://download.kde.org/stable/frameworks/${pkgver%.*}/${_realname}-${pkgver}.tar.xz"{,.sig}
"tar-force-local.patch")
sha256sums=('76c9edf00807e6cf8d4ae35f5195b4bc3fe94648d976fef532bf7f97d86388bd'
'SKIP'
'0f0cec3a0f51a0e21299f468361489d339a3e8c25119f94fce87decadebaaae2')
validpgpkeys=('E0A3EB202F8E57528E13E72FD7574483BB57B18D') # Jonathan Esk-Riddell <jr@jriddell.org>
prepare() {
cd "${_realname}-${pkgver}"
# Required for extracting kioworker6.tar.bz2 in kio package
# It fails to extract because full win-style path contains colon
patch -p1 -i "${srcdir}/tar-force-local.patch"
# Make sure to update patch in git style because CMake
# installs *.orig files if hunks are in different offset
find . -name "*.orig" -exec rm -f {} \;
}
build() {
declare -a _extra_config
if check_option "debug" "n"; then
_extra_config+=("-DCMAKE_BUILD_TYPE=Release")
else
_extra_config+=("-DCMAKE_BUILD_TYPE=Debug")
fi
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
"${MINGW_PREFIX}"/bin/cmake.exe \
-GNinja \
-DCMAKE_INSTALL_PREFIX="${MINGW_PREFIX}" \
-DBUILD_HTML_DOCS=OFF \
-DBUILD_QTHELP_DOCS=OFF \
-DBUILD_TESTING=OFF \
"${_extra_config[@]}" \
-S "${_realname}-${pkgver}" \
-B "build-${MSYSTEM}"
"${MINGW_PREFIX}"/bin/cmake.exe --build "build-${MSYSTEM}"
}
package() {
DESTDIR="${pkgdir}" "${MINGW_PREFIX}"/bin/cmake.exe --install "build-${MSYSTEM}"
}