mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
r-xml: fix build, use metadata checks
This commit is contained in:
parent
63dfd7def8
commit
ebdb6303c5
4 changed files with 74 additions and 25 deletions
|
@ -1,32 +1,47 @@
|
||||||
# system requirements: libxml2 (>= 2.6.3)
|
# Maintainer: Pekka Ristola <pekkarr [at] protonmail [dot] com>
|
||||||
# Maintainer: Guoyi Zhang <guoyizhang at malacology dot net>
|
# Contributor: Guoyi Zhang <guoyizhang at malacology dot net>
|
||||||
|
# Contributor: Alex Branham <branham@utexas.edu>
|
||||||
|
# Contributor: fordprefect <fordprefect@dukun.de>
|
||||||
|
# Contributor: Nick B <Shirakawasuna at gmail _dot_com>
|
||||||
|
|
||||||
_pkgname=XML
|
_pkgname=XML
|
||||||
_pkgver=3.99-0.15
|
_pkgver=3.99-0.16
|
||||||
pkgname=r-${_pkgname,,}
|
pkgname=r-${_pkgname,,}
|
||||||
pkgver=3.99.0.15
|
pkgver=${_pkgver//-/.}
|
||||||
pkgrel=1
|
pkgrel=0
|
||||||
pkgdesc='Tools for Parsing and Generating XML Within R and S-Plus'
|
pkgdesc="Tools for Parsing and Generating XML Within R and S-Plus"
|
||||||
arch=('x86_64')
|
arch=(x86_64)
|
||||||
url="https://cran.r-project.org/package=${_pkgname}"
|
url="https://cran.r-project.org/package=${_pkgname}"
|
||||||
license=('BSD')
|
license=(BSD)
|
||||||
depends=(
|
depends=(
|
||||||
|
libxml2
|
||||||
r
|
r
|
||||||
)
|
)
|
||||||
optdepends=(
|
optdepends=(
|
||||||
r-bitops
|
r-bitops
|
||||||
r-rcurl
|
r-rcurl
|
||||||
)
|
)
|
||||||
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz")
|
source=("https://cran.r-project.org/src/contrib/${_pkgname}_${_pkgver}.tar.gz"
|
||||||
sha256sums=('98a14694670a8a1d9a03e184ec60203180fb8eca9fb3da086693b01ed7003b3e')
|
"fix-build.patch")
|
||||||
|
md5sums=('afa1fd1496595b5aa4f6cb758bad0122'
|
||||||
|
'fe644b51ff4b55a2b594a6c7dda5bc25')
|
||||||
|
sha256sums=('350d37bab99ba3dac03313fa3901cc053ab2d962a94a9c3404fb3ad0a91cc95b'
|
||||||
|
'5fd93db9dbd4100d4db55714c62340b025d0a871eaf61bffe145fb743e5d26da')
|
||||||
|
|
||||||
|
prepare() {
|
||||||
|
# fix build
|
||||||
|
patch -Np1 -i fix-build.patch
|
||||||
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
R CMD INSTALL ${_pkgname}_${_pkgver}.tar.gz -l "${srcdir}"
|
mkdir -p build
|
||||||
|
R CMD INSTALL "$_pkgname" -l build
|
||||||
}
|
}
|
||||||
|
|
||||||
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"
|
||||||
install -Dm644 "${_pkgname}/LICENSE" -t "${pkgdir}/usr/share/licenses/${pkgname}"
|
|
||||||
|
install -d "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
|
ln -s "/usr/lib/R/library/$_pkgname/LICENSE" "$pkgdir/usr/share/licenses/$pkgname"
|
||||||
}
|
}
|
||||||
# vim:set ts=2 sw=2 et:
|
|
||||||
|
|
24
BioArchLinux/r-xml/fix-build.patch
Normal file
24
BioArchLinux/r-xml/fix-build.patch
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
diff --git a/XML/src/HTMLParse.c b/XML/src/HTMLParse.c
|
||||||
|
index 8d71f9f..7dea289 100644
|
||||||
|
--- a/XML/src/HTMLParse.c
|
||||||
|
+++ b/XML/src/HTMLParse.c
|
||||||
|
@@ -11,6 +11,7 @@
|
||||||
|
|
||||||
|
#include "libxml/HTMLparser.h"
|
||||||
|
#include "libxml/HTMLtree.h"
|
||||||
|
+#include "libxml/xmlsave.h"
|
||||||
|
|
||||||
|
#include <sys/stat.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
diff --git a/XML/src/XMLTree.c b/XML/src/XMLTree.c
|
||||||
|
index 6047de0..c28d5d0 100644
|
||||||
|
--- a/XML/src/XMLTree.c
|
||||||
|
+++ b/XML/src/XMLTree.c
|
||||||
|
@@ -35,6 +35,7 @@
|
||||||
|
#include <libxml/HTMLtree.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#include <libxml/xmlsave.h>
|
||||||
|
|
||||||
|
#define R_USE_XML_ENCODING 1
|
||||||
|
#include "Utils.h" /* R_createXMLNodeRef, Encoding macros. */
|
|
@ -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 = "libxml2 (>= 2.6.3)",
|
||||||
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,15 @@
|
||||||
build_prefix: extra-x86_64
|
build_prefix: extra-x86_64
|
||||||
maintainers:
|
maintainers:
|
||||||
- github: starsareintherose
|
- github: pekkarr
|
||||||
email: kuoi@bioarchlinux.org
|
email: pekkarr@protonmail.com
|
||||||
update_on:
|
update_on:
|
||||||
- regex: XML_([\d._-]+).tar.gz
|
- source: rpkgs
|
||||||
source: regex
|
pkgname: XML
|
||||||
url: https://cran.r-project.org/package=XML
|
repo: cran
|
||||||
|
md5: true
|
||||||
- alias: r
|
- alias: r
|
||||||
|
- source: alpm
|
||||||
|
alpm: libxml2
|
||||||
|
repo: core
|
||||||
|
provided: libxml2.so
|
||||||
|
strip_release: true
|
||||||
|
|
Loading…
Add table
Reference in a new issue