mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-rhisat2: fix depends, use metadata checks
This commit is contained in:
parent
86c9d2f03d
commit
61b89cb3ff
4 changed files with 58 additions and 27 deletions
|
@ -1,21 +1,19 @@
|
|||
# system requirements: GNU make
|
||||
# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net>
|
||||
# Contributor: Viktor Drobot (aka dviktor) linux776 [at] gmail [dot] com
|
||||
|
||||
_pkgname=Rhisat2
|
||||
_pkgver=1.18.0
|
||||
_pkgver=1.20.0
|
||||
pkgname=r-${_pkgname,,}
|
||||
pkgver=1.18.0
|
||||
pkgrel=2
|
||||
pkgdesc='R Wrapper for HISAT2 Aligner'
|
||||
arch=('x86_64')
|
||||
url="https://bioconductor.org/packages/${_pkgname}"
|
||||
license=('GPL')
|
||||
pkgver=${_pkgver//-/.}
|
||||
pkgrel=0
|
||||
pkgdesc="R Wrapper for HISAT2 Aligner"
|
||||
arch=(x86_64)
|
||||
url="https://bioconductor.org/packages/$_pkgname"
|
||||
license=('GPL-3.0-only')
|
||||
depends=(
|
||||
r
|
||||
r-genomicfeatures
|
||||
r-genomicranges
|
||||
r-sgseq
|
||||
r-txdbmaker
|
||||
)
|
||||
optdepends=(
|
||||
r-biocstyle
|
||||
|
@ -23,17 +21,26 @@ optdepends=(
|
|||
r-rmarkdown
|
||||
r-testthat
|
||||
)
|
||||
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
|
||||
sha256sums=('5830fa5e23b6d8e38614dd71ecabf364a40212663b79aec30231b6f531bfb4df')
|
||||
# parallel compilation leads to the race conditions and installation fail
|
||||
options=(!makeflags)
|
||||
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
|
||||
"fix-build.patch")
|
||||
md5sums=('40eeced68deeadf6506e97eb53e4a831'
|
||||
'3f45bc291d0db4e626db5336680b2f73')
|
||||
b2sums=('f289e764d5085458a8248154e2aa8bc790c76c3e23866153757ba5e86a157b62b1d20f65732952a6a7fd0a8098b3c8289afcdd043c54fb691e69673fc07c35e0'
|
||||
'f3d4cc8719124604b7d295c6143d38187901cbca50da949f4c49edac0d43e818cde3ab03cc05ad77425091db705979b1d9b381c751c0fada90b48796b54fee2c')
|
||||
|
||||
prepare() {
|
||||
# fix compiler flags
|
||||
patch -Np1 -i fix-build.patch
|
||||
}
|
||||
|
||||
build() {
|
||||
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
|
||||
mkdir build
|
||||
# parallel compilation fails
|
||||
MAKEFLAGS+=" -j1"
|
||||
R CMD INSTALL -l build "$_pkgname"
|
||||
}
|
||||
|
||||
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:
|
||||
|
|
22
BioArchLinux/r-rhisat2/fix-build.patch
Normal file
22
BioArchLinux/r-rhisat2/fix-build.patch
Normal file
|
@ -0,0 +1,22 @@
|
|||
diff --git a/Rhisat2/src/Makefile b/Rhisat2/src/Makefile
|
||||
index 005d756..87ef966 100644
|
||||
--- a/Rhisat2/src/Makefile
|
||||
+++ b/Rhisat2/src/Makefile
|
||||
@@ -217,7 +217,7 @@ endif
|
||||
|
||||
DEBUG_FLAGS = -O0 -g3 $(BITS_FLAG) $(SSE_FLAG)
|
||||
DEBUG_DEFS = -DCOMPILER_OPTIONS="\"$(DEBUG_FLAGS) $(EXTRA_FLAGS)\""
|
||||
-RELEASE_FLAGS = -O3 $(BITS_FLAG) $(SSE_FLAG) -funroll-loops -g3
|
||||
+RELEASE_FLAGS = $(CXXFLAGS) $(LDFLAGS) $(BITS_FLAG) -funroll-loops -g3
|
||||
RELEASE_DEFS = -DCOMPILER_OPTIONS="\"$(RELEASE_FLAGS) $(EXTRA_FLAGS)\""
|
||||
NOASSERT_FLAGS = -DNDEBUG
|
||||
FILE_FLAGS = -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
|
||||
@@ -298,7 +298,7 @@ BIN_PKG_LIST = $(GENERAL_LIST)
|
||||
.PHONY: all allall both both-debug
|
||||
|
||||
all: $(HISAT2_BIN_LIST) ../inst/hisat2
|
||||
- $(CXX) -shared -fPIC -o Rhisat2.so get_info.cpp
|
||||
+ $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -fPIC -o Rhisat2.so get_info.cpp
|
||||
|
||||
allall: $(HISAT2_BIN_LIST) $(HISAT2_BIN_LIST_AUX)
|
||||
|
|
@ -1,12 +1,13 @@
|
|||
#!/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)
|
||||
|
||||
def post_build():
|
||||
git_pkgbuild_commit()
|
||||
|
|
|
@ -3,11 +3,12 @@ maintainers:
|
|||
- github: starsareintherose
|
||||
email: kuoi@bioarchlinux.org
|
||||
repo_depends:
|
||||
- r-genomicfeatures
|
||||
- r-genomicranges
|
||||
- r-sgseq
|
||||
- r-txdbmaker
|
||||
update_on:
|
||||
- regex: Rhisat2_([\d._-]+).tar.gz
|
||||
source: regex
|
||||
url: https://bioconductor.org/packages/Rhisat2
|
||||
- source: rpkgs
|
||||
pkgname: Rhisat2
|
||||
repo: bioc
|
||||
md5: true
|
||||
- alias: r
|
||||
|
|
Loading…
Add table
Reference in a new issue