mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-lpsymphony: fix depends, use metadata checks
This commit is contained in:
parent
4d4bc50a4a
commit
0182409f7f
5 changed files with 61 additions and 35 deletions
|
@ -1,49 +1,50 @@
|
||||||
# system requirements: GNU make
|
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
|
||||||
# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net>
|
# Contributor: Guoyi Zhang <guoyizhang at malacology dot net>
|
||||||
|
|
||||||
_pkgname=lpsymphony
|
_pkgname=lpsymphony
|
||||||
_pkgver=1.28.1
|
_pkgver=1.28.1
|
||||||
pkgname=r-${_pkgname,,}
|
pkgname=r-${_pkgname,,}
|
||||||
pkgver=1.28.1
|
pkgver=${_pkgver//[:-]/.}
|
||||||
pkgrel=0
|
pkgrel=0
|
||||||
pkgdesc='Symphony integer linear programming solver in R'
|
pkgdesc="Symphony integer linear programming solver in R"
|
||||||
arch=('x86_64')
|
arch=(x86_64)
|
||||||
url="https://bioconductor.org/packages/${_pkgname}"
|
url="https://bioconductor.org/packages/${_pkgname}"
|
||||||
license=('EPL')
|
license=(EPL)
|
||||||
depends=(
|
depends=(
|
||||||
|
coin-or-symphony
|
||||||
r
|
r
|
||||||
coin-or-asl
|
|
||||||
coin-or-clp
|
|
||||||
coin-or-coinutils
|
|
||||||
coin-or-osi
|
|
||||||
coin-or-cgl
|
|
||||||
make
|
|
||||||
glpk
|
|
||||||
)
|
)
|
||||||
makedepends=(
|
checkdepends=(
|
||||||
gcc-fortran
|
r-testthat
|
||||||
)
|
)
|
||||||
optdepends=(
|
optdepends=(
|
||||||
r-biocstyle
|
r-biocstyle
|
||||||
r-knitr
|
r-knitr
|
||||||
r-slam
|
|
||||||
r-testthat
|
r-testthat
|
||||||
)
|
)
|
||||||
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=('4d46f81f6bc676167c5dbd498c8415d97434274b885f11de5d29745ce6696421')
|
"system-symphony.patch")
|
||||||
|
md5sums=('a04276f8329ae09e82e3e16bc3a7b78e'
|
||||||
|
'5fe82566bce5f45a9d9d8682e51ebfaa')
|
||||||
|
sha256sums=('4d46f81f6bc676167c5dbd498c8415d97434274b885f11de5d29745ce6696421'
|
||||||
|
'e4ffaac1444e128a63ba43d0adbd3dd8b6acac0ca5e8b2d8fe43ab3ffcb92e5a')
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
sed -i 's#CXXFLAGS="-w -g -O2"#CXXFLAGS="-w -g -O2 -I/usr/include/coin"#' "${srcdir}/${_pkgname}/configure"
|
# build against system SYMPHONY
|
||||||
tar cfz "${_pkgname}.tar.gz" "${_pkgname}"
|
patch -Np1 -i system-symphony.patch
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
#R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
|
mkdir -p build
|
||||||
R CMD INSTALL ${_pkgname}.tar.gz -l "${srcdir}"
|
R CMD INSTALL "$_pkgname" -l build
|
||||||
|
}
|
||||||
|
|
||||||
|
check() {
|
||||||
|
cd "$_pkgname/tests"
|
||||||
|
R_LIBS="$srcdir/build" NOT_CRAN=true Rscript --vanilla testthat.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:
|
|
||||||
|
|
|
@ -1,12 +1,16 @@
|
||||||
#!/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(
|
||||||
if line.startswith('_pkgver='):
|
_G,
|
||||||
line = f'_pkgver={_G.newver}'
|
expect_systemrequirements = "GNU make",
|
||||||
print(line)
|
)
|
||||||
update_pkgver_and_pkgrel(_G.newver.replace(':', '.').replace('-', '.'))
|
|
||||||
|
|
||||||
def post_build():
|
def post_build():
|
||||||
git_pkgbuild_commit()
|
git_pkgbuild_commit()
|
||||||
|
|
|
@ -1,9 +1,14 @@
|
||||||
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_depends:
|
||||||
|
- coin-or-symphony
|
||||||
|
repo_makedepends:
|
||||||
|
- r-testthat
|
||||||
update_on:
|
update_on:
|
||||||
- regex: lpsymphony_([\d._-]+).tar.gz
|
- source: rpkgs
|
||||||
source: regex
|
pkgname: lpsymphony
|
||||||
url: https://bioconductor.org/packages/lpsymphony
|
repo: bioc
|
||||||
|
md5: true
|
||||||
- alias: r
|
- alias: r
|
||||||
|
|
15
BioArchLinux/r-lpsymphony/system-symphony.patch
Normal file
15
BioArchLinux/r-lpsymphony/system-symphony.patch
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
diff --git a/lpsymphony/configure b/lpsymphony/configure
|
||||||
|
index b3975c2..f1488ff 100755
|
||||||
|
--- a/lpsymphony/configure
|
||||||
|
+++ b/lpsymphony/configure
|
||||||
|
@@ -9,8 +9,8 @@ fi
|
||||||
|
|
||||||
|
R="${R_HOME}/bin/R"
|
||||||
|
|
||||||
|
-SYMPHONY_CPPFLAGS=`pkg-config --cflags SYMPHONY >/dev/null 2>&1`
|
||||||
|
-SYMPHONY_LIBS=`pkg-config --libs SYMPHONY >/dev/null 2>&1`
|
||||||
|
+SYMPHONY_CPPFLAGS=`pkg-config --cflags symphony 2>/dev/null`
|
||||||
|
+SYMPHONY_LIBS=`pkg-config --libs symphony 2>/dev/null`
|
||||||
|
|
||||||
|
test -z "${SYMPHONY_LIBS}" && SYMPHONY_LIBS="-lSym -lCgl -lOsiClp -lClp -lOsi -lCoinUtils"
|
||||||
|
|
|
@ -187,6 +187,7 @@ license_map = {
|
||||||
"BSD_2_clause + file LICENSE": "BSD",
|
"BSD_2_clause + file LICENSE": "BSD",
|
||||||
"BSD_3_clause + file LICENSE": "BSD",
|
"BSD_3_clause + file LICENSE": "BSD",
|
||||||
"BSL-1.0": "Boost",
|
"BSL-1.0": "Boost",
|
||||||
|
"EPL": "EPL",
|
||||||
"GPL": "GPL",
|
"GPL": "GPL",
|
||||||
"GPL (>= 2)": "GPL",
|
"GPL (>= 2)": "GPL",
|
||||||
"GPL (>= 3)": "GPL3",
|
"GPL (>= 3)": "GPL3",
|
||||||
|
|
Loading…
Add table
Reference in a new issue