# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4 # $Id: Portfile 90062 2012-02-20 15:19:14Z hum@macports.org $ PortSystem 1.0 name mahout version 0.6 categories java math maintainers hum openmaintainer description A scalable machine learning library that supports large data sets long_description Mahout is a scalable machine learning library that implements many \ different approaches to machine learning. \ The project currently contains implementations of algorithms for \ classification, clustering, genetic programming and collaborative \ filtering, all enabled to scale by leveraging the power of Hadoop's \ Map-Reduce (http://hadoop.apache.org) implementation. homepage http://mahout.apache.org/ platforms darwin license Apache-2.0 master_sites apache:${name}/${version} checksums rmd160 ea63eca3179f152d2ee273bb7184fdb083f8084e \ sha256 40b24d436612ca24c704c2a70a9737a88442f72a9dee1292f4815bbf50ab4a25 distname ${name}-distribution-${version} use_bzip2 yes depends_lib port:hadoop use_configure no supported_archs noarch build {} set mahout_home ${prefix}/share/java/${distname} set mahout_log_dir ${prefix}/var/hadoop/log destroot { # Copy the distribution to Mahout home directory. xinstall -m 755 -d ${destroot}${prefix}/share/java copy ${worksrcpath} ${destroot}${prefix}/share/java/ # Read the configuration of Hadoop from 'hadoop-bin'. set f [open ${prefix}/bin/hadoop-bin] set string [read $f] close $f regexp {JAVA_HOME=(\S+)} $string m java_home regexp {HADOOP_HOME=(\S+)} $string m hadoop_home regexp {sudo -E -u (\S+)} $string m hadoopuser # Install an extra script for this port. set mahout_bin ${destroot}${prefix}/bin/mahout-bin xinstall -m 755 ${filespath}/mahout-bin ${mahout_bin} reinplace "s|@java_home@|${java_home}|g" ${mahout_bin} reinplace "s|@hadoop_home@|${hadoop_home}|g" ${mahout_bin} reinplace "s|@mahout_home@|${mahout_home}|g" ${mahout_bin} reinplace "s|@mahout_log_dir@|${mahout_log_dir}|g" ${mahout_bin} reinplace "s|@hadoopuser@|${hadoopuser}|g" ${mahout_bin} } livecheck.type regex livecheck.url http://www.apache.org/dist/mahout/ livecheck.regex >(\[0-9.\]+)\/<