r-httpgd: use latest sources, use metadata checks

This commit is contained in:
Pekka Ristola 2024-03-24 13:10:01 +02:00
parent 51bb1ed3c8
commit 172f6a2a9d
No known key found for this signature in database
GPG key ID: 2C20BE716E05213E
6 changed files with 157 additions and 37 deletions

View file

@ -1,42 +1,41 @@
# system requirements: C++17, libpng, cairo, freetype2, fontconfig
# Maintainer: sukanka <su975853527@gmail.com>
_pkgname=httpgd
_pkgver=1.3.1
_pkgver=2.0.1
pkgname=r-${_pkgname,,}
pkgver=1.3.1
pkgrel=4
pkgver=${_pkgver//-/.}
pkgrel=0
pkgdesc="A 'HTTP' Server Graphics Device"
arch=('x86_64')
url="https://cran.r-project.org/package=${_pkgname}"
license=('GPL')
arch=(x86_64)
url="https://cran.r-project.org/package=$_pkgname"
license=('GPL-2.0-or-later')
depends=(
r
r-bh
r-unigd
)
makedepends=(
r-asioheaders
r-cpp11
r-later
r-systemfonts
libpng
cairo
freetype2
fontconfig
)
optdepends=(
r-fontquiver
r-covr
r-future
r-httr
r-jsonlite
r-knitr
r-rmarkdown
r-testthat
r-xml2
)
source=("https://cran.r-project.org/src/contrib/Archive/${_pkgname}/${_pkgname}_${_pkgver}.tar.gz")
sha256sums=('6dbfe3aaf70a004abb92268a80816bb604033b094d46420ba14f3ffaf13adaee')
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
md5sums=('2c18e37c6f9c36f743ce8b467ab370cd')
b2sums=('5b40d65f133c5cda3c251478d643b747a0b4b048a0dacbd0be94271b021d898353d57270df601102dbfbcf4aaac471dd0c39f013393e3e37adafebce49d40f7e')
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

@ -1,14 +1,15 @@
build_prefix: extra-x86_64
maintainers:
- github: sukanka
email: su975853527@gmail.com
- github: sukanka
email: su975853527@gmail.com
repo_depends:
- r-bh
- r-cpp11
- r-later
- r-systemfonts
- r-unigd
repo_makedepends:
- r-asioheaders
- r-cpp11
update_on:
- regex: httpgd_([\d._-]+).tar.gz
source: regex
url: https://cran.r-project.org/src/contrib/Archive/httpgd
- alias: r
- source: rpkgs
pkgname: httpgd
repo: cran
md5: true
- alias: r

View file

@ -0,0 +1,60 @@
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
_pkgname=unigd
_pkgver=0.1.0
pkgname=r-${_pkgname,,}
pkgver=${_pkgver//-/.}
pkgrel=1
pkgdesc="Universal Graphics Device"
arch=(x86_64)
url="https://cran.r-project.org/package=$_pkgname"
license=('GPL-2.0-or-later')
depends=(
cairo
libpng
libtiff
r-systemfonts
zlib
)
makedepends=(
r-cpp11
)
checkdepends=(
r-fontquiver
r-testthat
r-xml2
)
optdepends=(
r-covr
r-fontquiver
r-knitr
r-rmarkdown
r-testthat
r-xml2
)
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
"$_pkgname-tiff.patch::https://github.com/nx10/unigd/pull/17.patch")
md5sums=('1674fafbd0e2d6fec077499a6859b1a1'
'6edc5c3253cb665014e2087f4e0f17b1')
b2sums=('28e3760d4740fbd14221dd8cceaec2943a3673db3eac8720bc08f5d7f223f6bbf733c34a0ab7cf3664dc12e069376a9e2177465643928f6578cf1c8f34374d90'
'7dc5125999ece6a23c8567006d873d2c4b705b97cae324bc6508cf4700b9378ae0642d1b94670b3ca46074be35192ae2991c05acd6ed97658626dbfdde3d0736')
prepare() {
# fix libtiff configuration
patch -Np1 -d "$_pkgname" < "$_pkgname-tiff.patch"
}
build() {
mkdir build
R CMD INSTALL -l build "$_pkgname"
}
check() {
cd "$_pkgname/tests"
R_LIBS="$srcdir/build" NOT_CRAN=true Rscript --vanilla testthat.R
}
package() {
install -d "$pkgdir/usr/lib/R/library"
cp -a --no-preserve=ownership "build/$_pkgname" "$pkgdir/usr/lib/R/library"
}

View file

@ -0,0 +1,17 @@
#!/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():
r_pre_build(
_G,
expect_systemrequirements = "libpng, cairo, freetype2, fontconfig",
)
def post_build():
git_pkgbuild_commit()
update_aur_repo()

View file

@ -0,0 +1,42 @@
build_prefix: extra-x86_64
maintainers:
- github: pekkarr
email: pekkarr@protonmail.com
repo_depends:
- r-systemfonts
repo_makedepends:
- r-cpp11
- r-fontquiver
- r-testthat
- r-xml2
update_on:
- source: rpkgs
pkgname: unigd
repo: cran
md5: true
- alias: r
- source: alpm
alpm: cairo
repo: extra
provided: libcairo.so
strip_release: true
- source: alpm
alpm: libpng
repo: extra
provided: libpng16.so
strip_release: true
- source: alpm
alpm: libtiff
repo: extra
provided: libtiff.so
strip_release: true
- source: alpm
alpm: libtiff
repo: extra
provided: libtiffxx.so
strip_release: true
- source: alpm
alpm: zlib
repo: core
provided: libz.so
strip_release: true