archrelease: copy trunk to community-any
[ArchLinux/community.git] / symengine / repos / community-x86_64 / PKGBUILD
blobf07dc1c360a543f088e0643ccf367cc111c147ab
1 # Maintainer: Antonio Rojas <arojas@archlinux.org>
2 # Contributor: Michael Schubert <mschu.dev at gmail>
4 pkgname=symengine
5 pkgver=0.10.1
6 pkgrel=1
7 pkgdesc='Fast symbolic manipulation library, written in C++'
8 url='http://sympy.org/'
9 arch=(x86_64)
10 license=(MIT)
11 depends=(llvm-libs arb libmpc gmp-ecm primesieve gperftools)
12 makedepends=(cmake boost llvm cereal)
13 source=(https://github.com/symengine/symengine/releases/download/v$pkgver/$pkgname-$pkgver.tar.gz
14         llvm-shared.patch)
15 sha256sums=('9c007c99e9633f5549a55fa7a66ebcbcf9e04092eb55f7bb781c22b9cf0570c4'
16             'ef05a806139b35e0336f00cb6960ef6cf483f11b0041e436a99ab1f46bdcb11c')
18 prepare() {
19   patch -d $pkgname-$pkgver -p1 < llvm-shared.patch # Use shared LLVM (Gentoo)
22 build() {
23   cmake -B build -S $pkgname-$pkgver \
24     -DCMAKE_INSTALL_PREFIX=/usr \
25     -DBUILD_SHARED_LIBS=ON \
26     -DWITH_TCMALLOC=ON \
27     -DWITH_PTHREAD=ON \
28     -DWITH_SYMENGINE_THREAD_SAFE=ON \
29     -DWITH_ARB=ON \
30     -DWITH_ECM=ON \
31     -DWITH_LLVM=ON \
32     -DWITH_MPFR=ON \
33     -DWITH_MPC=ON \
34     -DWITH_PRIMESIEVE=ON \
35     -DWITH_BOOST=ON \
36     -DWITH_COTIRE=OFF \
37     -DWITH_SYSTEM_CEREAL=ON
38   cmake --build build
41 check() {
42   cmake --build build --target test
45 package() {
46   DESTDIR="$pkgdir" cmake --install build
47   install -Dm644 $pkgname-$pkgver/LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname