mirror of
https://github.com/archlinux/aur.git
synced 2026-02-28 16:07:46 +01:00
use some system libs
This commit is contained in:
parent
810d542a9c
commit
c7fb3e0d06
3 changed files with 48 additions and 7 deletions
13
.SRCINFO
13
.SRCINFO
|
|
@ -1,7 +1,7 @@
|
|||
pkgbase = stanc
|
||||
pkgdesc = A package for obtaining Bayesian inference using the No-U-Turn sampler, a variant of Hamiltonian Monte Carlo.
|
||||
pkgver = 2.32.0_rc1
|
||||
pkgrel = 1
|
||||
pkgrel = 2
|
||||
url = https://mc-stan.org/
|
||||
arch = i686
|
||||
arch = x86_64
|
||||
|
|
@ -9,9 +9,20 @@ pkgbase = stanc
|
|||
makedepends = texlive-bin
|
||||
makedepends = texlive-core
|
||||
makedepends = doxygen
|
||||
makedepends = gtest
|
||||
makedepends = benchmark
|
||||
makedepends = sundials
|
||||
makedepends = boost
|
||||
makedepends = eigen
|
||||
makedepends = stanmath
|
||||
makedepends = python-cpplint
|
||||
makedepends = opencl-headers
|
||||
makedepends = rapidjson
|
||||
depends = gcc-libs
|
||||
provides = cmdstan
|
||||
source = https://github.com/stan-dev/cmdstan/releases/download/v2.32.0-rc1/cmdstan-2.32.0-rc1.tar.gz
|
||||
source = local
|
||||
sha512sums = 6e734ce47561bf9b2d8674bedd0ddd1e22f476d324ac546a368e0ee925ebcb02f1c3da6d8bdc65fcbca15133f2a19c5a4ce46defee1a1b7264b458f76a151a87
|
||||
sha512sums = 94f898b78f66e517b61d6ce2295e72a07e0a9154852c8b8607600fcb968bf106870f3dcde94ae32d7d8f6663e69cfaa021cdea9a2dc88a96479e86686e126950
|
||||
|
||||
pkgname = stanc
|
||||
|
|
|
|||
31
PKGBUILD
31
PKGBUILD
|
|
@ -4,23 +4,41 @@
|
|||
pkgname='stanc'
|
||||
pkgdesc="A package for obtaining Bayesian inference using the No-U-Turn sampler, a variant of Hamiltonian Monte Carlo."
|
||||
pkgver=2.32.0_rc1
|
||||
pkgrel=1
|
||||
pkgrel=2
|
||||
arch=('i686' 'x86_64')
|
||||
url='https://mc-stan.org/'
|
||||
license=('BSD')
|
||||
depends=('gcc-libs')
|
||||
makedepends=('texlive-bin' 'texlive-core' 'doxygen'
|
||||
# needed if compile against system library
|
||||
|
||||
# 'gtest' 'benchmark' 'sundials' 'boost' 'eigen' 'tbb' 'stanmath'
|
||||
# 'python-cpplint' 'opencl-headers' 'rapidjson' 'cli11'
|
||||
'gtest' 'benchmark' 'sundials' 'boost' 'eigen' 'stanmath'
|
||||
'python-cpplint' 'opencl-headers' 'rapidjson'
|
||||
# 'cli11'
|
||||
# 'tbb': no <tbb/tbb_stddef.h>
|
||||
)
|
||||
provides=("cmdstan")
|
||||
source=(https://github.com/stan-dev/cmdstan/releases/download/v${pkgver/_/-}/cmdstan-${pkgver/_/-}.tar.gz)
|
||||
sha512sums=('6e734ce47561bf9b2d8674bedd0ddd1e22f476d324ac546a368e0ee925ebcb02f1c3da6d8bdc65fcbca15133f2a19c5a4ce46defee1a1b7264b458f76a151a87')
|
||||
source=(https://github.com/stan-dev/cmdstan/releases/download/v${pkgver/_/-}/cmdstan-${pkgver/_/-}.tar.gz
|
||||
local
|
||||
)
|
||||
sha512sums=('6e734ce47561bf9b2d8674bedd0ddd1e22f476d324ac546a368e0ee925ebcb02f1c3da6d8bdc65fcbca15133f2a19c5a4ce46defee1a1b7264b458f76a151a87'
|
||||
'94f898b78f66e517b61d6ce2295e72a07e0a9154852c8b8607600fcb968bf106870f3dcde94ae32d7d8f6663e69cfaa021cdea9a2dc88a96479e86686e126950')
|
||||
|
||||
prepare(){
|
||||
cd "${srcdir}/cmdstan-${pkgver/_/-}"
|
||||
cp ${srcdir}/local make/local
|
||||
cp ${srcdir}/local stan/make/local
|
||||
# sed -i 's|CLI11/CLI11.hpp|CLI/CLI.hpp|g' src/cmdstan/stansummary.cpp
|
||||
}
|
||||
build() {
|
||||
cd "${srcdir}/cmdstan-${pkgver/_/-}"
|
||||
cd stan/lib/stan_math/lib/tbb_2020.3/
|
||||
mkdir ${srcdir}/tbb
|
||||
make tbb
|
||||
find build -type f -executable -exec install -DTm644 "{}" "${srcdir}/tbb/{}" \;
|
||||
mv build/*_release/*.so* ${srcdir}/tbb/
|
||||
cd "${srcdir}/cmdstan-${pkgver/_/-}"
|
||||
export LDFLAGS="-L${srcdir}/tbb -ltbb -Wl,-rpath,/usr/lib/stan"
|
||||
export CXXFLAGS="-fPIC -Isrc -Istan/src -I/usr/include/eigen3 -Istan/lib/stan_math/lib/tbb_2020.3/include/ -D_REENTRANT -Ilib/CLI11-1.9.1/"
|
||||
make build
|
||||
}
|
||||
|
||||
|
|
@ -48,4 +66,5 @@ package() {
|
|||
# Install LICENSE file:
|
||||
install -dm755 "${pkgdir}/usr/share/licenses/stan"
|
||||
cp -r "stan/licenses/." "${pkgdir}/usr/share/licenses/stan/."
|
||||
install -Dm755 ${srcdir}/tbb/*.so* -t "${pkgdir}/usr/lib/stan"
|
||||
}
|
||||
|
|
|
|||
11
local
Normal file
11
local
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
MATH = /usr/include/stan/
|
||||
BOOST = /usr/include/boost
|
||||
EIGEN = /usr/include/eigen3
|
||||
OPENCL = /usr/include/CL
|
||||
#TBB = /usr/include/tbb
|
||||
SUNDIALS = /usr/include/sundials
|
||||
BENCHMARK = /usr/include/benchmark
|
||||
GTEST = /usr/include/gtest
|
||||
CPPLINT = /usr/lib/python3.10/site-packages/
|
||||
RAPIDJSON = /usr/include/rapidjson/
|
||||
#CLI11 = /usr/include/CLI/
|
||||
Loading…
Add table
Reference in a new issue