unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (OpenBSD-5.7)
Page:
Section:
Apropos / Subsearch:
optional field

RUBY-MODULE(5)              BSD File Formats Manual             RUBY-MODULE(5)

NAME
     ruby-module -- lang/ruby port module

DESCRIPTION
     This manual page documents the behavior of setting MODULE=lang/ruby in
     the ports(7) tree.

     Sets MODRUBY_REV, RUBY, RAKE, RSPEC, MODRUBY_BIN_TESTRB,
     MODRUBY_BIN_RSPEC, MODRUBY_WANTLIB, MODRUBY_RUN_DEPENDS,
     MODRUBY_LIB_DEPENDS, MODRUBY_BUILD_DEPENDS, MODRUBY_ICONV_DEPENDS,
     MODRUBY_RAKE_DEPENDS, MODRUBY_RSPEC_DEPENDS, MODRUBY_RSPEC3_DEPENDS,
     MODRUBY_RUBY_ADJ, MODRUBY_ADJ_FILES, MODRUBY_LIBDIR, MODRUBY_DOCDIR,
     MODRUBY_SITEARCHDIR, MODRUBY_SITEDIR, MODRUBY_EXAMPLEDIR, MODRUBY_ARCH,
     MODRUBY_LIBREV, MODRUBY_BINREV, MODRUBY_HANDLE_FLAVORS,
     MODRUBY_PKG_PREFIX, MODRUBY_FLAVOR, MODRUBY_TEST, MODRUBY_TEST_TARGET,
     MODRUBY_TEST_DIR, MODRUBY_TEST_ENV, MODRUBY_BUILD_TARGET,
     MODRUBY_INSTALL_TARGET, MODRUBY_EXTRACT_TARGET, GEM, GEM_BIN, GEM_LIB,
     GEM_BASE_LIB, GEM_ABS_PATH, GEM_BASE_BIN, GEM_BIN_SUFFIX, GEM_MAN_SUFFIX,
     and GEM_FLAGS.

     Appends to CATEGORIES and SUBST_VARS.  Appends to BUILD_DEPENDS unless
     MODRUBY_BUILDDEP is set to No or NO_BUILD is set to Yes.  Appends to
     RUN_DEPENDS unless MODRUBY_RUNDEP is set to No.

     MODRUBY_ICONV_DEPENDS is set to the dependency line for the iconv port
     for the version of ruby in use.  MODRUBY_RAKE_DEPENDS is set to the
     dependency line for the rake port for the version of ruby in use.
     MODRUBY_RSPEC_DEPENDS is set to the dependency line for the rspec 1 port
     for the version of ruby in use.  MODRUBY_RSPEC3_DEPENDS is set to the
     dependency line for the rspec 3 port for the version of ruby in use.
     RUBY, RAKE, and MODRUBY_BIN_TESTRB are the path to the ruby, rake, and
     testrb binaries for the related ruby implementation.  RSPEC and
     MODRUBY_BIN_RSPEC are the path to the spec (rspec 1) and rspec (rspec 2
     and 3) binaries for the related ruby implementation.

     MODRUBY_RUBY_ADJ is a command that takes filename arguments and replaces
     the /usr/bin/env ruby shebang lines with RUBY.  MODRUBY_ADJ_FILES is a
     list of filename patterns that will automatically have MODRUBY_RUBY_ADJ
     called on them during pre-configure.

     Creates a do-test target if MODRUBY_TEST is used and one is not already
     defined.  MODRUBY_TEST can be set to ruby, rake, rspec, rspec3, or testrb
     to choose the appropriate binary to run the regress tests.
     MODRUBY_TEST_ENV can be used to set environment variables for the regress
     tests.  MODRUBY_TEST_DIR can be used to set the directory in which to
     execute the regress tests, it defaults to WRKSRC.  MODRUBY_TEST_TARGET
     sets the argument to the regress test program.

     Supports additional CONFIGURE_STYLEs, and setting specific
     CONFIGURE_STYLEs modifies some additional parameters:

     o   The "ruby gem" CONFIGURE_STYLE should be used for pure ruby gems
         without C extensions.  This adds PKG_ARCH = * and adds ruby18,
         ruby19, ruby20, ruby21, rbx, and jruby FLAVORs to the port, so the
         same port can build packages for multiple versions of ruby.

     o   The "ruby gem ext" CONFIGURE_STYLE should be used for ruby gems with
         C extensions.  This adds SHARED_ONLY=Yes and adds MODRUBY_LIB_DEPENDS
         to LIB_DEPENDS and the appropriate libraries and MODRUBY_WANTLIB to
         WANTLIB.  It also adds ruby18, ruby19, ruby20, ruby21, and rbx
         FLAVORs to the port.  If the C extension in the gem requires specific
         arguments to extconf.rb, set those via CONFIGURE_ARGS.

     o   The "ruby extconf" CONFIGURE_STYLE is similar to the "ruby gem ext"
         CONFIGURE_STYLE, except that it is used when the package is distrib-
         uted with an extconf.rb file and not as a ruby gem.

     To ensure that dependencies use the same ruby implementation as the cur-
     rent port, all ruby gem/extconf dependencies specified in the port should
     use this format:

           category/ruby-foo,${MODRUBY_FLAVOR}

     Use of a ruby19, ruby20, ruby21, rbx, or jruby FLAVOR causes the
     FULLPKGNAME to use the FLAVOR instead of ruby as the package prefix.
     Specifying MODRUBY_FLAVOR is necessary so that if a ruby 1.9 package is
     being built for the current port, it depends on the ruby 1.9 package of
     the dependencies.

     The ports system defaults to using ruby 2.0 if the version of ruby is not
     specified.  If you want to specify a version for a gem/extconf port, use
     a specific FLAVOR, such as ruby18 to use ruby 1.8.  If you want to spec-
     ify a version for a non-gem/extconf port, set MODRUBY_REV for the version
     of ruby you want to use (1.8, 1.9, 2.0, 2.1, jruby, rbx).

     If you do not want the ports system to automatically set up FLAVORs when
     using a gem/extconf port, set MODRUBY_HANDLE_FLAVORS to No.  Similarly,
     if you want the ports system to automatically set up FLAVORs when using a
     non-gem/extconf port, set MODRUBY_HANDLE_FLAVORS to Yes.  When
     MODRUBY_HANDLE_FLAVORS is Yes, the ports system automatically adds the
     appropriate prefix to the FULLPKGNAME (e.g. ruby- for ruby 1.8, ruby19-
     for ruby 1.9).  Additionally, it adds GEM_BIN_SUFFIX and GEM_MAN_SUFFIX
     to SUBST_VARS so that the PLISTs will work on multiple ruby versions.

     For ruby gem ports that can work on multiple ruby versions or implementa-
     tions, any binary file entries in the PLIST should be appended with
     GEM_BIN_SUFFIX.  This is because the gem binaries for multiple ruby ver-
     sions are all installed to ${LOCALBASE}/bin, and ruby 1.9+ installs the
     binaries with a suffix.  Any man pages and other files that would be
     installed to locations not specific to a ruby implementation (such as
     under ${LOCALBASE}/share), should use GEM_MAN_SUFFIX before the extension
     so the different FLAVORs do not conflict.

     make update-plist may remove GEM_BIN_SUFFIX and GEM_MAN_SUFFIX from the
     PLIST, or use them in inappropriate places where they shouldn't be used,
     so be careful when updating gem ports with binaries or man pages.  Addi-
     tionally, for gem ports with C extensions, make update-plist will add
     back files used by the specific FLAVOR you are using (such as files under
     the extension source directory), which may not exist for other FLAVORs,
     so always manually check the result of make update-plist and manually
     test that you can build the other FLAVORs before committing.

SEE ALSO
     port-modules(5)

BSD                             March 23, 2017                             BSD