mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-08-05 13:27:09 +02:00
This commit updates $license variable in all APKBUILDs to comply with short names specified by SPDX version 3.0 [1] where possible. It was done using find-and-replace method on substrings inside $license variables. Only license names were updated, not "expressions" specifying relation between the licenses (e.g. "X and Y", "X or Y", "X and (Y or Z)") or exceptions (e.g. "X with exceptions"). Many licenses have a version or multiple variants, e.g. MPL-2.0, BSD-2-Clause, BSD-3-Clause. However, $license in many aports do not contain license version or variant. Since there's no way how to infer this information just from abuild, it were left without the variant suffix or version, i.e. non SPDX compliant. GNU licenses (AGPL, GFDL, GPL, LGPL) are especially complicated. They exist in two variants: -only (formerly e.g. GPL-2.0) and -or-later (formerly e.g. GPL-2.0+). We did not systematically noted distinguish between these variants, so GPL-2.0, GPL2, GPLv2 etc. may mean GPL-2.0-only or GPL-2.0-or-later. Thus GNU licenses without "+" (e.g. GPL2+) were left without the variant suffix, i.e. non SPDX compliant. Note: This commit just fixes format of the license names, no verification has been done if the specified license information is actually correct! [1]: https://spdx.org/licenses/
106 lines
2.7 KiB
Plaintext
106 lines
2.7 KiB
Plaintext
# Contributor: Nirosan <pnirosan@gmail.com>
|
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
|
|
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
|
|
pkgname=R
|
|
pkgver=3.4.3
|
|
pkgrel=0
|
|
pkgdesc="Language and environment for statistical computing"
|
|
url="https://www.r-project.org"
|
|
arch="all !s390x"
|
|
license="GPL-2.0 GPL-3 LGPL-2.1"
|
|
depends="$pkgname-mathlib"
|
|
depends_dev="gcc gfortran icu-dev libjpeg-turbo libpng-dev make openblas-dev
|
|
pcre-dev>=8.10 readline-dev xz-dev zlib-dev bzip2-dev curl-dev>=7.28
|
|
"
|
|
makedepends="$depends_dev cairo-dev libxmu-dev openjdk8-jre-base pango-dev
|
|
perl tiff-dev tk-dev
|
|
"
|
|
install="$pkgname.post-install"
|
|
subpackages="$pkgname-mathlib $pkgname-dev $pkgname-doc"
|
|
source="https://cran.r-project.org/src/base/R-${pkgver%%.*}/$pkgname-$pkgver.tar.gz"
|
|
builddir="$srcdir/$pkgname-$pkgver"
|
|
|
|
_rhome="usr/lib/R"
|
|
ldpath="/$_rhome/lib"
|
|
|
|
build() {
|
|
cd "$builddir"
|
|
|
|
# CXXFLAGS is propagated to /etc/R/Makeconf that is read when building
|
|
# additional R modules. -D__MUSL__ is needed for some modules like Rcpp.
|
|
# htps://github.com/RcppCore/Rcpp/issues/448
|
|
CXXFLAGS="$CXXFLAGS -D__MUSL__" ./configure \
|
|
--prefix=/usr \
|
|
--sysconfdir=/etc/R \
|
|
--localstatedir=/var \
|
|
--mandir=/usr/share/man \
|
|
--libdir=/usr/lib \
|
|
rdocdir=/usr/share/doc/R \
|
|
rincludedir=/usr/include/R \
|
|
rsharedir=/usr/share/R \
|
|
--disable-nls \
|
|
--enable-R-shlib \
|
|
--enable-java \
|
|
--without-recommended-packages \
|
|
--with-blas=openblas \
|
|
--with-cairo \
|
|
--with-ICU \
|
|
--with-jpeglib \
|
|
--with-lapack \
|
|
--with-libpng \
|
|
--with-libtiff \
|
|
--with-tcltk \
|
|
--with-x
|
|
|
|
make -j1
|
|
make -j1 -C src/nmath/standalone
|
|
}
|
|
|
|
# TODO: Run provided test suite.
|
|
check() {
|
|
cd "$builddir"
|
|
|
|
./bin/R --version
|
|
./bin/R --slave --vanilla -e 'print("Hello, world!")'
|
|
}
|
|
|
|
package() {
|
|
local destdir="$pkgdir/$_rhome"
|
|
|
|
cd "$builddir"
|
|
|
|
make DESTDIR="$pkgdir" install
|
|
|
|
# Install libRmath.so.
|
|
cd src/nmath/standalone
|
|
make DESTDIR="$pkgdir" install
|
|
cd -
|
|
|
|
# Fixup R wrapper script (taken from Arch).
|
|
rm "$destdir"/bin/R
|
|
ln -sf /usr/bin/R "$destdir"/bin/R
|
|
|
|
# Remove some useless files (COPYING is duplicated, it will be
|
|
# in -doc, don't worry).
|
|
rm "$destdir"/COPYING "$destdir"/SVN-REVISION
|
|
|
|
mkdir -p "$pkgdir"/etc/R
|
|
|
|
# R apparently ignores --sysconfdir, so we must manually move configs
|
|
# to /etc/R and make symlinks.
|
|
cd "$destdir"/etc
|
|
local f; for f in *; do
|
|
mv "$f" "$pkgdir"/etc/R/ && ln -sf /etc/R/$f $f
|
|
done
|
|
cd -
|
|
}
|
|
|
|
mathlib() {
|
|
pkgdesc="Standalone math library from the R project"
|
|
|
|
mkdir -p "$subpkgdir"/usr/lib
|
|
mv "$pkgdir"/usr/lib/libRmath.so* "$subpkgdir"/usr/lib
|
|
}
|
|
|
|
sha512sums="d4b89daac5060c6d32b2287192c47fc7e8f71f8c2f70f133799bb279c6e486239cb7f298779a59a124eb4228d728ffdaf6bb138c4fd64653bbce0cdf5b0b3412 R-3.4.3.tar.gz"
|