Changeset 103929


Ignore:
Timestamp:
Mar 10, 2013, 9:57:41 AM (7 years ago)
Author:
kimuraw@…
Message:

ruby/rb-ncurses-ruby: upgrade to 1.3.0, simplify Portfile with ruby.setup extconf.rb

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dports/ruby/rb-ncurses-ruby/Portfile

    r93727 r103929  
    44PortGroup           ruby 1.0
    55
    6 set myname          ncurses-ruby
    7 ruby.setup          ${myname} 1.2.3 fetch
    8 revision            1
     6ruby.setup          ncurses-ruby 1.3.0 extconf.rb {}
     7revision            0
    98categories-append   devel
    109license             LGPL
     
    1918
    2019homepage            http://developer.berlios.de/projects/ncurses-ruby
    21 master_sites        http://download.berlios.de/${myname}/ \
    22                     http://download2.berlios.de/${myname}/
    23 distname            ${myname}-${version}
     20master_sites        http://download.berlios.de/${ruby.module}/ \
     21                    http://download2.berlios.de/${ruby.module}/
    2422use_bzip2           yes
    2523
    26 checksums           md5     e00bc593fc0dbc6e311e3b6836bb5801 \
    27                     sha1    156e6e663fc3ecae9b48da8e1227427e583c489a \
    28                     rmd160  daad8a5044238755c1e79fc2c327e7dfe219733e
     24checksums           md5     e184a0284e72124767bfab03fa340e86 \
     25                    sha1    5aadb31eaa946a276cc7531a4795a878dbcb2220 \
     26                    rmd160  ea8e2f8101215e9251f9a56def570f46d128a196
    2927
    30 depends_lib-append  port:ncurses port:rb-rubygems
    31 
    32 # Do a fake gem-like install by first generating a gem, then install it
    33 
    34 # Use gemspec from pkgsrc
    35 # http://cvsweb.netbsd.org/bsdweb.cgi/pkgsrc/devel/ruby-ncurses/files/gemspec
    36 post-extract {
    37    copy ${filespath}/${myname}.gemspec ${worksrcpath}
    38 }
    39 
    40 patchfiles          extconf.rb.diff
    41 
    42 use_configure       no
    43 
    44 build {
    45    system "cd ${worksrcpath} && ${ruby.gem} build ${myname}.gemspec -- --with-ncurses-include=${prefix}/include/ncurses"
    46 }
    47 
    48 destroot {
    49    # This is basically just copied from the ruby portgroup, with a
    50    # change to the gem location since we just built it
    51    xinstall -d -m 0755 ${destroot}${prefix}/lib/ruby/gems/${ruby.version}
    52    system "cd ${worksrcpath} && ${ruby.gem} install --local --force --install-dir ${destroot}${prefix}/lib/ruby/gems/${ruby.version} ${worksrcpath}/ncurses-${version}.gem -- --with-ncurses-include=${prefix}/include/ncurses"
    53    set binDir ${destroot}${prefix}/lib/ruby/gems/${ruby.version}/bin
    54    if {[file isdirectory $binDir]} {
    55       foreach file [readdir $binDir] {
    56          file copy [file join $binDir $file] ${destroot}${prefix}/bin
    57       }
    58    }
    59    # symlink to the vendor location so software expecting a non-gem
    60    # install can still find it
    61    set rubyarch [exec ${prefix}/bin/ruby -rrbconfig -e "puts Config::CONFIG\['sitearch'\]"]
    62    file mkdir ${destroot}${ruby.lib}/${rubyarch}
    63    set ruby.gemdir ${prefix}/lib/ruby/gems/${ruby.version}/gems
    64    ln -s ${ruby.gemdir}/ncurses-${version}/lib/ncurses.rb ${destroot}${ruby.lib}
    65    ln -s ${ruby.gemdir}/ncurses-${version}/lib/ncurses_bin.bundle \
    66       ${destroot}${ruby.lib}/${rubyarch}
    67 }
     28depends_lib-append  port:ncurses
Note: See TracChangeset for help on using the changeset viewer.