CVSROOT:        /cvs
Module name:    ports
Changes by:     jer...@cvs.openbsd.org  2010/11/08 16:20:43

Modified files:
        lang/ruby      : ruby.port.mk 

Log message:
Major changes to allow the same port directory to build ports for both
ruby 1.8, ruby 1.9, and jruby.

One major change for all ports is that RDoc documentation is no longer
going to be installed by default for gem ports.  For ruby 1.8, it used
a separate documentation file per method, and the file names created
weren't consistent across ruby versions (1.8.6 differed from 1.8.7,
and 1.8.7 differs from 1.9.2 and jruby).  It made reviewing diffs very
painful, and since most ruby developers do not use the documentation
(preferring web documentation), it doesn't make sense to include them.

For most gem ports, a ruby 1.9 version can be built by using
the ruby19 FLAVOR, and a jruby version can be build using the jruby
FLAVOR.  These flavors modify the FULLPKGNAME to use either the
ruby19- or jruby- package stem, so you don't need to worry about
the ruby 1.8 package conflicting.

In most cases, you no longer need the PKGNAME set in the port
Makefile, as the FULLPKGNAME handling will take care of that for you.
Also, for pure ruby gems (without C extensions), PKG_ARCH = * is added
automatically.

Changes to all dependent ports will be committed shortly. For new
ruby ports, you need to make sure that gem dependencies are specified
like this (assuming they depend on the hoe gem):

:${MODRUBY_PKG_PREFIX}-hoe-*:devel/ruby-hoe,${FLAVOR}

MODRUBY_PKG_PREFIX will be ruby for ruby 1.8 ports, ruby19 for ruby
1.9 ports, and jruby for jruby ports.  The ,${FLAVOR} part at the end
makes sure that dependencies use the same version of ruby that
the current port uses.

PLISTs are going to become a lot smaller with this.  However, any
binaries installed by the gem need to have a special string added.
For example, the minitar binary installed by
archivers/ruby-archive-tar-minitar looks like this in the PLIST:

${GEM_BIN}/minitar${GEM_BIN_SUFFIX}

The ${GEM_BIN_SUFFIX} needs to be added manually so the package
works on ruby 1.9, which installs the binaries with a 19 suffix.

GEM_SKIPDEPENDS has been removed and related support will be removed
from devel/ruby-gems.  To modify dependencies inside the gem, the gem
metadata is placed under WRKDIST and can be modified with the standard
patching procedure.

OK landry@

Reply via email to