-.\" $OpenBSD: ruby-module.5,v 1.10 2013/10/06 17:45:04 jeremy Exp $
+.\" $OpenBSD: ruby-module.5,v 1.11 2014/01/14 01:02:46 jeremy Exp $
.\"
.\" Copyright (c) 2008 Marc Espie, Jeremy Evans
.\"
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: October 6 2013 $
+.Dd $Mdocdate: January 14 2014 $
.Dt RUBY-MODULE 5
.Os
.Sh NAME
should be used for pure ruby gems without C extensions.
This adds
.Ev PKG_ARCH
-= * and adds ruby18, ruby19, ruby20, rbx, and jruby
+= * and adds ruby18, ruby19, ruby20, ruby21, rbx, and jruby
.Ev FLAVOR Ns s
to the port, so the same port can build packages for multiple versions of ruby.
.It
to
.Ev LIB_DEPENDS
and
-c, m, and
+the appropriate libraries and
.Ev MODRUBY_WANTLIB
to
.Ev WANTLIB .
-It also adds ruby18, ruby19, ruby20, and rbx
+It also adds ruby18, ruby19, ruby20, ruby21, and rbx
.Ev FLAVOR Ns s
to the port.
If the C extension in the gem requires specific arguments to extconf.rb, set those
.Pp
.Dl category/ruby-foo,${MODRUBY_FLAVOR}
.Pp
-Use of a ruby19, ruby20, rbx, or jruby
+Use of a ruby19, ruby20, ruby21, rbx, or jruby
.Ev FLAVOR
causes the
.Ev FULLPKGNAME
such as ruby18 to use ruby 1.8.
If you want to specify a version for a non-gem/extconf port, set
.Ev MODRUBY_REV
-for the version of ruby you want to use (1.8, 1.9, 2.0, jruby, rbx).
+for the version of ruby you want to use (1.8, 1.9, 2.0, 2.1, jruby, rbx).
.Pp
If you do not want the ports system to automatically set up
.Ev FLAVOR Ns s
.Ev SUBST_VARS
so that the PLISTs will work on multiple ruby versions.
.Pp
-For ruby gem ports that can work on both ruby 1.8 and ruby 1.9, any binary
-file entries in the PLIST should be appended with
+For ruby gem ports that can work on multiple ruby versions or implementations,
+any binary file entries in the PLIST should be appended with
.Ev GEM_BIN_SUFFIX .
-This is because the ruby 1.8 and ruby 1.9 gem binaries are both installed to
+This is because the the gem binaries for multiple ruby versions are all
+installed to
.Pa ${LOCALBASE}/bin ,
-and ruby 1.9 installs the binaries with a 19 suffix.
+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
.Pa ${LOCALBASE}/share ) ,
before the extension so the different
.Ev FLAVOR Ns s
do not conflict.
-make update-plist currently removes
+.Pp
+make update-plist may remove
.Ev GEM_BIN_SUFFIX
and
-.Ev GEM_MAN_SUFFIX ,
-so be careful when updating gem ports with binaries or man pages.
+.Ev 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.
+Additionally, for gem ports with C extensions, make update-plist will add back
+files used by the specific
+.Ev FLAVOR
+you are using (such as files under the extension source directory), which may
+not exist for other
+.Ev FLAVOR Ns s,
+so always manually check the result of make update-plist and manually test that
+you can build the other
+.Ev FLAVOR Ns s
+before committing.
.Sh SEE ALSO
.Xr port-modules 5