add r-timechange, fix revbayes

This commit is contained in:
sukanka 2022-11-08 09:48:27 +08:00
parent 064fafe621
commit a99fdfafd8
6 changed files with 123 additions and 8 deletions

View file

@ -0,0 +1,46 @@
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
pkgname=cctz
pkgver=2.3
pkgrel=2
pkgdesc="A C++ library for translating between absolute and civil times using the rules of a time zone"
arch=('x86_64')
url="https://github.com/google/cctz"
license=('Apache')
depends=(gcc-libs)
makedepends=(benchmark cmake gtest)
source=("$pkgname-$pkgver.tar.gz::https://github.com/google/cctz/archive/v${pkgver}.tar.gz")
sha512sums=('e688ddac1bff108e8315bf94cb61483b72b0d16f601e4e1eeb0fd5c064aefe5a573eee66e8903401aa4c2be71ea9f10dd6c9a9cdf8379f5bb6073248a21a83ff')
prepare() {
cd "$pkgname-$pkgver"
# Set shared library version and soversion
sed -i '/set_target_properties(cctz/a\ \ VERSION ${VERSION}\n SOVERSION ${SOVERSION}' \
CMakeLists.txt
# Use system zoneinfo data in tests
sed -i 's|TZDIR=${CMAKE_CURRENT_SOURCE_DIR}/testdata/zoneinfo|TZDIR=/usr/share/zoneinfo|' \
CMakeLists.txt
}
build() {
cmake -B build -S "$pkgname-$pkgver" \
-DCMAKE_BUILD_TYPE='None' \
-DCMAKE_CXX_FLAGS_INIT=-DNDEBUG \
-DCMAKE_INSTALL_PREFIX='/usr' \
-DBUILD_SHARED_LIBS=ON \
-DBUILD_EXAMPLES=OFF \
-DVERSION="$pkgver" \
-DSOVERSION="${pkgver%%.*}" \
-Wno-dev
cmake --build build
}
check() {
cd build
ctest --output-on-failure
}
package() {
DESTDIR="$pkgdir" cmake --install build
}

View file

@ -0,0 +1,14 @@
build_prefix: extra-x86_64
maintainers:
- github: sukanka
pre_build_script: |
update_pkgver_and_pkgrel(_G.newver.lstrip('v'))
run_cmd(['updpkgsums'])
post_build_script: |
git_add_files('PKGBUILD')
git_commit()
update_on:
- source: github
github: google/cctz
use_latest_release: true
prefix: 'v'

View file

@ -0,0 +1,40 @@
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
_pkgname=timechange
_pkgver=0.1.1
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//[:-]/.}
pkgrel=1
pkgdesc='Efficient Manipulation of Date-Times'
arch=('x86_64')
url="https://cran.r-project.org/package=${_pkgname}"
license=('GPL')
depends=(cctz r)
makedepends=(r-cpp11)
checkdepends=(r-testthat)
optdepends=(r-testthat r-knitr)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('8503919d233d7d7b81fe47692f0f2d6742ff4cae7320a5522bf98f077f5d7f70')
prepare() {
# build against system cctz
sed -i -e 's/$(SHLIB): libcctz.a/$(SHLIB):/' \
-e 's#PKG_CPPFLAGS= -I. -I./cctz/src/#PKG_CPPFLAGS= -I.#' \
"$_cranname/src/Makevars"
}
build() {
mkdir -p build
R CMD INSTALL "${_cranname}" -l "${srcdir}/build"
}
check() {
cd "${_cranname}/tests"
R_LIBS="${srcdir}/build" NOT_CRAN=true Rscript --vanilla testthat.R
}
package() {
install -dm0755 "${pkgdir}/usr/lib/R/library"
cp -a --no-preserve=ownership "build/${_cranname}" "${pkgdir}/usr/lib/R/library"
}

View file

@ -0,0 +1,15 @@
build_prefix: extra-x86_64
maintainers:
- github: sukanka
pre_build_script: |
update_pkgver_and_pkgrel(_G.newver.lstrip('v'))
run_cmd(['updpkgsums'])
post_build_script: |
git_add_files('PKGBUILD')
git_commit()
repo_depends:
- r-cpp11
update_on:
- regex: timechange_([\d._-]+).tar.gz
source: regex
url: https://cran.r-project.org/package=timechange

View file

@ -1,7 +1,7 @@
pkgname=revbayes-mpi
_pkgname=revbayes
pkgver=1.2.0
pkgrel=3
pkgrel=4
pkgdesc="Bayesian Phylogenetic Inference Using Graphical Models and an Interactive Model-Specification Language https://doi.org/10.1093/sysbio/syw021"
arch=(x86_64)
url="https://github.com/revbayes/revbayes"
@ -9,6 +9,7 @@ license=(GPL3)
depends=('gcc-libs' 'boost-libs' 'openlibm' 'openmpi')
makedepends=('boost' 'meson' 'ninja' 'cmake' 'git')
conflicts=('lrzsz' 'revbayes-mpi')
provides=('revbayes')
source=("git+$url.git#tag=v$pkgver")
md5sums=('SKIP')
@ -20,7 +21,9 @@ prepare() {
build() {
cd $srcdir/$_pkgname
arch-meson build -Dmpi=true
CXXFLAGS="${CXXFLAGS} -std=c++14" arch-meson build \
--buildtype release \
-Dmpi=true
ninja -C build
}
@ -28,5 +31,3 @@ package() {
cd $srcdir/$_pkgname
DESTDIR="${pkgdir}" ninja -C build install
}

View file

@ -1,6 +1,6 @@
pkgname=revbayes
pkgver=1.2.0
pkgrel=4
pkgrel=5
pkgdesc="Bayesian Phylogenetic Inference Using Graphical Models and an Interactive Model-Specification Language https://doi.org/10.1093/sysbio/syw021"
arch=(x86_64)
url="https://github.com/revbayes/revbayes"
@ -19,7 +19,8 @@ prepare() {
build() {
cd $srcdir/$pkgname
arch-meson build
CXXFLAGS="${CXXFLAGS} -std=c++14" arch-meson build \
--buildtype release
ninja -C build
}
@ -27,5 +28,3 @@ package() {
cd $srcdir/$pkgname
DESTDIR="${pkgdir}" ninja -C build install
}