mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-rmixmod: use metadata checks
This commit is contained in:
parent
ec11d2d394
commit
3678dce269
4 changed files with 65 additions and 25 deletions
|
@ -1,30 +1,43 @@
|
|||
# system requirements: GNU make
|
||||
# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net>
|
||||
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
|
||||
# Contributor: Guoyi Zhang <guoyizhang at malacology dot net>
|
||||
|
||||
_pkgname=Rmixmod
|
||||
_pkgver=2.1.9
|
||||
pkgname=r-${_pkgname,,}
|
||||
pkgver=2.1.9
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=1
|
||||
pkgdesc='Classification with Mixture Modelling'
|
||||
arch=('x86_64')
|
||||
pkgdesc="Classification with Mixture Modelling"
|
||||
arch=(x86_64)
|
||||
url="https://cran.r-project.org/package=${_pkgname}"
|
||||
license=('GPL')
|
||||
license=(GPL3)
|
||||
depends=(
|
||||
r
|
||||
glibmm
|
||||
libxml++2.6
|
||||
r-rcpp
|
||||
r-rcppeigen
|
||||
make
|
||||
)
|
||||
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
|
||||
sha256sums=('d87eeb1de611ce0e421141a3b3d11cae819d327fbc510314a820ddf982a09453')
|
||||
makedepends=(
|
||||
r-rcppeigen
|
||||
)
|
||||
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
|
||||
"fix-libxmlxx.patch")
|
||||
md5sums=('6e02da6f0e72ace0f2c6c9d761c6d67c'
|
||||
'98c555181a4b06b18ad6565b22a43dbe')
|
||||
sha256sums=('d87eeb1de611ce0e421141a3b3d11cae819d327fbc510314a820ddf982a09453'
|
||||
'2849f3da407a8d3fc6d081274d66af67f63879e9976fa1997bebf07112147cf5')
|
||||
|
||||
prepare() {
|
||||
# fix compilation with libxml++
|
||||
patch -Np1 -i fix-libxmlxx.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
|
||||
mkdir -p build
|
||||
R CMD INSTALL "$_pkgname" -l build \
|
||||
--configure-vars=RMIXMOD_WITH_XML=1 \
|
||||
--configure-vars=RMIXMOD_WITH_OMP=1
|
||||
}
|
||||
|
||||
package() {
|
||||
install -dm0755 "${pkgdir}/usr/lib/R/library"
|
||||
cp -a --no-preserve=ownership "${_pkgname}" "${pkgdir}/usr/lib/R/library"
|
||||
install -d "$pkgdir/usr/lib/R/library"
|
||||
cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
|
||||
}
|
||||
# vim:set ts=2 sw=2 et:
|
||||
|
|
11
BioArchLinux/r-rmixmod/fix-libxmlxx.patch
Normal file
11
BioArchLinux/r-rmixmod/fix-libxmlxx.patch
Normal file
|
@ -0,0 +1,11 @@
|
|||
diff --git a/Rmixmod/src/Makevars.in b/Rmixmod/src/Makevars.in
|
||||
index 7eb53d5..fa9730b 100644
|
||||
--- a/Rmixmod/src/Makevars.in
|
||||
+++ b/Rmixmod/src/Makevars.in
|
||||
@@ -35,5 +35,5 @@ $(SHLIB): mixmod
|
||||
|
||||
mixmod:
|
||||
(cd $(MIXMODDIR) && $(MAKE) -f mixmod_r.mk)
|
||||
- (if test ! -z $(RMIXMOD_XML) ; then cd $(IOSTREAMDIR) && $(MAKE) -f mixmod_iostream_r.mk ; fi)
|
||||
+ (if test ! -z $(RMIXMOD_XML) ; then cd $(IOSTREAMDIR) && $(MAKE) LIBXMLXX_CFLAGS="$(LIBXMLXX_CFLAGS)" -f mixmod_iostream_r.mk ; fi)
|
||||
$(RANLIB) $(MIXMODLIB)
|
|
@ -1,12 +1,16 @@
|
|||
#!/usr/bin/env python3
|
||||
from lilaclib import *
|
||||
|
||||
import os
|
||||
import sys
|
||||
sys.path.append(os.path.normpath(f'{__file__}/../../../lilac-extensions'))
|
||||
from lilac_r_utils import r_pre_build
|
||||
|
||||
def pre_build():
|
||||
for line in edit_file('PKGBUILD'):
|
||||
if line.startswith('_pkgver='):
|
||||
line = f'_pkgver={_G.newver}'
|
||||
print(line)
|
||||
update_pkgver_and_pkgrel(_G.newver.replace(':', '.').replace('-', '.'))
|
||||
r_pre_build(
|
||||
_G,
|
||||
expect_systemrequirements = "GNU make",
|
||||
)
|
||||
|
||||
def post_build():
|
||||
git_pkgbuild_commit()
|
||||
|
|
|
@ -1,12 +1,24 @@
|
|||
build_prefix: extra-x86_64
|
||||
maintainers:
|
||||
- github: starsareintherose
|
||||
email: kuoi@bioarchlinux.org
|
||||
- github: pekkarr
|
||||
email: pekkarr@protonmail.com
|
||||
repo_depends:
|
||||
- r-rcpp
|
||||
repo_makedepends:
|
||||
- r-rcppeigen
|
||||
update_on:
|
||||
- regex: Rmixmod_([\d._-]+).tar.gz
|
||||
source: regex
|
||||
url: https://cran.r-project.org/package=Rmixmod
|
||||
- source: rpkgs
|
||||
pkgname: Rmixmod
|
||||
repo: cran
|
||||
md5: true
|
||||
- alias: r
|
||||
- source: alpm
|
||||
alpm: glibmm
|
||||
repo: extra
|
||||
provided: libglibmm-2.4.so
|
||||
strip_release: true
|
||||
- source: alpm
|
||||
alpm: libxml++2.6
|
||||
repo: extra
|
||||
provided: libxml++-2.6.so
|
||||
strip_release: true
|
||||
|
|
Loading…
Add table
Reference in a new issue