# $Id: Portfile 85585 2011-10-14 20:17:51Z ryandesign@macports.org $ PortSystem 1.0 name ruby19 version 1.9.2-p290 revision 2 categories lang ruby maintainers kimuraw openmaintainer platforms darwin description Powerful and clean object-oriented scripting language long_description Ruby is the interpreted scripting language for quick \ and easy object-oriented programming. It has many \ features to process text files and to do system \ management tasks (as in Perl). It is simple, \ straight-forward, extensible, and portable. \ Version 1.9 contains a new VM called YARV, is faster \ and slightly incompatible from version 1.8. homepage http://www.ruby-lang.org/ license {Ruby GPL-2} master_sites ruby:1.9 use_bzip2 yes distname ruby-${version} checksums md5 096758c3e853b839dc980b183227b182 \ rmd160 9722a91445fa81a101a2a8ab5753780c4601cc5a \ sha1 8f25a74f50a10fdd9724e3c74ccd7bae596e198b use_parallel_build yes depends_lib port:libiconv \ port:readline \ port:openssl \ port:zlib \ port:ncurses \ port:libyaml \ port:libffi \ port:gdbm # ruby-1.9.x built with clang or llvm-gcc does not work # see list "MacPorts on Lion (common issues, fixes, and workarounds)" # http://lists.macosforge.org/pipermail/macports-dev/2011-July/015263.html if {${configure.compiler} == "clang" || ${configure.compiler} == "llvm-gcc-4.2"} { configure.compiler gcc-4.2 if {![file executable ${configure.cc}]} { depends_build-append port:apple-gcc42 depends_skip_archcheck apple-gcc42 configure.compiler apple-gcc-4.2 } } configure.args --enable-shared \ --mandir="${prefix}/share/man" \ --enable-pthread \ --without-tk \ --with-opt-dir="${prefix}" \ --program-suffix=1.9 \ --with-rubylibprefix=${prefix}/lib/ruby1.9 # Ignore minor version for archdir, like i686-darwin9. # Port "ruby" does the same. configure.env UNAME_RELEASE=${os.major} post-destroot { foreach type {site vendor} { set libdir ${destroot}${prefix}/lib/ruby1.9/${type}_ruby/1.9.1 xinstall -m 0755 -d ${libdir} xinstall -m 0644 ${filespath}/${type}-specific.rb ${libdir} } foreach subdir [exec find ${libdir} -type d -empty] { destroot.keepdirs-append ${subdir} } # error at activate, for these case sensitive files foreach rdoc {Exception2MessageMapper/fail-i.yaml \ REXML/Parsers/XPathParser/predicate-i.yaml} { if {[file exists ${destroot}${prefix}/share/ri1.9/1.9.1/system/${rdoc}]} { delete ${destroot}${prefix}/share/ri1.9/1.9.1/system/${rdoc} } } } pre-activate { # Bug #3805 [ruby-core:32165] # http://redmine.ruby-lang.org/issues/show/3805 # # the two gems of "rake", contained in ruby-1.9.2 and installed via gem # command, might be installed. # `port activate' fails when the two rake are installed. set rake_dup_gemspec ${prefix}/lib/ruby1.9/gems/1.9.1/specifications/rake-0.8.7.gemspec if {[file exists ${rake_dup_gemspec}]} { delete ${rake_dup_gemspec} } } variant nosuffix description "Don't add the 1.9 program suffix to the executables. Note: that makes the port conflict with ruby (1.8), rb-rubygems, and rb-rake ports." { configure.args-delete --program-suffix=1.9 } variant c_api_docs description "Generate documentation for Ruby C API" { depends_build-append port:doxygen post-build { file mkdir ${workpath}/c_api set doxygen_conf ${name}-doxygen.conf file copy -force ${filespath}/${doxygen_conf} ${workpath} set doxygen_conf_path ${workpath}/${name}-doxygen.conf reinplace "s|%WORKPATH%|${workpath}|" ${doxygen_conf_path} reinplace "s|%WORKSRCPATH%|${worksrcpath}|" ${doxygen_conf_path} system "doxygen ${doxygen_conf_path}" } post-destroot { set api_docs ${destroot}${prefix}/share/doc/${name}-${version}/html/c_api xinstall -m 755 -d ${api_docs} eval xinstall -m 640 [glob ${workpath}/c_api/html/*] ${api_docs} } } variant tk conflicts mactk description "Build using MacPorts Tk" { configure.args-delete --without-tk configure.args-append --with-tk depends_lib-append port:tcl \ port:tk } variant mactk conflicts tk description "Build using Mac OS X Tk Framework" { configure.args-delete --without-tk configure.args-append --enable-tcltk-framework } variant universal { configure.args-append --with-arch=[join ${universal_archs} ,] } livecheck.type regex livecheck.url http://ftp.ruby-lang.org/pub/ruby/1.9/ livecheck.regex ruby-(${version})${extract.suffix}