blob: 52b3ca0b7f7fef20793ceb8212dab73425065be3 (
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
|
# Maintainer: Daniel Bershatsky <bepshatsky@yandex.ru>
pkgname=lean
_pkgname=${pkgname#python-}
pkgver=4.27.0
pkgrel=1
pkgdesc='Lean 4 programming language and theorem prover'
arch=('x86_64')
url='https://github.com/leanprover/lean4'
license=('Apache-2.0')
groups=()
depends=('gmp' 'libuv' 'llvm')
makedepends=('ccache' 'clang' 'cmake' 'git')
optdepends=()
options=('ccache')
source=("$pkgname-$pkgver.tar.gz::$url/archive/refs/tags/v$pkgver.tar.gz")
sha256sums=('6e81a8b5ffdd73bb0911ad7bdb0b14616137c4b54610036b8c1b50856fe0b550')
build() {
cd "$srcdir/lean4-$pkgver"
export CC=/usr/bin/clang
export CXX=/usr/bin/clang++
cmake -S . -B build -G 'Unix Makefiles' \
-D CMAKE_C_COMPILER=/usr/bin/clang \
-D CMAKE_C_COMPILER_LAUNCHER=/usr/bin/ccache \
-D CMAKE_CXX_COMPILER=/usr/bin/clang++ \
-D CMAKE_CXX_COMPILER_LAUNCHER=/usr/bin/ccache \
-D CMAKE_INSTALL_PREFIX="$pkgdir/usr" \
-D LLVM=OFF \
-D LLVM_CONFIG=/usr/bin/llvm-config
cmake --build build
}
package() {
cd "$srcdir/lean4-$pkgver"
install -Dm 0644 LICENSE "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
cd "build/stage1"
install -Dm 0755 -t $pkgdir/usr/bin bin/*
install -Dm 0644 -t $pkgdir/usr/include/lean include/lean/*
install -d $pkgdir/usr/lib/lean
(find -L lib/lean -type f -iname '*.so*' -printf '%P\n' |
xargs -I '{}' -- install -DTm0755 'lib/lean/{}' "$pkgdir/usr/lib/lean/{}")
(find -L lib/lean -type f ! -iname '*.so' -printf '%P\n' |
xargs -I '{}' -- install -DTm0644 'lib/lean/{}' "$pkgdir/usr/lib/lean/{}")
install -d $pkgdir/usr/src/lean
(find -L src/lean -type f -iname '*.lean' -printf '%P\n' |
xargs -I '{}' -- install -DTm0644 'src/lean/{}' "$pkgdir/usr/src/lean/{}" )
install -d $pkgdir/usr/share/lean
install -Dm 0644 -t $pkgdir/usr/share/lean share/lean/*
}
|