[103924] trunk/dports/lang

kimuraw at macports.org kimuraw at macports.org
Sat Mar 9 21:33:39 PST 2013


Revision: 103924
          https://trac.macports.org/changeset/103924
Author:   kimuraw at macports.org
Date:     2013-03-09 21:33:39 -0800 (Sat, 09 Mar 2013)
Log Message:
-----------
lang/ruby20: new port ruby20 (ruby-2.0.0-p0)

Added Paths:
-----------
    trunk/dports/lang/ruby20/
    trunk/dports/lang/ruby20/Portfile
    trunk/dports/lang/ruby20/files/
    trunk/dports/lang/ruby20/files/patch-configure.diff
    trunk/dports/lang/ruby20/files/patch-ext-tk-extconf.rb.diff
    trunk/dports/lang/ruby20/files/ruby20

Added: trunk/dports/lang/ruby20/Portfile
===================================================================
--- trunk/dports/lang/ruby20/Portfile	                        (rev 0)
+++ trunk/dports/lang/ruby20/Portfile	2013-03-10 05:33:39 UTC (rev 103924)
@@ -0,0 +1,124 @@
+# -*- 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                ruby20
+version             2.0.0-p0
+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.0
+use_bzip2           yes
+distname            ruby-${version}
+
+checksums           md5 895c1c581f8d28e8b3bb02472b2ccf6a \
+                    rmd160 46f12324e8b935a2616f1d8f167936585086ce4e \
+                    sha1 bd61b731d12ff4fd9d57f5d47bd2f9a2c4c007bf \
+                    sha256 c680d392ccc4901c32067576f5b474ee186def2fcd3fcbfa485739168093295f
+use_parallel_build  no
+
+depends_lib         port:readline \
+                    port:openssl \
+                    port:zlib \
+                    port:ncurses \
+                    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}/ruby20
+
+configure.args      --enable-shared \
+                    --disable-install-doc \
+                    --mandir="${prefix}/share/man" \
+                    --enable-pthread \
+                    --without-tk \
+                    --with-opt-dir="${prefix}" \
+                    --program-suffix=2.0 \
+                    --with-rubylibprefix=${prefix}/lib/ruby2.0
+
+# Ignore minor version for archdir, like i686-darwin9.
+# Port "ruby" and "ruby19" does the same.
+configure.env-append UNAME_RELEASE=${os.major}
+
+# configure: fix build error at verconf.h. patch from trunk.
+# ext/tk/extconf.rb: 
+patchfiles          patch-configure.diff \
+                    patch-ext-tk-extconf.rb.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.0/${type}_ruby/2.0.0
+            xinstall -m 0755 -d ${libdir}
+    }
+
+    foreach subdir [exec find ${libdir} -type d -empty] {
+            destroot.keepdirs-append ${subdir}
+    }
+
+    # install destination of commands from port:rb-*
+    xinstall -m 0755 -d ${destroot}${prefix}/libexec/ruby2.0
+    destroot.keepdirs-append ${destroot}${prefix}/libexec/ruby2.0
+
+#    # 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}
+#       }
+#   }
+}
+
+variant doc description "Install rdoc indexes and C API documents" {
+        configure.args-delete   --disable-install-doc
+}
+
+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 conflicts tk description "Build using Mac OS X Tk Framework" {
+        configure.args-delete   --without-tk
+        configure.args-append   --enable-tcltk-framework
+}
+
+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://ftp.ruby-lang.org/pub/ruby/2.0/
+livecheck.regex ruby-(${version})${extract.suffix}
+


Property changes on: trunk/dports/lang/ruby20/Portfile
___________________________________________________________________
Added: svn:keywords
   + Id
Added: svn:eol-style
   + native

Added: trunk/dports/lang/ruby20/files/patch-configure.diff
===================================================================
--- trunk/dports/lang/ruby20/files/patch-configure.diff	                        (rev 0)
+++ trunk/dports/lang/ruby20/files/patch-configure.diff	2013-03-10 05:33:39 UTC (rev 103924)
@@ -0,0 +1,30 @@
+--- configure.orig	2013-03-10 12:37:53.000000000 +0900
++++ configure	2013-03-10 13:00:01.000000000 +0900
+@@ -19098,13 +19098,12 @@
+ }
+ 
+ unexpand_shvar() {
+-    local var=$1 val n v expr quote
++    local var=$1 val n v expr
+     shift
+-    test "$#" == 0 && return
+-    quote='s/${[^${}"]*}/"&"/g'
++    test "$#" -eq 0 && return
+     for n do
+         eval v='"$'$n'"'
+-	v="`echo \"$v\" | sed -e \"$quote\" -e 's/[][$|.\\?*]/\\\\&/g'`"
++	v="`echo \"$v\" | sed -e 's/${[^${}\"]*}/\"&\"/g' -e 's/[][$|.\\?*]/\\\\&/g'`"
+ 	if test -n "$v"; then
+ 	    expr="${expr};s|"'\("[^$"]*\)'"$v|\\1\${$n}\"|g"
+ 	    case "$v" in #(
+@@ -19115,8 +19114,8 @@
+ esac
+ 	fi
+     done
+-    expr="${quote}${expr};"'s/"\(\${[^${}"]*}\)"/\1/g'
+-    eval $var='"`echo \"\\\"${'$var'}\\\"\" | sed \"$expr;s/\\\"\\\"//g;s/^\\\"//;s/\\\"\\\$//\"`"'
++    expr='s/${[^${}"]*}/"&"/g;'"${expr};"'s/"\(\${[^${}"]*}\)"/\1/g'
++    eval $var='"`echo \"\\\"${'$var'}\\\"\" | sed \"$expr;s/\\\"//g\"`"'
+ }
+ 
+ rubylibprefix='${libdir}/${RUBY_BASE_NAME}'

Added: trunk/dports/lang/ruby20/files/patch-ext-tk-extconf.rb.diff
===================================================================
--- trunk/dports/lang/ruby20/files/patch-ext-tk-extconf.rb.diff	                        (rev 0)
+++ trunk/dports/lang/ruby20/files/patch-ext-tk-extconf.rb.diff	2013-03-10 05:33:39 UTC (rev 103924)
@@ -0,0 +1,58 @@
+Index: ext/tk/extconf.rb
+===================================================================
+--- ext/tk/extconf.rb	(revision 39678)
++++ ext/tk/extconf.rb	(working copy)
+@@ -612,7 +612,7 @@
+           $INCFLAGS << " -I" << File.join(File.dirname(File.dirname(file)),"include") if is_win32?
+         else
+           tcllibs = append_library($libs, libname)
+-          tcllibs = "-L#{tcldir.quote} -Wl,-R#{tcldir.quote} " + tcllibs
++          tcllibs = "-L#{tcldir.quote} -Wl,-rpath,#{tcldir.quote} " + tcllibs
+ 
+           # FIX ME: avoid pathname trouble (fail to find) on MinGW.
+           $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32?
+@@ -654,7 +654,7 @@
+         else
+           tklibs = append_library("", libname)
+           #tklibs = append_library("", $1)
+-          tklibs = "-L#{tkdir.quote} -Wl,-R#{tkdir.quote} " + tklibs
++          tklibs = "-L#{tkdir.quote} -Wl,-rpath,#{tkdir.quote} " + tklibs
+ 
+           # FIX ME: avoid pathname trouble (fail to find) on MinGW.
+           $INCFLAGS << " -I" << File.join(File.dirname(tcldir),"include") if is_win32?
+@@ -1123,7 +1123,7 @@
+                   tcllibs = libs_param + " -DSTATIC_BUILD " + fname.quote
+                 else
+                   tcllibs = append_library($libs, lib_w_sufx)
+-                  tcllibs = "-L#{path.quote} -Wl,-R#{path.quote} " + tcllibs
++                  tcllibs = "-L#{path.quote} -Wl,-rpath,#{path.quote} " + tcllibs
+                 end
+                 if try_func(func, tcllibs, ["tcl.h"])
+                   return [true, path, nil, tcllibs, *inc]
+@@ -1262,7 +1262,7 @@
+                   tklibs = libs_param + " -DSTATIC_BUILD " + fname.quote
+                 else
+                   tklibs = append_library($libs, lib_w_sufx)
+-                  tklibs = "-L#{path.quote} -Wl,-R#{path.quote} " + tklibs
++                  tklibs = "-L#{path.quote} -Wl,-rpath,#{path.quote} " + tklibs
+                 end
+                 if try_func(func, tklibs, ["tcl.h", "tk.h"])
+                   return [true, path, nil, tklibs, *inc]
+@@ -1967,7 +1967,7 @@
+ # MacOS X Frameworks?
+ if TkLib_Config["tcltk-framework"]
+   puts("Use MacOS X Frameworks.")
+-  ($LDFLAGS ||= "") << " -L#{TkLib_Config["tcl-build-dir"].quote} -Wl,-R#{TkLib_Config["tcl-build-dir"].quote}" if TkLib_Config["tcl-build-dir"]
++  ($LDFLAGS ||= "") << " -L#{TkLib_Config["tcl-build-dir"].quote} -Wl,-rpath,#{TkLib_Config["tcl-build-dir"].quote}" if TkLib_Config["tcl-build-dir"]
+ 
+   libs = ''
+   if tcl_cfg_dir
+@@ -1993,7 +1993,7 @@
+     end
+   end
+ 
+-  libs << " -L#{TkLib_Config["tk-build-dir"].quote} -Wl,-R#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"]
++  libs << " -L#{TkLib_Config["tk-build-dir"].quote} -Wl,-rpath,#{TkLib_Config["tk-build-dir"].quote}" if TkLib_Config["tk-build-dir"]
+ 
+   if tk_cfg_dir
+     TkConfig_Info['TK_LIBS'] ||= ""

Added: trunk/dports/lang/ruby20/files/ruby20
===================================================================
--- trunk/dports/lang/ruby20/files/ruby20	                        (rev 0)
+++ trunk/dports/lang/ruby20/files/ruby20	2013-03-10 05:33:39 UTC (rev 103924)
@@ -0,0 +1,13 @@
+bin/erb2.0
+bin/gem2.0
+bin/irb2.0
+bin/rake2.0
+bin/rdoc2.0
+bin/ri2.0
+bin/ruby2.0
+bin/testrb2.0
+share/man/man1/erb2.0.1.gz
+share/man/man1/irb2.0.1.gz
+share/man/man1/rake2.0.1.gz
+share/man/man1/ri2.0.1.gz
+share/man/man1/ruby2.0.1.gz
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20130309/0dd484a2/attachment.html>


More information about the macports-changes mailing list