--- /MacPorts/var/macports/sources/rsync.macports.org/release/tarballs/ports/math/R-framework/Portfile	2013-03-20 21:00:19.000000000 -0700
+++ Portfile	2013-04-09 13:20:54.000000000 -0700
@@ -2,12 +2,12 @@
 
 PortSystem 1.0
 
-set major 2
-set minor 15
-set point 3
+set major 3
+set minor 0
+set point 0
 
 name                        R-framework
-conflicts                   R
+replaced_by                 R
 version                     ${major}.${minor}.${point}
 categories                  math science
 maintainers                 me.com:kjell.konis
@@ -25,218 +25,13 @@
 
 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/
+livecheck.type              none
 
-distname                    R-${version}
-dist_subdir                 R
-
-checksums                   rmd160  d588100f075e3a370a2cd6400e3c61dcc5b7a09e \
-                            sha256  c583a38f8dad3bc012c08116f4ba1eb2182cadfad4b0f8d7bd3cdba24bc255d6
-
-depends_build               port:pkgconfig
-
-depends_lib                 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.pre_args          --prefix=${frameworks_dir}
-
-configure.cflags-append     -DOS_OBJECT_USE_OBJC=0
-
-configure.args              --enable-R-framework \
-                            --enable-R-shlib \
-                            --enable-BLAS-shlib \
-                            --enable-openmp \
-                            --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 accelerate conflicts atlas builtin_lapack description {build using the BLAS and Lapack in Apple's Accelerate framework} {
-    configure.args-append   --with-blas="-framework vecLib" \
-                            --with-lapack="-framework vecLib"
-}
-
-variant atlas conflicts accelerate builtin_lapack description {build using the BLAS and Lapack provided by the atlas port} {
-    #more in post-destroot phase
-    configure.args-append   --without-blas --without-lapack
-}
-
-variant builtin_lapack conflicts accelerate atlas description {build using reference BLAS and Lapack} {
-    configure.args-append   --without-blas --without-lapack
-}
-
-variant debug description {build with debug symbols} {
-    configure.optflags-append -g
-}
-
-variant gcc45 conflicts gcc46 gcc47 description {build with gcc45} {
-    depends_lib-append      port:gcc45
-    configure.compiler      macports-gcc-4.5
-    configure.objc          /usr/bin/gcc
-    configure.env-append    "OBJCXX=${configure.objc}"
+pre-configure {
+    ui_error "Please do not install this port since it has been replaced by 'R'."
+    return -code error
 }
 
-variant gcc46 conflicts gcc45 gcc47 description {build with gcc46} {
-    depends_lib-append      port:gcc46
-    configure.compiler      macports-gcc-4.6
-    configure.objc          /usr/bin/gcc
-    configure.env-append    "OBJCXX=${configure.objc}"
-}
-
-variant gcc47 conflicts gcc45 gcc46 description {build with gcc47} {
-    depends_lib-append      port:gcc47
-    configure.compiler      macports-gcc-4.7
-    configure.objc          /usr/bin/gcc
-    configure.env-append    "OBJCXX=${configure.objc}"
-}
-
-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 +x11
-
-if {![variant_isset accelerate] && ![variant_isset atlas] && ![variant_isset builtin_lapack]} {
-    default_variants-append +accelerate
-}
-
-if {![variant_isset gcc45] && ![variant_isset gcc46] && ![variant_isset gcc47]} {
-    default_variants-append +gcc47
-}
-
-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"
-    reinplace "s|OBJCXX = |OBJCXX = /usr/bin/g++|" "${destroot}${resources}/etc/${build_arch}/Makeconf"
-    reinplace "s|OBJC_LIBS = none |OBJC_LIBS = -lobjc |" "${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
-
-    if {[variant_isset atlas]} {
-        file delete ${destroot}${resources}/lib/${build_arch}/libRblas.dylib
-        file delete ${destroot}${resources}/lib/${build_arch}/libRlapack.dylib
-        ln -s ${prefix}/lib/libtatlas.dylib ${destroot}${resources}/lib/${build_arch}/libRblas.dylib
-        ln -s ${prefix}/lib/libtatlas.dylib ${destroot}${resources}/lib/${build_arch}/libRlapack.dylib
-        ln -s ${prefix}/lib/libtatlas.dylib ${destroot}${resources}/lib/libRblas.dylib
-        ln -s ${prefix}/lib/libtatlas.dylib ${destroot}${resources}/lib/libRlapack.dylib
-    } else {
-        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}<
-
+distfiles
 
 
