blob: b732aacfb4381663c2afb92b1b915fccacffecea (
plain)
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
|
# Maintainer: Felix Yan <felixonmars@archlinux.org>
# Contributor: Andrea Scarpino <andrea@archlinux.org>
# Contributor: Pierre Schmitz <pierre@archlinux.de>
pkgname=cmake
pkgver=3.17.3
pkgrel=1
pkgdesc='A cross-platform open-source make system'
arch=('x86_64')
url="https://www.cmake.org/"
license=('custom')
depends=('curl' 'libarchive' 'shared-mime-info' 'jsoncpp' 'libjsoncpp.so' 'libuv' 'rhash')
makedepends=('qt5-base' 'python-sphinx' 'emacs')
optdepends=('qt5-base: cmake-gui')
source=("https://www.cmake.org/files/v${pkgver%.*}/${pkgname}-${pkgver}.tar.gz"
cmake-cppflags.patch)
sha512sums=('13479bd48ef8a8c95277a62b4f42e63152a5979292a98b5456022ca42ad3963cad75e917cc8b92a8485dbf5a2b59cde3fdc90fd9abdb806bc97c8570d03c1c69'
'407c5c63a31266e44641ada8229dbc33df44df98e5bb575db3a33590e8ffdff9aea3f2ee5cb0cb855858facf1e46c63886dea9f948a0cad2da042e7f7f258cac')
prepare() {
cd ${pkgname}-${pkgver}
patch -p1 -i ../cmake-cppflags.patch # Honor CPPFLAGS https://gitlab.kitware.com/cmake/cmake/issues/12928
}
build() {
cd ${pkgname}-${pkgver}
export CXXFLAGS+=" ${CPPFLAGS}"
./bootstrap --prefix=/usr \
--mandir=/share/man \
--docdir=/share/doc/cmake \
--sphinx-man \
--system-libs \
--qt-gui \
--parallel=$(/usr/bin/getconf _NPROCESSORS_ONLN)
make
}
package() {
cd ${pkgname}-${pkgver}
make DESTDIR="${pkgdir}" install
vimpath="${pkgdir}/usr/share/vim/vimfiles"
install -d "${vimpath}"/{indent,syntax}
ln -s /usr/share/cmake-${pkgver%.*}/editors/vim/indent/cmake.vim \
"${vimpath}"/indent/
ln -s /usr/share/cmake-${pkgver%.*}/editors/vim/syntax/cmake.vim \
"${vimpath}"/syntax/
install -d "${pkgdir}"/usr/share/emacs/site-lisp/
emacs -batch -f batch-byte-compile \
"${pkgdir}"/usr/share/cmake-${pkgver%.*}/editors/emacs/cmake-mode.el
ln -s /usr/share/cmake-${pkgver%.*}/editors/emacs/cmake-mode.el \
"${pkgdir}"/usr/share/emacs/site-lisp/
ln -s /usr/share/cmake-${pkgver%.*}/editors/emacs/cmake-mode.elc \
"${pkgdir}"/usr/share/emacs/site-lisp/
install -Dm644 Copyright.txt \
"${pkgdir}"/usr/share/licenses/${pkgname}/LICENSE
# install bash completions
mkdir -p "$pkgdir"/usr/share/bash-completion/completions
ln -s /usr/share/cmake-${pkgver%.*}/completions/{cmake,cpack,ctest} "$pkgdir"/usr/share/bash-completion/completions
}
|