TABLE OF CONTENTS


ruby.cygclass

[ Top ] [ Cygclasses ] [ Cygclasses ]

SYNOPSIS

  inherit ruby

DESCRIPTION

Ruby is a general-purpose, object oriented scripting language. Originally developed in Japan and quite popular there, it has a relatively smaller but growing user base in the English-speaking world. The Ruby interpreter supports extensions written in Ruby or C/C++.

This cygclass is primarily meant for building Ruby extension modules.

NOTE

Ruby C modules use the .so extension on all platforms, including Cygwin where .dll is the norm. The standard Ruby build systems will do this correctly, but modules build with other build systems will usually need a patch to force the use of the .so extension. For instance, with automake and libtool:

    foo_la_LDFLAGS = -module -avoid-version -no-undefined -shrext '.so'

or with CMake:

    set_target_properties(foo PROPERTIES PREFIX "" SUFFIX ".so")

INHERITED BY

rubygem.cygclass


RUBY

[ Top ] [ ruby.cygclass ] [ Definitions ]

DESCRIPTION

Absolute path to the Ruby interpreter.


RUBY_VERSION

[ Top ] [ ruby.cygclass ] [ Definitions ]

DESCRIPTION

The version of the Ruby interpreter.

NOTE

Since Ruby 2.1, this changes with every point release. For the API version of Ruby, use ${RUBY_VERSION%.*}.


RUBY_LIB

[ Top ] [ ruby.cygclass ] [ Definitions ]

DESCRIPTION

Path containing the Ruby standard library.

NOTE

Never install third-party extensions into RUBY_LIB; use RUBY_VENDORLIB instead.


RUBY_ARCH

[ Top ] [ ruby.cygclass ] [ Definitions ]

DESCRIPTION

Path containing the Ruby standard C extensions.

NOTE

Never install third-party extensions into RUBY_ARCH; use RUBY_VENDORARCH instead.


RUBY_HEADERDIR

[ Top ] [ ruby.cygclass ] [ Definitions ]

DESCRIPTION

Path containing the Ruby API headers.


RUBY_VENDORLIB

[ Top ] [ ruby.cygclass ] [ Definitions ]

DESCRIPTION

Installation path for third-party Ruby libraries.


RUBY_VENDORARCH

[ Top ] [ ruby.cygclass ] [ Definitions ]

DESCRIPTION

Installation path for third-party Ruby C extensions.


RI_SITEDIR

[ Top ] [ ruby.cygclass ] [ Definitions ]

DESCRIPTION

Installation path for RI docs for third-party Ruby extensions.


LIBRUBY

[ Top ] [ ruby.cygclass ] [ Definitions ]

DESCRIPTION

Link flags for the Ruby C library.


CATEGORY (ruby)

[ Top ] [ ruby.cygclass ] [ Overloads ]

DEFINITION

CATEGORY="Ruby"

NOTE

This is defined only if PN begins with "ruby-".


SUMMARY (ruby)

[ Top ] [ ruby.cygclass ] [ Overloads ]

DEFINITION

SUMMARY="Ruby ${PN#ruby-} module"

NOTE

This is defined only if PN begins with "ruby-".


ruby_compile

[ Top ] [ ruby.cygclass ] [ Compile Functions ]

SYNOPSIS

  cd $B
  ruby_compile

DESCRIPTION

Configures and builds a Ruby extension using one of the supported build systems:

If RDOC_SOURCE is defined, RI docs are then generated.


RDOC_SOURCE

[ Top ] [ ruby_compile ] [ Variables ]

DESCRIPTION

Relative path to the Ruby source files containing RDoc documentation.


ruby_ext_compile

[ Top ] [ ruby.cygclass ] [ Compile Functions ]

SYNOPSIS

  ruby_ext_compile [CONFIGURE_OPTIONS]

DESCRIPTION

Runs extconf.rb to configure the build and generate a Makefile, followed by cygmake to compile.


ruby_install

[ Top ] [ ruby.cygclass ] [ Install Functions ]

SYNOPSIS

  cd $B
  ruby_install

DESCRIPTION

Installs a Ruby extension into $D using one of the supported build systems:

If RDOC_SOURCE is defined, the RI docs generated in ruby_compile are also installed into RI_SITEDIR.


RDOC_MODULE

[ Top ] [ ruby_install ] [ Variables ]

DESCRIPTION

A whitespace-separated list of classes or namespaces whose RI docs should be installed. If RDOC_SOURCE is defined but RDOC_MODULE is not, all generated documentation will be installed; this is often undesirable, as private classes may also be documented.


rubyinto

[ Top ] [ ruby.cygclass ] [ Install Functions ]

SYNOPSIS

  rubyinto SUBDIRECTORY

DESCRIPTION

Subdirectory of RUBY_VENDORLIB or RUBY_VENDORARCH that doruby should install. This is usually unnecessary.


doruby

[ Top ] [ ruby.cygclass ] [ Install Functions ]

SYNOPSIS

  [rubyinto SUBDIRECTORY]
  doruby FILES

DESCRIPTION

Installs Ruby extensions into RUBY_VENDORLIB or RUBY_VENDORARCH, or the subdirectory thereof based on a previous call to rubyinto.


ruby_fix_shebang

[ Top ] [ ruby.cygclass ] [ Install Functions ]

SYNOPSIS

  ruby_fix_shebang SCRIPT [SCRIPT ...]

DESCRIPTION

Fixes the designated interpreter of SCRIPT to RUBY. This would be necessary if the original uses an incorrect path (e.g. /usr/local/bin) or an incorrectly versioned binary. SCRIPT need not be prefixed by $D.


src_compile (ruby)

[ Top ] [ ruby.cygclass ] [ Overloads ]

DEFINITION

src_compile() {
        lndirs
        cd ${B}
        ruby_compile
}

src_install (ruby)

[ Top ] [ ruby.cygclass ] [ Overloads ]

DEFINITION

src_install() {
        cd ${B}
        ruby_install
}