[86855] trunk/dports/math
ryandesign at macports.org
ryandesign at macports.org
Sat Nov 5 13:15:38 PDT 2011
Revision: 86855
http://trac.macports.org/changeset/86855
Author: ryandesign at macports.org
Date: 2011-11-05 13:15:36 -0700 (Sat, 05 Nov 2011)
Log Message:
-----------
R-framework: new port, version 2.13.2; see #30385
Added Paths:
-----------
trunk/dports/math/R-framework/
trunk/dports/math/R-framework/Portfile
Added: trunk/dports/math/R-framework/Portfile
===================================================================
--- trunk/dports/math/R-framework/Portfile (rev 0)
+++ trunk/dports/math/R-framework/Portfile 2011-11-05 20:15:36 UTC (rev 86855)
@@ -0,0 +1,184 @@
+# $Id$
+
+PortSystem 1.0
+
+set major 2
+set minor 13
+set point 2
+
+name R-framework
+conflicts R
+version ${major}.${minor}.${point}
+categories math science
+maintainers epfl.ch:kjell.konis
+license GPL-2 GPL-3
+platforms macosx
+
+description \
+ R is GNU S - an interpreted language for statistical computing
+
+long_description \
+ R is a language and environment for statistical computing and graphics. \
+ R provides a wide variety of statistical (linear and nonlinear modeling, \
+ classical statistical tests, time-series analysis, classification, \
+ clustering, ...) and graphical techniques, and is highly extensible.
+
+homepage http://www.r-project.org/
+
+master_sites http://cran.us.r-project.org/src/base/R-2/ \
+ http://cran.ms.unimelb.edu.au/src/base/R-2/ \
+ http://cran.at.r-project.org/src/base/R-2/ \
+ http://cran.hu.r-project.org/src/base/R-2/ \
+ http://cran.r-project.org/src/base/R-2/
+
+distname R-${version}
+dist_subdir R
+
+checksums rmd160 ea6ea24215c50fcf83c99fd59a676cdc90de30c1 \
+ sha256 a1c8733030636c86efa23f6f22dd673a0a54d0fedcffcc8c8deb03da8f972330
+
+depends_build port:pkgconfig
+
+depends_lib port:llvm-gcc42 \
+ port:readline \
+ port:icu \
+ port:libiconv
+
+universal_variant no
+
+set resources ${frameworks_dir}/R.framework/Versions/${major}.${minor}/Resources
+
+post-patch {
+ reinplace "s|R_HOME|\"${resources}\"|" "${worksrcpath}/src/unix/Rscript.c"
+}
+
+configure.env-append r_arch=${build_arch}
+
+configure.compiler macports-llvm-gcc-4.2
+configure.ldflags-append -L${prefix}/lib/llvm-gcc42 -lgfortran
+
+configure.pre_args --prefix=${frameworks_dir}
+
+configure.args --enable-R-framework \
+ --enable-R-shlib \
+ --enable-BLAS-shlib \
+ --enable-openmp \
+ --with-blas="-framework vecLib" \
+ --with-lapack="-framework vecLib" \
+ --with-readline \
+ --with-aqua \
+ --without-tcltk \
+ --without-cairo \
+ --with-libpng \
+ --without-jpeglib \
+ --without-recommended-packages \
+ --with-ICU \
+ --without-x \
+ --with-included-gettext
+
+variant cairo requires x11 description {Use cairo and pango} {
+ depends_lib-append path:lib/pkgconfig/cairo.pc:cairo \
+ path:lib/pkgconfig/pango.pc:pango \
+ path:lib/pkgconfig/glib-2.0.pc:glib2 \
+ port:freetype \
+ port:fontconfig \
+ port:gettext
+ configure.args-delete --without-cairo
+ configure.args-append --with-cairo
+}
+
+variant recommended description {Install recommended R packages} {
+ configure.args-delete --without-recommended-packages
+ configure.args-append --with-recommended-packages
+}
+
+variant tcltk requires x11 description {Use tcltk} {
+ depends_lib-append port:tcl \
+ port:tk \
+ port:xorg-libXScrnSaver \
+ port:xorg-libXext
+ configure.args-delete --without-tcltk
+ configure.args-append --with-tcltk \
+ --with-tcl-config=${prefix}/lib/tclConfig.sh \
+ --with-tk-config=${prefix}/lib/tkConfig.sh
+}
+
+variant x11 description {
+ depends_lib-append port:xorg-libsm \
+ port:xorg-libice \
+ port:xorg-libX11 \
+ port:xorg-libXt \
+ port:tiff \
+ port:jpeg \
+ port:libpng \
+ port:zlib
+ configure.args-delete --without-x \
+ --without-jpeglib
+ configure.args-append --with-x \
+ --with-jpeglib \
+ --x-include=${prefix}/include/X11 \
+ --x-lib=${prefix}/lib
+}
+
+default_variants +cairo +recommended +tcltk +x11
+
+destroot.destdir prefix=${destroot}${frameworks_dir}
+
+post-destroot {
+ move ${destroot}${frameworks_dir}/lib/pkgconfig/libR.pc ${destroot}${prefix}/lib/pkgconfig/libR.pc
+
+ foreach v { "rhome" "rincludedir" } {
+ reinplace "s|${v}=${destroot}|${v}=|" "${destroot}${prefix}/lib/pkgconfig/libR.pc"
+ }
+
+ foreach dir { "R_HOME_DIR" "R_SHARE_DIR" "R_INCLUDE_DIR" "R_DOC_DIR" } {
+ reinplace "s|${dir}=${destroot}|${dir}=|" "${destroot}${resources}/bin/R"
+ }
+
+ reinplace "s|R_ARCH=/`arch`|R_ARCH=/${build_arch}|" "${destroot}${resources}/bin/R"
+ reinplace "s|-F${destroot}|-F|" "${destroot}${resources}/etc/${build_arch}/Makeconf"
+
+ file delete ${destroot}${resources}/lib/libR.dylib
+ file delete ${destroot}${resources}/lib/libRblas.dylib
+ file delete ${destroot}${resources}/lib/libRlapack.dylib
+
+ foreach dylib [ exec find ${destroot}${frameworks_dir}/R.framework -name "\*.dylib" ] {
+ regsub ":$" ${dylib} "" destroot_dylib_path
+ regsub ${destroot} ${destroot_dylib_path} "" dylib_path
+ system "install_name_tool -id ${dylib_path} ${destroot_dylib_path}"
+ system "install_name_tool -change ${destroot}${resources}/lib/libR.dylib ${resources}/lib/${build_arch}/libR.dylib \
+ ${destroot_dylib_path}"
+ system "install_name_tool -change ${destroot}${resources}/lib/libRblas.dylib ${resources}/lib/${build_arch}/libRblas.dylib \
+ ${destroot_dylib_path}"
+ system "install_name_tool -change ${destroot}${resources}/lib/libRlapack.dylib ${resources}/lib/${build_arch}/libRlapack.dylib \
+ ${destroot_dylib_path}"
+ }
+
+ foreach so [ exec find ${destroot}${frameworks_dir}/R.framework -name "\*.so" ] {
+ regsub ":$" ${so} "" destroot_so_path
+ regsub ${destroot} ${destroot_so_path} "" so_path
+ system "install_name_tool -id ${so_path} ${destroot_so_path}"
+ system "install_name_tool -change ${destroot}${resources}/lib/libR.dylib ${resources}/lib/${build_arch}/libR.dylib \
+ ${destroot_so_path}"
+ system "install_name_tool -change ${destroot}${resources}/lib/libRblas.dylib ${resources}/lib/${build_arch}/libRblas.dylib \
+ ${destroot_so_path}"
+ system "install_name_tool -change ${destroot}${resources}/lib/libRlapack.dylib ${resources}/lib/${build_arch}/libRlapack.dylib \
+ ${destroot_so_path}"
+ }
+
+ system "install_name_tool -change ${destroot}${resources}/lib/libR.dylib ${resources}/lib/${build_arch}/libR.dylib \
+ ${destroot}${resources}/bin/exec/${build_arch}/R"
+ system "install_name_tool -change ${destroot}${resources}/lib/libRblas.dylib ${resources}/lib/${build_arch}/libRblas.dylib \
+ ${destroot}${resources}/bin/exec/${build_arch}/R"
+
+ ln -s ${build_arch}/libR.dylib ${destroot}${resources}/lib/libR.dylib
+ ln -s ${build_arch}/libRblas.dylib ${destroot}${resources}/lib/libRblas.dylib
+ ln -s ${build_arch}/libRlapack.dylib ${destroot}${resources}/lib/libRlapack.dylib
+
+ ln -s ${resources}/bin/R ${destroot}${prefix}/bin/R
+ ln -s ${resources}/bin/Rscript ${destroot}${prefix}/bin/Rscript
+}
+
+livecheck.type regex
+livecheck.url [lindex ${master_sites} 0]
+livecheck.regex >R-(\[0-9.\]+)${extract.suffix}<
Property changes on: trunk/dports/math/R-framework/Portfile
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20111105/c02ccce9/attachment.html>
More information about the macports-changes
mailing list