You are not logged in.
Pages: 1
Hi,
I would like to have R the statistical computing language added to AL.
The source files can be downloaded from
http://cran.r-project.org/sources.html
Cheers
arch_newb
Offline
Offline
i have tried this before ... you need gcc with f77 enabled :-(
The impossible missions are the only ones which succeed.
Offline
# Contributor: Damir Perisa <damir.perisa@bluewin.ch>
pkgname=r
ownname=R
pkgver=1.9.0
pkgrel=1
pkgdesc="R is 'GNU S', a freely available language and environment for statistical computing and graphics which provides a wide variety of statistical and graphical techniques: linear and nonlinear modelling, statistical tests, time series analysis, classification, clustering, etc."
url="http://stat.ethz.ch/CRAN/"
source=($url/src/base/$ownname-$pkgver.tgz)
depends=('gcc' 'make')
license="GPL"
md5sums=('79ae9d20a7bed94d7c92504c8c130310')
build() {
cd $startdir/src/$ownname-$pkgver
./configure --prefix=/usr
make || return 1
make prefix=$startdir/pkg/usr install
#making docs:
make pdf || return 1
make prefix=$startdir/pkg/usr install-pdf
}
The impossible missions are the only ones which succeed.
Offline
The impossible missions are the only ones which succeed.
Offline
oh yes. I just came to post that it needs fortran. but I saw you here
btw plz add [like I did]
make pdf || return 1
make prefix=$startdir/pkg/usr install-pdf
pdf documentation NEVER harmed anyone
oh some more:
md5sums=('79ae9d20a7bed94d7c92504c8c130310')
depends=(gcc make) //well obvius
license="GPL"
Offline
oh yes. I just came to post that it needs fortran. but I saw you here
btw plz add [like I did]
make pdf || return 1
make prefix=$startdir/pkg/usr install-pdf
pdf documentation NEVER harmed anyone
oh some more:
md5sums=('79ae9d20a7bed94d7c92504c8c130310')
depends=(gcc make) //well obvius
license="GPL"
thanx for the extensions ... this PKGBUILD is about a year old and originally on version 1.7.1 of R ... i just changed the version but left the other things as-is ... great that you extended them
additionally i need to say: i tried to compile R with F and the Intel compiler of fortran ... without success --- it needs either the f77 provided in gcc if you compile it with this language or g95 what is too experimental (R crashes/segfaults often because of this)
the only way i see is to enable f77 in gcc
any idea how to make a gcc-fortran pkg as adddion for gcc? i tried to compile first gcc without f77, then with f77 enabled and then take the diff for a pkg, but somehow did not success
The impossible missions are the only ones which succeed.
Offline
I built R using f2c. It has no build system so is a pain in the ass so I'll post the PKGBUILD when I get to work to save everyone the trouble.
For the R PKGBUILD I needed to modify the R_HOME_DIR path in the R script. Not sure if you need to as well...
cya
Offline
Another joy besides no proper build system for f2c is that it is "versionless". I'm going by the date in the changelog. Thank god for MD5s.
# Contributor: K. Piche <kpiche@rogers.com>
pkgname=f2c
pkgver=2003Oct25
pkgrel=1
pkgdesc="FORTRAN to C converter"
url=(http://www.netlib.org/f2c/index.html)
makedepends=('bison')
source=(
ftp://netlib.bell-labs.com:21/netlib/f2c/src.tar
http://www.netlib.org/f2c/libf2c.zip
)
md5sums=('ecdc113b5ace0e341f40f96456b9a18b' '011f3715b92cad2e9ee7193e04aaac90')
build() {
cd $startdir/src/src
gunzip -f *.gz || return 1
cp makefile.u Makefile
make || return 1
mkdir -p $startdir/pkg/usr/bin
cp f2c $startdir/pkg/usr/bin
mkdir -p $startdir/pkg/usr/man/man1
cp f2c.1 $startdir/pkg/usr/man/man1
cd $startdir/src/libf2c
cp makefile.u Makefile
make hadd || return 1
make || return 1
mkdir -p $startdir/pkg/usr/include
cp f2c.h $startdir/pkg/usr/include
mkdir -p $startdir/pkg/usr/lib
cp libf2c.a $startdir/pkg/usr/lib
}
Here's my R - probably like everyone else's. I didn't bother with the PDFs since the HTML docs were built anyways.
# Contributor: K. Piche <kpiche@rogers.com>
pkgname=R
pkgver=1.9.0
pkgrel=1
pkgdesc="R is a language and environment for statistical computing and graphics"url=(http://www.r-project.org/)
depends=('bzip2' 'f2c' 'libpng' 'libjpeg' 'ncurses' 'pcre' 'readline' 'zlib')
makedepends=('perl')
source=(http://cran.r-project.org/src/base/$pkgname-$pkgver.tgz
R-1.9.0.patch)
md5sums=('79ae9d20a7bed94d7c92504c8c130310' 'aa72cba69d35bab9e384cc84453dc776')
build() {
cd $startdir/src/$pkgname-$pkgver
patch -Np0 -i ../R-1.9.0.patch
./configure --prefix=/usr --with-x --with-zlib --with-bzlib --with-pcre
make || return 1
make prefix=$startdir/pkg/usr install
# Fixup R wrapper scripts.
sed -i -e 's@^R_HOME_DIR=.*$@R_HOME_DIR=/usr/lib/R@' $startdir/pkg/usr/bin/R
rm $startdir/pkg/usr/lib/R/bin/R
cd $startdir/pkg/usr/lib/R/bin
ln -s ../../../bin/R
}
The '--with-zlib ...' makes it link to the local libs and not compile its own bundled versions. The patch is required for the new X11.
--- src/modules/X11/dataentry.c 2004-04-29 03:24:21.000000000 -0400
+++ src/modules/X11/dataentry.c.new 2004-04-29 03:27:02.000000000 -0400
@@ -26,7 +26,7 @@
#include <stdlib.h>
/* don't use X11 function prototypes (which tend to ...): */
-#define NeedFunctionPrototypes 0
+#define NeedFunctionPrototypes 1
#include <X11/X.h>
#include <X11/Xlib.h>
#include <X11/Xutil.h>
I've built both and R works. Crank 'er up and try "demo(graphics)". HTH
Offline
kpiche can you provide the 2 pkgs that you built.
or dp will you do this or should I?
so we can plz arch_newb
Offline
i added f2c to extra because it is needed by all things that need fortran
the R i think should go first to staging
(mainly because i run till now 1.7.1 on my machine and dont know 1.9.0 that good to be absolutely sure it works perfectly)
The impossible missions are the only ones which succeed.
Offline
Whoops! Can you remove them from incoming? :oops: Thanks!
Offline
Hi Guys,
thanks for all of ur help! I have read the posts and being a newb, I am still a little confused as to the status of R 1.9.0 . Is there a package or do I have to use one of the posted scripts to compile it (and if so which script?)? It sounds like I need to to compile R with gcc which has f77 enabled. I read the info on the links but I and not sure were I add the
--enable-languages=c,c++,f77,objc
Thanks again for the help.
arch_newb
Offline
Hi Guys,
thanks for all of ur help! I have read the posts and being a newb, I am still a little confused as to the status of R 1.9.0 . Is there a package or do I have to use one of the posted scripts to compile it? If I need to compile it does gcc need to see f77 (and if so how) or is it enough to have f77 installed?
Thanks again for the help.
Peter
f77 do not exist as a pkg - it is a language you can activate while making gcc
instead of f77, f2c is available (thanx to kpiche) and i added it to extra
i'm working on r to make it run with the pkgs in extra - it is not yet available in the repos (as i have some trouble compiling it)
The impossible missions are the only ones which succeed.
Offline
Hi db,
thanks for the reply. I will wait for ur updated.
cheers
arch_newb
Offline
Hi db,
thanks for the reply. I will wait for ur updated.
cheers
arch_newb
i'll work on it this afternoon and then will upload it to extra ... just want to make sure everything works ok - mainly because it is a big pkg and my upload-speed is not that fast (better check 2 times and upload once instead of uploading 2 times)
EDIT:
Warning message:
X11 used font size 8 when 7 was requested
i really like R :-)
ok, it's compiled the last time, and i run namcap a last time over it to check if the deps are still uptodate - then it will start uploading - 13MB ~= 2-3hours + 15min db-update - try getting it in 4 hours
The impossible missions are the only ones which succeed.
Offline
r is in extra (i uploaded it form the university)
The impossible missions are the only ones which succeed.
Offline
r is in extra (i uploaded it form the university)
Thanks dp.
I will try to install it tonight. Ur help has been great.
have a good weekend
Cheers
arch_newb
Offline
dp wrote:r is in extra (i uploaded it form the university)
Thanks dp.
I will try to install it tonight. Ur help has been great.
have a good weekend
Cheers
arch_newb
you're welcome - and besides: the heaviest part was to find a fortran-solution for archlinux (without messing with gcc): thanx kpiche for this a lot - great job!
The impossible missions are the only ones which succeed.
Offline
Glad I could help.
Offline
Pages: 1