Revision: 115565 https://trac.macports.org/changeset/115565 Author: kimuraw@macports.org Date: 2014-01-05 03:16:13 -0800 (Sun, 05 Jan 2014) Log Message: ----------- lang/ruby21: add New Port ruby21, ruby 2.1.0. Added Paths: ----------- trunk/dports/lang/ruby21/ trunk/dports/lang/ruby21/Portfile trunk/dports/lang/ruby21/files/ trunk/dports/lang/ruby21/files/patch-configure.diff trunk/dports/lang/ruby21/files/ruby21 Added: trunk/dports/lang/ruby21/Portfile =================================================================== --- trunk/dports/lang/ruby21/Portfile (rev 0) +++ trunk/dports/lang/ruby21/Portfile 2014-01-05 11:16:13 UTC (rev 115565) @@ -0,0 +1,122 @@ +# -*- 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$ + +PortSystem 1.0 +PortGroup select 1.0 + +name ruby21 +version 2.1.0 +revision 0 + +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. + +homepage http://www.ruby-lang.org/ +license {Ruby BSD} + +master_sites ruby:2.1 +use_bzip2 yes +distname ruby-${version} + +checksums md5 1546eeb763ac7754365664be763a1e8f \ + rmd160 06d0e58934de093bbbcfd67bd27991c02267b3b4 \ + sha1 34cd835ea03241354cf5676cca8e8db92f7f5654 \ + sha256 1d3f4ad5f619ec15229206b6667586dcec7cc986672c8fbb8558161ecf07e277 +use_parallel_build no + +depends_lib port:readline \ + port:openssl \ + port:zlib \ + port:libyaml \ + port:libffi \ + port:gdbm +depends_run port:ruby_select +depends_build port:pkgconfig +depends_skip_archcheck pkgconfig + +select.group ruby +select.file ${filespath}/ruby21 + +configure.args --enable-shared \ + --disable-install-doc \ + --mandir="${prefix}/share/man" \ + --enable-pthread \ + --without-tk \ + --without-gmp \ + --with-opt-dir="${prefix}" \ + --program-suffix=2.1 \ + --with-rubylibprefix="${prefix}/lib/ruby2.1" + +# Ignore minor version for archdir, like i686-darwin9. +# Port "ruby" and "ruby19" does the same. +configure.env-append UNAME_RELEASE=${os.major} + +# correct handling opt-dir +# https://bugs.ruby-lang.org/issues/9317 +patchfiles patch-configure.diff + +# Add the architecture flag as required +if {[info exists build_arch] && ${build_arch} != ""} { + configure.args-append "--with-arch=${build_arch}" +} + +post-destroot { + foreach type {site vendor} { + set libdir ${destroot}${prefix}/lib/ruby2.1/${type}_ruby/2.1.0 + xinstall -m 0755 -d ${libdir} + } + + foreach subdir [exec find ${libdir} -type d -empty] { + destroot.keepdirs-append ${subdir} + } + + # install destination of commands from port:rb21-* + xinstall -m 0755 -d ${destroot}${prefix}/libexec/ruby2.1 + destroot.keepdirs-append ${destroot}${prefix}/libexec/ruby2.1 +} + +variant doc description "Install rdoc indexes and C API documents" { + configure.args-delete --disable-install-doc +} + +# note: ruby/tk does not support tk-8.6. +# +#variant tk conflicts mactk description "Build using MacPorts Tk" { +# configure.args-delete --without-tk +# configure.args-append --with-tk --disable-tcltk-framework +# depends_lib-append port:tcl \ +# port:tk +#} + +variant mactk description "Build using Mac OS X Tk Framework" { + configure.args-delete --without-tk + configure.args-append --enable-tcltk-framework +} + +variant gmp description "use gmp" { + configure.args-delete --without-gmp + depends_lib-append port:gmp +} + +variant universal { + # use ruby built-in universal mechanism. + configure.args-append --with-arch=[join ${universal_archs} ,] + # clear macports' universal flags + configure.universal_cflags + configure.universal_cppflags + configure.universal_cxxflags + configure.universal_ldflags +} + +livecheck.type regex +livecheck.url http://cache.ruby-lang.org/pub/ruby/2.1/ +livecheck.regex ruby-(${version})${extract.suffix} + Property changes on: trunk/dports/lang/ruby21/Portfile ___________________________________________________________________ Added: svn:keywords + Id Added: svn:eol-style + native Added: trunk/dports/lang/ruby21/files/patch-configure.diff =================================================================== --- trunk/dports/lang/ruby21/files/patch-configure.diff (rev 0) +++ trunk/dports/lang/ruby21/files/patch-configure.diff 2014-01-05 11:16:13 UTC (rev 115565) @@ -0,0 +1,11 @@ +--- configure.orig 2013-12-26 00:25:39.000000000 +0900 ++++ configure 2014-01-01 17:09:58.000000000 +0900 +@@ -8045,6 +8045,8 @@ + withval=$with_opt_dir; + val=`echo "$PATH_SEPARATOR$withval" | sed "s|$PATH_SEPARATOR\([^$PATH_SEPARATOR]*\)| -I\1/include|g;s/^ //"` + CPPFLAGS="$CPPFLAGS $val" ++ RPATHFLAG="" ++ LIBPATHFLAG=" -L%s" + val=`IFS="$PATH_SEPARATOR" + for dir in $withval; do + echo x ${LIBPATHFLAG} ${RPATHFLAG} | Added: trunk/dports/lang/ruby21/files/ruby21 =================================================================== --- trunk/dports/lang/ruby21/files/ruby21 (rev 0) +++ trunk/dports/lang/ruby21/files/ruby21 2014-01-05 11:16:13 UTC (rev 115565) @@ -0,0 +1,13 @@ +bin/erb2.1 +bin/gem2.1 +bin/irb2.1 +bin/rake2.1 +bin/rdoc2.1 +bin/ri2.1 +bin/ruby2.1 +bin/testrb2.1 +share/man/man1/erb2.1.1.gz +share/man/man1/irb2.1.1.gz +share/man/man1/rake2.1.1.gz +share/man/man1/ri2.1.1.gz +share/man/man1/ruby2.1.1.gz