r-gdsfmt: use metadata checks

This commit is contained in:
Pekka Ristola 2023-10-10 17:01:42 +03:00
parent 82804839cc
commit b17d549758
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
4 changed files with 106 additions and 23 deletions

View file

@ -1,16 +1,25 @@
# 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=gdsfmt _pkgname=gdsfmt
_pkgver=1.36.1 _pkgver=1.36.1
pkgname=r-${_pkgname,,} pkgname=r-${_pkgname,,}
pkgver=1.36.1 pkgver=${_pkgver//-/.}
pkgrel=1 pkgrel=1
pkgdesc='R Interface to CoreArray Genomic Data Structure (GDS) Files' pkgdesc="R Interface to CoreArray Genomic Data Structure (GDS) Files"
arch=('x86_64') arch=(x86_64)
url="https://bioconductor.org/packages/${_pkgname}" url="https://bioconductor.org/packages/${_pkgname}"
license=('LGPL') license=(LGPL3)
depends=( depends=(
lz4
r r
xz
zlib
)
checkdepends=(
r-biocgenerics
r-digest
r-runit
) )
optdepends=( optdepends=(
r-biocgenerics r-biocgenerics
@ -18,20 +27,32 @@ optdepends=(
r-digest r-digest
r-knitr r-knitr
r-markdown r-markdown
r-matrix
r-parallel
r-rmarkdown r-rmarkdown
r-runit r-runit
) )
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz") source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
sha256sums=('a753d15c43d4d8618f6751b6ec87f1d8439a9eb3a1e2d4c1f2fbdb6fbf581187') "system-libs.patch")
md5sums=('7e54216f1539f908f188665986552ab5'
'bffd05eba8706aacc469c69a3b0eeada')
sha256sums=('a753d15c43d4d8618f6751b6ec87f1d8439a9eb3a1e2d4c1f2fbdb6fbf581187'
'a30cf43b5d8f07f19e88cc26fc2ccf6d88ab491e21ab3eb5b656d5258272af85')
prepare() {
# use system lz4, xz and zlib
patch -Np1 -i system-libs.patch
}
build() { build() {
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}" mkdir -p build
R CMD INSTALL "$_pkgname" -l build
}
check() {
cd "$_pkgname/tests"
R_LIBS="$srcdir/build" Rscript --vanilla runTests.R
} }
package() { package() {
install -dm0755 "${pkgdir}/usr/lib/R/library" install -d "$pkgdir/usr/lib/R/library"
cp -a --no-preserve=ownership "${_pkgname}" "${pkgdir}/usr/lib/R/library" cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
} }
# vim:set ts=2 sw=2 et:

View file

@ -1,12 +1,13 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from lilaclib import * 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(): def pre_build():
for line in edit_file('PKGBUILD'): r_pre_build(_G)
if line.startswith('_pkgver='):
line = f'_pkgver={_G.newver}'
print(line)
update_pkgver_and_pkgrel(_G.newver.replace(':', '.').replace('-', '.'))
def post_build(): def post_build():
git_pkgbuild_commit() git_pkgbuild_commit()

View file

@ -1,9 +1,28 @@
build_prefix: extra-x86_64 build_prefix: extra-x86_64
maintainers: maintainers:
- github: starsareintherose - github: pekkarr
email: kuoi@bioarchlinux.org email: pekkarr@protonmail.com
repo_makedepends:
- r-biocgenerics
- r-digest
- r-runit
update_on: update_on:
- regex: gdsfmt_([\d._-]+).tar.gz - source: rpkgs
source: regex pkgname: gdsfmt
url: https://bioconductor.org/packages/gdsfmt repo: bioc
md5: true
- alias: r - alias: r
- source: alpmfiles
pkgname: lz4
filename: usr/lib/liblz4\.so\.([^.]+)
repo: core
- source: alpm
alpm: xz
repo: core
provided: liblzma.so
strip_release: true
- source: alpm
alpm: zlib
repo: core
provided: libz.so
strip_release: true

View file

@ -0,0 +1,42 @@
diff --git a/gdsfmt/src/Makevars b/gdsfmt/src/Makevars
index 0140469..3d4d197 100755
--- a/gdsfmt/src/Makevars
+++ b/gdsfmt/src/Makevars
@@ -6,7 +6,7 @@
PKG_CPPFLAGS = -DUSING_R -D_FILE_OFFSET_BITS=64 -I../inst/include -ICoreArray
# to set flags for the linker
-PKG_LIBS = ./liblzma.a -lpthread
+PKG_LIBS = -lz -llz4 -llzma -lpthread
SOURCES = \
R_CoreArray.cpp \
@@ -65,27 +65,11 @@ OBJECTS = \
CoreArray/dStream.o \
CoreArray/dStruct.o \
CoreArray/dSparse.o \
- CoreArray/dVLIntGDS.o \
- ZLIB/adler32.o \
- ZLIB/compress.o \
- ZLIB/crc32.o \
- ZLIB/deflate.o \
- ZLIB/infback.o \
- ZLIB/inffast.o \
- ZLIB/inflate.o \
- ZLIB/inftrees.o \
- ZLIB/trees.o \
- ZLIB/uncompr.o \
- ZLIB/zutil.o \
- LZ4/lz4.o \
- LZ4/lz4hc.o \
- LZ4/lz4frame.o \
- LZ4/xxhash.o
+ CoreArray/dVLIntGDS.o
all: $(SHLIB)
-$(SHLIB): liblzma.a
ZLIB/adler32.o: