r-*: fix several packages

This commit is contained in:
Pekka Ristola 2024-05-12 17:59:39 +03:00
parent f888c64b6c
commit b3712e0e2d
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
14 changed files with 169 additions and 228 deletions

View file

@ -1,10 +1,10 @@
# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net>
_pkgname=cisPath
_pkgver=1.42.0
_pkgver=1.44.0
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=2
pkgrel=0
pkgdesc="Visualization and management of the protein-protein interaction networks"
arch=(x86_64)
url="https://bioconductor.org/packages/$_pkgname"
@ -12,9 +12,17 @@ license=('GPL-3.0-or-later')
depends=(
r
)
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('958a35281b9aa98b2d5c3a5c4e9c8824')
b2sums=('6c481e29e057a916b9302de8e6027926d12bf449eedf8f10a192e34397eff5091c1e8efbcde5e831fe08d25327e30592f5d43502f076b7d54db1f513756d56d5')
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
"fix-build.patch")
md5sums=('c992f1b704f16c4c595b5b3de5490077'
'90d1a443b9782134472f0b84fe944ce3')
b2sums=('3ee53686dd5a3f71558b6fd2df08528a5bab4ca7ff520ee7139c068012dc45628b5fe4dc1e02fdd8952b95dff14921b23ebc1fe894c0955588c478374a766402'
'67c1b2925a57b75420408f7ce208e677a6def4622d2977f3cc349520c901685042b96302bcfc30e0816bb23f13ed5e6f70c50e7eee5e8fa58643d09d8dfb96c5')
prepare() {
# fix format string errors
patch -Np1 -i fix-build.patch
}
build() {
mkdir build

View file

@ -0,0 +1,13 @@
diff --git a/cisPath/src/cisPath.cpp b/cisPath/src/cisPath.cpp
index 6c2f6c9..858ea4d 100644
--- a/cisPath/src/cisPath.cpp
+++ b/cisPath/src/cisPath.cpp
@@ -3552,7 +3552,7 @@ bool processWebInput(const char *input, bool addSwiss2Swiss, bool detectPathFlag
}
if(tokens.size() != 7){
PRINTFUNCTION("Invalid file format!\n");
- PRINTFUNCTION(buffer);
+ PRINTFUNCTION("%s", buffer);
return false;
}
/////////////////////////////////////

View file

@ -1,10 +1,10 @@
# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net>
_pkgname=HilbertVisGUI
_pkgver=1.60.0
_pkgver=1.62.0
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=2
pkgrel=0
pkgdesc="HilbertVisGUI"
arch=(x86_64)
url="https://bioconductor.org/packages/$_pkgname"
@ -21,9 +21,17 @@ depends=(
optdepends=(
r-iranges
)
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('e9e6a2cce82ff0dfcf0828ae7d123537')
b2sums=('cafe62163b23afa93b138788e4a0b91c0af1fb338822beb27e64176944fb2efd3c1882a15ff97a36290a54c1cf3884dda399196bf11018923eb1d56f89b90854')
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
"fix-build.patch")
md5sums=('6d0838301b345c1f905c10a7a90ea8b4'
'950ae2bcf091fb161716d590be861702')
b2sums=('b87b9c986a81a863ff0839d2d049c28b65889cb0a37a9a462ec5156941a0f318c44449fb8077de8c1ffa3f0f92b39f883157632c7a40d539c963e8cabee740ca'
'83a2e27a153a6037fb03d6d960be93e76ec62ed5f130aaf63c456c75ac0faed9197264505199e95aa15acbc7765fb9aeadc8532432a44fa81a6c64b64de5d849')
prepare() {
# fix format string errors
patch -Np1 -i fix-build.patch
}
build() {
mkdir build

View file

@ -0,0 +1,17 @@
diff --git a/HilbertVisGUI/src/R_interface.cc b/HilbertVisGUI/src/R_interface.cc
index ba92660..e9064c1 100644
--- a/HilbertVisGUI/src/R_interface.cc
+++ b/HilbertVisGUI/src/R_interface.cc
@@ -522,11 +522,9 @@ extern "C" SEXP R_display_hilbert( SEXP args)
for( int j = 0; j < i; j++ )
delete (*dataCols)[j];
delete dataCols;
- char buf[300];
- snprintf( buf, 300, i < Rf_length( seqnames ) ?
+ Rf_error( i < Rf_length( seqnames ) ?
"R_display_hilbert: Data vector #%d is not a vector of integers or reals notan Rle object." :
"R_display_hilbert: Data vector #%d does not have a name in second argument.", i+1 );
- Rf_error( buf );
}
Glib::ustring name = CHAR(STRING_ELT( seqnames, i ));
long fl = ( ( full_lengths != R_NilValue ) && ( i < Rf_length(full_lengths) ) &&

View file

@ -1,16 +1,15 @@
# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net>
_pkgname=MANOR
_pkgver=1.74.0
_pkgver=1.76.0
pkgname=r-${_pkgname,,}
pkgver=1.74.0
pkgrel=1
pkgdesc='CGH Micro-Array NORmalization'
arch=('x86_64')
url="https://bioconductor.org/packages/${_pkgname}"
license=('GPL')
pkgver=${_pkgver//-/.}
pkgrel=0
pkgdesc="CGH Micro-Array NORmalization"
arch=(x86_64)
url="https://bioconductor.org/packages/$_pkgname"
license=('GPL-2.0-only')
depends=(
r
r-glad
)
optdepends=(
@ -18,15 +17,24 @@ optdepends=(
r-knitr
r-rmarkdown
)
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('1d4092c359dc7e57cc812d1ff5aa71954231fb5df576651e279799be0333ee83')
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
"$_pkgname-fix-build.patch::https://github.com/pneuvial/MANOR/pull/4.patch")
md5sums=('e872fc4e6c62e53001c914f880e22b33'
'ecb77c1d613977effbc8aa1c27fce89a')
b2sums=('0c62048642bd8619b773eb35e61abe7b037f04fdc5507ebd869f08a3a9019fd9d76aeba43b375ddc961ecfc5f76b2b3aadf0107b730611448f88ada16b7b4349'
'1b6770bb700ce4451769eaba495da581056ffbcc8554205400ad0d4246c487ecf9e8c7d0c2152badefa22fb273175467a0bad664da858cf8c6f6d9f8bc707ec5')
prepare() {
# fix format string errors
patch -Np1 -d "$_pkgname" < "$_pkgname-fix-build.patch"
}
build() {
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
mkdir build
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:

View file

@ -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()

View file

@ -5,7 +5,8 @@ maintainers:
repo_depends:
- r-glad
update_on:
- regex: MANOR_([\d._-]+).tar.gz
source: regex
url: https://bioconductor.org/packages/MANOR
- source: rpkgs
pkgname: MANOR
repo: bioc
md5: true
- alias: r

View file

@ -1,22 +1,22 @@
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
_pkgname=Rarr
_pkgver=1.2.0
_pkgver=1.4.0
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=3
pkgrel=0
pkgdesc="Read Zarr Files in R"
arch=(x86_64)
url="https://bioconductor.org/packages/$_pkgname"
license=('MIT')
depends=(
blosc
lz4
r-httr
r-jsonlite
r-paws.storage
r-r.utils
r-stringr
zstd
)
checkdepends=(
r-mockery
@ -29,19 +29,9 @@ optdepends=(
r-mockery
r-tinytest
)
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
"system-libs.patch")
md5sums=('94af864ae3de3557840993a429944ea2'
'83d4df5360e4cf2088753078dc2970b6')
b2sums=('1ed0ea1b9eb24b60fcbebcd56ebb49f149a82b3d3218d0f86214537836c051f07cfcceac84ac53711005249cbd5c157b55371c629510de7457f9054b1dee9d1c'
'137df7ed9d8504b913aebd2588a8d88651d6a46bb8985981f0aa3032244372fd163b48c691b1fd2918d8f9aa3834b2538f6a4901bb01538fa8a0875e0f771353')
prepare() {
cd "$_pkgname"
# use system blosc and lz4
patch -Np1 -i ../system-libs.patch
autoconf
}
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('b4ccf32bada187fdbb1ce37b6c49b23f')
b2sums=('1b13a23377f723ea5d33e2b832edf10b79c92b1a6eca513859b3307b334b5a686bfc64a409a43dececda5840e093facd105b8582310a3c160f87954eccf57112')
build() {
mkdir build

View file

@ -21,7 +21,8 @@ update_on:
pkgname: blosc
filename: usr/lib/libblosc\.so\.([^.]+)
repo: extra
- source: alpmfiles
pkgname: lz4
filename: usr/lib/liblz4\.so\.([^.]+)
- source: alpm
alpm: zstd
repo: core
provided: libzstd.so
strip_release: true

View file

@ -1,155 +0,0 @@
diff --git a/configure.ac b/configure.ac
index a6d5842..c29cf85 100644
--- a/configure.ac
+++ b/configure.ac
@@ -30,98 +30,3 @@ AC_SUBST(AR)
AC_CONFIG_FILES([src/Makevars])
AC_OUTPUT
-
-## check if we have an x86 CPU
-machine=`uname -m`
-AS_CASE([$machine],
- [*86*], [x86_CPU=true],
- [x86_CPU=false]
-)
-
-## see if -msse2 is a supported flag
-AX_CHECK_COMPILE_FLAG([-msse2], [MSSE2=true], [MSSE2=false])
-
-if [ "${IS_BIOC_BUILD_MACHINE}" == true ]; then
- AC_MSG_NOTICE(Bioc build machine; disabling MAVX2)
- MAVX2=false
-else
- ## see if -mavx2 is a supported flag
- AX_CHECK_COMPILE_FLAG([-mavx2], [MAVX2=true], [MAVX2=false])
-fi
-
-AC_RUN_IFELSE(
- [AC_LANG_PROGRAM([#include <stdlib.h>],
- [__builtin_cpu_init ();])
- ],
- [ax_cv_gcc_check_x86_cpu_init=true],
- [ax_cv_gcc_check_x86_cpu_init=false])
-
-## check CPU supports sse2 and avx2
-if [ "$x86_CPU" == true ] && [ "$ax_cv_gcc_check_x86_cpu_init" == true ]; then
- AX_GCC_X86_CPU_SUPPORTS(sse2, [SSE2_SUPPORTED=true], [SSE2_SUPPORTED=false])
- if [ "$MAVX2" = true ]; then
- AX_GCC_X86_CPU_SUPPORTS(avx2, [AVX2_SUPPORTED=true], [AVX2_SUPPORTED=false])
- fi
-else
- SSE2_SUPPORTED=false
- AVX2_SUPPORTED=false
-fi
-
-if [ "$MSSE2" = true ] && [ "$SSE2_SUPPORTED" = true ] ; then
- SSE2="-DSHUFFLE_SSE2_ENABLED"
- MSSE2="-msse2"
- SSE2_BITSHUFFLE='bitshuffle-sse2.o: bitshuffle-sse2.c
- $(CC) $(FLAGS) -c bitshuffle-sse2.c'
- SSE2_BITSHUFFLE_OBJ='bitshuffle-sse2.o'
- SSE2_SHUFFLE='shuffle-sse2.o: shuffle-sse2.c
- $(CC) $(FLAGS) -c shuffle-sse2.c'
- SSE2_SHUFFLE_OBJ='shuffle-sse2.o'
- SSE2_OBJ_PATH='lib/blosc-1.20.1/'
-else
- SSE2=""
- MSSE2=""
- SSE2_BITSHUFFLE=""
- SSE2_SHUFFLE=""
- SSE2_BITSHUFFLE_OBJ=""
- SSE2_SHUFFLE_OBJ=""
- SSE2_OBJ_PATH=""
-fi
-
-AC_SUBST(SSE2)
-AC_SUBST(MSSE2)
-AC_SUBST(SSE2_BITSHUFFLE)
-AC_SUBST(SSE2_SHUFFLE)
-AC_SUBST(SSE2_BITSHUFFLE_OBJ)
-AC_SUBST(SSE2_SHUFFLE_OBJ)
-AC_SUBST(SSE2_OBJ_PATH)
-
-if [ "$MAVX2" = true ] && [ "$AVX2_SUPPORTED" = true ] ; then
- AVX2="-DSHUFFLE_AVX2_ENABLED"
- MAVX2="-mavx2"
- AVX2_BITSHUFFLE='bitshuffle-avx2.o: bitshuffle-avx2.c
- $(CC) $(FLAGS) -c bitshuffle-avx2.c'
- AVX2_BITSHUFFLE_OBJ='bitshuffle-avx2.o'
- AVX2_SHUFFLE='shuffle-avx2.o: shuffle-avx2.c
- $(CC) $(FLAGS) -c shuffle-avx2.c'
- AVX2_SHUFFLE_OBJ='shuffle-avx2.o'
- AVX2_OBJ_PATH='lib/blosc-1.20.1/'
-else
- AVX2=""
- MAVX2=""
- AVX2_BITSHUFFLE=""
- AVX2_SHUFFLE=""
- AVX2_BITSHUFFLE_OBJ=""
- AVX2_SHUFFLE_OBJ=""
- AVX2_OBJ_PATH=""
-fi
-
-AC_SUBST(AVX2)
-AC_SUBST(MAVX2)
-AC_SUBST(AVX2_BITSHUFFLE)
-AC_SUBST(AVX2_SHUFFLE)
-AC_SUBST(AVX2_BITSHUFFLE_OBJ)
-AC_SUBST(AVX2_SHUFFLE_OBJ)
-AC_SUBST(AVX2_OBJ_PATH)
-
-AC_CONFIG_FILES([src/compression_tools/blosc/lib/blosc-1.20.1/Makefile src/compression_tools/blosc/Makefile])
-AC_OUTPUT
diff --git a/src/Makevars.in b/src/Makevars.in
index bcb0b4f..91881df 100644
--- a/src/Makevars.in
+++ b/src/Makevars.in
@@ -9,12 +9,10 @@ export PKG_R_CPPFLAGS=@R_CPPFLAGS@
COMPRESSION_LIBS=compression_tools/blosc/libblosc.a
-PKG_LIBS=$(COMPRESSION_LIBS)
+PKG_LIBS = -lblosc -llz4
all: $(SHLIB)
-$(SHLIB): compression_libs
-
compression_libs: $(COMPRESSION_LIBS)
compression_tools/blosc/libblosc.a:
diff --git a/src/compress.h b/src/compress.h
index 573e203..72ddd98 100644
--- a/src/compress.h
+++ b/src/compress.h
@@ -2,9 +2,9 @@
#ifndef _COMPRESSION_H
#define _COMPRESSION_H
- #include "compression_tools/blosc/lib/blosc-1.20.1/blosc.h"
- #include "compression_tools/blosc/lib/lz4-1.9.2/lz4.h"
- #include "compression_tools/blosc/lib/lz4-1.9.2/lz4hc.h"
+ #include <blosc.h>
+ #include <lz4.h>
+ #include <lz4hc.h>
#endif
SEXP compress_chunk_BLOSC(SEXP input, SEXP type_size);
diff --git a/src/decompress.h b/src/decompress.h
index a13b390..3ed84e7 100644
--- a/src/decompress.h
+++ b/src/decompress.h
@@ -2,9 +2,9 @@
#ifndef _COMPRESSION_H
#define _COMPRESSION_H
- #include "compression_tools/blosc/lib/blosc-1.20.1/blosc.h"
- #include "compression_tools/blosc/lib/lz4-1.9.2/lz4.h"
- #include "compression_tools/blosc/lib/lz4-1.9.2/lz4hc.h"
+ #include <blosc.h>
+ #include <lz4.h>
+ #include <lz4hc.h>
#endif
SEXP decompress_chunk_BLOSC(SEXP input);

View file

@ -1,16 +1,15 @@
# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net>
_pkgname=rGADEM
_pkgver=2.50.0
_pkgver=2.52.0
pkgname=r-${_pkgname,,}
pkgver=2.50.0
pkgrel=1
pkgdesc='de novo motif discovery'
arch=('x86_64')
url="https://bioconductor.org/packages/${_pkgname}"
license=('Artistic2.0')
pkgver=${_pkgver//-/.}
pkgrel=0
pkgdesc="de novo motif discovery"
arch=(x86_64)
url="https://bioconductor.org/packages/$_pkgname"
license=('Artistic-2.0')
depends=(
r
r-biostrings
r-bsgenome
r-genomicranges
@ -21,15 +20,24 @@ optdepends=(
r-bsgenome.hsapiens.ucsc.hg19
r-rtracklayer
)
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('f67e77b038aa1d56c261744d3467569ac6f5b9e6564a56253cc66e5316d64c92')
source=("https://bioconductor.org/packages/release/bioc/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
"fix-build.patch")
md5sums=('292f0a314055f914974e9dc9a43464ef'
'70cfeaf0a408374fb80a184522865ff6')
b2sums=('f201f88ee48218ec5b6ba511ef1d956858fe85666d682c91d4301ab38d5f123835f0c5c7c0c370dba5904e14eb7f626aa0c54deee84450b6ad5b64144ec69edc'
'7ddd59889027df17d55b6948170539ba7b62f1780e0e3da65cf96cc4a2337c2796d7c9d5b883c4000ab2e090f92b4fc766e9cc85ccd376ee0b8bef252d24d0b8')
prepare() {
# fix format string errors
patch -Np1 -i fix-build.patch
}
build() {
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
mkdir build
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:

View file

@ -0,0 +1,39 @@
diff --git a/rGADEM/src/background.c b/rGADEM/src/background.c
index 896b581..4d4af4a 100644
--- a/rGADEM/src/background.c
+++ b/rGADEM/src/background.c
@@ -28,7 +28,7 @@ int read_userBackgModel(char *fileName,BACKGROUND_Model *back) {
fp=fopen(fileName,"r");
if (!fp) {
- error(fileName);
+ error("%s", fileName);
/*perror(fileName); exit(0); */
}
diff --git a/rGADEM/src/read_matrix.c b/rGADEM/src/read_matrix.c
index f131ce9..1ba2b1a 100755
--- a/rGADEM/src/read_matrix.c
+++ b/rGADEM/src/read_matrix.c
@@ -24,7 +24,7 @@ double **read_initial_pwm(int *matrixLen,char *fileName) {
pwm=alloc_double_double(MAX_MATRIX_LENGTH,4);
fp=fopen(fileName,"r");
- if (!fp) { error(fileName);}
+ if (!fp) { error("%s", fileName);}
/*if (!fp) { perror(fileName); exit(0); }*/
checkfscanf = fscanf(fp,"%d %d",&numRow,&numCol);
diff --git a/rGADEM/src/read_seq.c b/rGADEM/src/read_seq.c
index 8f156b4..c7556fb 100755
--- a/rGADEM/src/read_seq.c
+++ b/rGADEM/src/read_seq.c
@@ -27,7 +27,7 @@ char **read_seq(int *numSeq,int *seqLen,char **geneID,int maxNumSeq,int maxSeqLe
char **seq,*buffer,*tok,*sscore;
fp=fopen(fileName,"r");
- if (!fp) { error(fileName);}
+ if (!fp) { error("%s", fileName);}
/*if (!fp) { perror(fileName); exit(0); }*/
maxBufferLen=MAX_BUFFER_LENGTH;

View file

@ -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()

View file

@ -9,7 +9,8 @@ repo_depends:
- r-iranges
- r-seqlogo
update_on:
- regex: rGADEM_([\d._-]+).tar.gz
source: regex
url: https://bioconductor.org/packages/rGADEM
- source: rpkgs
pkgname: rGADEM
repo: bioc
md5: true
- alias: r