summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 9f659fb410cdb794325eee17d1b9baa5cc4ca9d3 (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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# Maintainer: Manuel Wiesinger <m {you know what belongs here} mmap {and here} at>

_pkgname=('bitwuzla')
pkgname=("${_pkgname}-git")
pkgver=0.7.0.r3.gc23b57f
pkgrel=1
pkgdesc='SMT solver for the theories of fixed-size bit-vectors, floating-point arithmetic, arrays and uninterpreted functions and their combinations'
arch=('x86_64')
url='https://bitwuzla.github.io'
license=('MIT')
source=("git+https://github.com/bitwuzla/bitwuzla.git")
depends=(
    'cryptominisat'
    'gcc-libs'
    'glibc'
    'gmp>=6.1'
)
makedepends=(
    'cmake'
    'cython'
    'doxygen'
    'git'
    'meson>=0.64'
    'ninja'
    'python-breathe'
    'python-sphinx'
    'python-sphinx-tabs'
    'python-sphinx_rtd_theme'
    'python-sphinxcontrib-bibtex'
    'python>=3.7'
    'python-sphinx'
)
checkdepends=(
    'gtest'
    'python-pytest'
)
optdepends=(
    'python>=3.7: Python bindings'
)
provides=(
    "${_pkgname}"
    "${_pkgname}-docs"
    'libbitwuzlabv.so'
    'libbitwuzlabb.so'
    'libbitwuzlals.so'
    'libbitwuzla.so'
)
conflicts=("${_pkgname}" "${_pkgname}-docs")
b2sums=('SKIP')
options=('!lto')

build() {
    cd "${srcdir}/${_pkgname}"

    ./configure.py \
	--prefix /usr \
	--shared \
	--python \
	--testing \
	--docs \
	--kissat \
	--cryptominisat \
	--fpexp

    cd build
    meson compile
}

check() {
    cd "${srcdir}/${_pkgname}"
    meson test -C build
}

package() {
    cd "${srcdir}/${_pkgname}"

    install -Dm644 COPYING "${pkgdir}/usr/share/licenses/${pkgname}/COPYING"

    install -Dm644 CONTRIBUTING.md "${pkgdir/}usr/share/doc/${_pkgname}/CONTRIBUTING.md"
    install -Dm644 NEWS.md "${pkgdir}/usr/share/doc/${_pkgname}/NEWS.md"

    cd build

    DESTDIR="${pkgdir}" ninja install

    cd docs

    # Do not copy documentation source files
    find . \
	 -not -path "./.*" \
	 -not -path "./_sources*" \
	 -not -path "./conf.py" \
	 -not -path "./cli_usage.txt" \
	 -not -path "./c/xml*" \
	 -not -path "./c/Doxyfile" \
	 -not -path "./cpp/xml*" \
	 -not -path "./cpp/Doxyfile" \
	 -exec install -Dm644 {} "${pkgdir}/usr/share/doc/${_pkgname}/html/{}" \;

    install -Dm644 cli_usage.txt "${pkgdir}/usr/share/doc/${_pkgname}/cli_usage.txt"
}

pkgver() {
    cd "${srcdir}/${_pkgname}"
    git describe --long --tags --abbrev=7 | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}