mirror of
https://gitdl.cn/https://github.com/chakralinux/core.git
synced 2025-02-12 00:24:52 +08:00
r, python-rpy2: moved from core to desktop, FS#1331
This commit is contained in:
parent
d1e70ef756
commit
c792c89831
@ -1,40 +0,0 @@
|
||||
# $Id$
|
||||
# Maintainer: Antonio Rojas <arojas@archlinux.org>
|
||||
# Contributor: Oliver Sherouse <oliver DOT sherouse AT gmail DOT com>
|
||||
# Contributor: David Scholl <djscholl@gmail.com>
|
||||
# Contributor: David Pretty <david.pretty@gmail.com>
|
||||
|
||||
pkgbase=python-rpy2
|
||||
pkgname=('python2-rpy2' 'python3-rpy2')
|
||||
pkgver=2.5.6
|
||||
pkgrel=1
|
||||
pkgdesc="A very simple, yet robust, Python interface to the R Programming Language."
|
||||
arch=('i686' 'x86_64')
|
||||
url="http://rpy.sourceforge.net/"
|
||||
license=('MPL' 'GPL' 'LGPL')
|
||||
makedepends=('python3-setuptools' 'python2-setuptools' 'python3-numpy' 'python2-numpy' 'r')
|
||||
source=("http://pypi.python.org/packages/source/r/rpy2/rpy2-$pkgver.tar.gz")
|
||||
md5sums=('a36e758b633ce6aec6a5f450bfee980f')
|
||||
|
||||
prepare() {
|
||||
cd rpy2-$pkgver
|
||||
sed -i "s:Rlapack:lapack:" setup.py
|
||||
sed -i "s:os.path.join(RHOME.strip(), 'include'):'/usr/include/R':" setup.py
|
||||
sed -i "s:os.path.join(RHOME.strip(), 'include'):'/usr/include/R':" setup.py
|
||||
}
|
||||
|
||||
package_python2-rpy2() {
|
||||
depends=('python2-numpy' 'r' 'python2-singledispatch')
|
||||
cd rpy2-$pkgver
|
||||
|
||||
python2 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
sed -e 's|#!/usr/bin/env python|#!/usr/bin/env python2|' -i "$pkgdir"/usr/lib/python2.7/site-packages/rpy2/tests.py
|
||||
}
|
||||
|
||||
package_python3-rpy2() {
|
||||
depends=('python3-numpy' 'r')
|
||||
cd rpy2-$pkgver
|
||||
|
||||
python3 setup.py install --prefix=/usr --root="$pkgdir" --optimize=1
|
||||
}
|
||||
|
86
r/PKGBUILD
86
r/PKGBUILD
@ -1,86 +0,0 @@
|
||||
# Maintainer: Manuel Tortosa <manutortosa[at]chakra-project[dot]org>
|
||||
|
||||
pkgname=r
|
||||
pkgver=3.1.2
|
||||
pkgrel=1
|
||||
pkgdesc="Language and environment for statistical computing and graphics"
|
||||
arch=('x86_64')
|
||||
license=('GPL')
|
||||
url=('http://www.r-project.org/')
|
||||
depends=('atlas-lapack' 'bzip2' 'libpng' 'libjpeg' 'libtiff'
|
||||
'ncurses' 'pcre' 'readline' 'zlib' 'perl' 'gcc-libs'
|
||||
'libxt' 'libxmu' 'pango' 'xz' 'desktop-file-utils')
|
||||
makedepends=('openjdk' 'tk' 'gcc-fortran')
|
||||
backup=('etc/R/Makeconf' 'etc/R/Renviron' 'etc/R/ldpaths' 'etc/R/repositories' 'etc/R/javaconf')
|
||||
options=('!makeflags' '!emptydirs')
|
||||
source=("http://cran.r-project.org/src/base/R-${pkgver%%.*}/R-${pkgver}.tar.gz"
|
||||
'r.desktop'
|
||||
'r.png'
|
||||
'R.conf')
|
||||
sha1sums=('93809368e5735a630611633ac1fa99010020c5d6'
|
||||
'13aa29219bcaa102e575de8c1c8e0833d233e836'
|
||||
'a69a07ec363440efc18ce0a7f2af103375dea978'
|
||||
'43668da6cfd1b4455a99f23e79e2059294dddac9')
|
||||
|
||||
prepare() {
|
||||
cd R-${pkgver}
|
||||
|
||||
# set texmf dir correctly in makefile
|
||||
sed -i 's|$(rsharedir)/texmf|${datarootdir}/texmf|' share/Makefile.in
|
||||
# fix for texinfo 5.X
|
||||
# sed -i 's|test ${makeinfo_version_min} -lt 7|test ${makeinfo_version_min} -lt 0|' configure
|
||||
}
|
||||
|
||||
build() {
|
||||
cd R-${pkgver}
|
||||
|
||||
./configure --prefix=/usr \
|
||||
--libdir=/usr/lib \
|
||||
--sysconfdir=/etc/R \
|
||||
--datarootdir=/usr/share \
|
||||
rsharedir=/usr/share/R/ \
|
||||
rincludedir=/usr/include/R/ \
|
||||
rdocdir=/usr/share/doc/R/ \
|
||||
--with-x \
|
||||
--enable-R-shlib \
|
||||
--with-lapack \
|
||||
--with-blas \
|
||||
F77=gfortran \
|
||||
LIBnn=lib
|
||||
make
|
||||
|
||||
# make libRmath.so
|
||||
cd src/nmath/standalone
|
||||
make shared
|
||||
}
|
||||
|
||||
package() {
|
||||
cd R-${pkgver}
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
cd src/nmath/standalone
|
||||
make DESTDIR="${pkgdir}" install
|
||||
|
||||
# Fixup R wrapper scripts.
|
||||
sed -i "s|${pkgdir} ||" "${pkgdir}/usr/bin/R"
|
||||
rm "${pkgdir}/usr/lib/R/bin/R"
|
||||
cd "${pkgdir}/usr/lib/R/bin"
|
||||
ln -s ../../../bin/R
|
||||
|
||||
# install some freedesktop.org compatibility
|
||||
install -Dm644 "${srcdir}/r.desktop" \
|
||||
"${pkgdir}/usr/share/applications/r.desktop"
|
||||
install -Dm644 "${srcdir}/r.png" \
|
||||
"${pkgdir}/usr/share/pixmaps/r.png"
|
||||
|
||||
# move the config directory to /etc and create symlinks
|
||||
install -d "${pkgdir}/etc/R"
|
||||
cd "${pkgdir}/usr/lib/R/etc"
|
||||
for i in *; do
|
||||
mv -f ${i} "${pkgdir}/etc/R"
|
||||
ln -s /etc/R/${i} ${i}
|
||||
done
|
||||
|
||||
# Install ld.so.conf.d file to ensure other applications access the shared lib
|
||||
install -Dm644 "${srcdir}/R.conf" "${pkgdir}/etc/ld.so.conf.d/R.conf"
|
||||
}
|
11
r/r.desktop
11
r/r.desktop
@ -1,11 +0,0 @@
|
||||
[Desktop Entry]
|
||||
Name=R
|
||||
GenericName=environment for statistical computing
|
||||
Comment=language and environment for statistical computing and graphics
|
||||
Exec=R
|
||||
Icon=/usr/share/pixmaps/r.png
|
||||
DocPath=/usr/lib/R/doc/html/index.html
|
||||
StartupNotify=true
|
||||
Terminal=true
|
||||
Type=Application
|
||||
Categories=Education;Science;Math;
|
15
r/r.install
15
r/r.install
@ -1,15 +0,0 @@
|
||||
post_install() {
|
||||
update-desktop-database -q
|
||||
if [[ -x /usr/bin/mktexlsr ]]; then
|
||||
echo ">>> updating the filename database for texlive..."
|
||||
mktexlsr --quiet usr/share/texmf
|
||||
fi
|
||||
}
|
||||
|
||||
post_upgrade() {
|
||||
post_install
|
||||
}
|
||||
|
||||
post_remove() {
|
||||
post_install
|
||||
}
|
Loading…
Reference in New Issue
Block a user