Commit Graph

44 Commits

Author SHA1 Message Date
jeremy
eb297ee133 Add MODRUBY_HANDLE_FLAVORS variable which can be set to No to not have
the lang/ruby module add FLAVORS automatically for gem and extconf
ports, or to Yes to enable the FLAVORS for non-gem and non-extconf
ports.

Add a MODRUBY_BIN_TESTRB variable containing the appropriate testrb
command for use in regress tests.

OK landry@
2011-03-24 21:26:59 +00:00
jeremy
ee92d991f2 Allow building of gem ext and extconf based ports with jruby,
since jruby 1.6.0 now supports them.  Require at least jruby
1.6.0 when building/running a gem ext or extconf port.

Since jruby no longer bundles RSpec, simplify the
MODRUBY_RSPEC_DEPENDS handling.

OK landry@
2011-03-18 23:04:22 +00:00
jeremy
6fc087d685 Add GEM_MAN_SUFFIX so that gem ports with man pages can avoid
conflicts.  Also, base MODRUBY_PKG_PREFIX on MODRUBY_FLAVOR to
avoid some duplication.

OK landry@
2011-03-14 20:39:20 +00:00
jeremy
022f8719a1 Deal with the rubinius directory changes, and tie rbx FLAVORs to
the currently supported minor version of rubinius.

No longer allow a ruby18 FLAVOR to be used to specify ruby 1.8.
Now, only the empty flavor should be used.

OK landry@
2011-01-06 04:15:46 +00:00
jeremy
9211601fd8 Handle the gem metadata such that if a build fails and you restart
it, it doesn't fail again just because it can't find the gem
metadata.

Also, get rid of the GEM_REL variable, and just setup the GEM_BIN
and GEM_LIB variables separately for each ruby version.

OK landry@
2010-12-02 01:38:40 +00:00
jeremy
d1270995e9 Remove MODRUBY_PKGSPEC, rely on the PKGSPEC entries specified
in lang/ruby/1.*/Makefile.

Also, add the ability to pass CONFIGURE_ARGS to gem install.
These get passed to the extconf.rb scripts that create the
Makefiles for C extensions, and may make it easier to port
gems with C extensions without resorting to patching.

OK landry@
2010-11-24 21:30:36 +00:00
jeremy
3831e7acb0 Allow building of rubinius versions of the ruby gem and extconf ports
using the rbx FLAVOR and the rbx- package prefix.

OK landry@, sthen@
2010-11-19 17:54:37 +00:00
espie
88d20077a4 new depends 2010-11-17 08:05:12 +00:00
jeremy
6170d8763a Remove MODRUBY_BIN_REV from SUBST_VARS, never used.
OK landry@
2010-11-16 21:50:27 +00:00
jeremy
aa826b5062 Fix various minor issues in ruby.port.mk:
* No longer remove ruby-* from PKGNAME when building FULLPKGNAME for
  the gem and extconf ports
* Correctly remove ruby18 FLAVOR
* Use extract/build/install cookies
* Fix installing of certain gems as root without systrace, by working
  around a bug in devel/ruby-gems
* Remove MODRUBY_REV from SUBST_VARS

OK landry@
2010-11-16 18:30:38 +00:00
landry
9f1a53922a quote pattern and only work on files (-type f) in MODRUBY_ADJ_REPLACE.
From Mikolaj Kucharski on ports@, ok sthen@ jeremy@
2010-11-10 09:00:10 +00:00
jeremy
fe64996c4a 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@
2010-11-08 23:20:43 +00:00
jeremy
0e98598fbd Split library spec from MODRUBY_LIB_DEPENDS into MODRUBY_WANTLIB.
Also, if CONFIGURE_STYLE includes ext or extconf, update WANTLIB
and LIB_DEPENDS, and set SHARED_ONLY=Yes.  That configure style
is only used for ruby C extensions, which need those settings.
This cleans up a lot of ruby C extension ports, which will be
committed shortly.

ok landry, phessler, sthen
2010-10-26 21:14:24 +00:00
sthen
d686e298c5 Add MODRUBY_RUNDEP and MODRUBY_BUILDDEP, modelled on python.port.mk.
ok jeremy@
2010-10-24 09:16:13 +00:00
jeremy
63f5f6710a Delete the binaries after installing them into the fake directory but
before copying the gem directory into the fake directory.  Fixes
update-plist adding files that shouldn't be in the resulting packages.

ok landry
2010-10-15 20:24:27 +00:00
jeremy
8a77d5f794 Don't build C extensions inside gems during the fake stage, instead
build them during the build stage and install them during fake.

devel/ruby-gems doesn't have separate build and install commands, as
most gems are pure ruby code and don't need a separate build stage.
When ruby-gems is installing a gem with C extensions, it builds them
during the install.  Since installing is done during the fake stage,
this meant that the extensions were getting built as root.

Previously, this was required, as gem's --user-install option was
broken.  However, since that option has now been fixed, we use
it to install the gem to a temporary location as the current
user during build, and then mv and chown the files during fake.

Thanks to bernd@ for pointing out that the fixed --user-install
option allowed this.

ok landry
2010-10-12 16:03:41 +00:00
jeremy
ea588ec908 Add MODRUBY_RUBY_ADJ and MODRUBY_ADJ_FILES. MODRUBY_RUBY_ADJ is a
perl command that accepts filename arguments and modifies the common
/usr/bin/env ruby shebang to ${RUBY}.  MODRUBY_ADJ_FILES is a short
cut that allows you to set filename patterns and have
MODRUBY_RUBY_ADJ called on all files in ${WRKSRC} that match that
pattern.  It adds a pre-configure action to do so, if a pre-configure
action is not already defined.  If a pre-configure action is already
defined, you can call the replacement command with
${MODRUBY_ADJ_REPLACE}.

ok sthen, landry
2010-10-07 17:48:53 +00:00
jeremy
82143f7987 Remove MASTER_SITES from most ruby gem ports, specify it in ruby.port.mk
All ruby .gem files are now hosted on rubygems.org in the same
directory.  If the ruby gem CONFIGURE_STYLE is used, make the
default MASTER_SITES that directory.

There are still a few uses of MASTER_SITE_RUBYFORGE in the tree, for
some ports that aren't gems, or where the .gem file isn't hosted on
rubygems.org, or where the hashes don't match.  Most of these will be
dealt with in the near future.

OK landry@
2010-09-28 20:12:16 +00:00
jeremy
3a030020ea Split the lang/ruby port into separate ports for ruby 1.8 and ruby
1.9, similar to how the lang/python ports are handled.  ruby 1.8
now installs as ruby18 and ruby 1.9 installs as ruby19.  The
included MESSAGE files for both ports let you know the symlinks to
set up if you want to make that version the default system ruby.

Split port originally started by bernd@, many changes since by me,
help and support from jcs@, landry@, jasper@, and sthen@.

This causes a large amount of fallout in dependent ruby ports,
which will be committed shortly.

OK jcs@, landry@, jasper@, sthen@
2010-09-23 21:58:50 +00:00
bernd
390b1f043c Fix one small buglet in the regress stuff. ok msf@ 2009-08-11 15:28:41 +00:00
msf
9b5e48e67c Add support for several popular ruby regression test suites accessible via
the MODRUBY_REGRESS variable.

discussed with and ok bernd@
2009-08-11 14:30:15 +00:00
msf
4650d35dbf add MODRUBY_BUILD_DEPENDS to stay consistent with other modules 2009-08-11 09:20:23 +00:00
msf
02a92c78ac ruby-gems should be appended to MODRUBY_RUN_DEPENDS, but to RUN_DEPENDS instead
ok bernd@
2009-08-11 07:27:30 +00:00
bernd
c4f3158173 Require ruby-gems-1.3.0 and add --default-source-index to GEM_FLAGS. 2008-09-28 15:47:27 +00:00
steven
007f70e812 add MODRUBY_LIB_DEPENDS.
ok bernd@
2008-09-02 21:08:29 +00:00
landry
cc14671c30 Add lang/ruby to CATEGORIES. All ports using this module will be bumped.
tested in a bulk build and ok bernd@
2008-06-14 23:40:35 +00:00
jcs
d6bc2054d2 pass --verbose to gem to show full configure/build information to
behave like everything else does

ok bernd@
2008-06-10 15:40:44 +00:00
bernd
b2b2bc351a Require a recent ruby-gems version to build gem ports.
Noticed by Paul Irofti. Thanks!
2008-02-08 17:13:15 +00:00
bernd
079fabd16e Fix indentation and remove useless regress stuff comments.
ok sturm@, msf@
2008-01-14 18:39:07 +00:00
bernd
14b016b8e1 Be more specific about the gem version in gem BUILD_DEPENDS to make sure
GEM_SKIPDEPENDS works correctly. (ruby-gems->=0.9.4p2)
2007-11-13 17:45:28 +00:00
bernd
63a5135786 Backout the ugly rev 1.12 hack. It's not needed anymore since we now have
GEM_SKIPDEPENDS.
2007-11-13 17:32:59 +00:00
bernd
e630dc9a9c Use the --skip-dependencies option with 'gem install' if GEM_SKIPDEPENDS
is defined in the port Makefile.

i.e. 'GEM_SKIPDEPENDS= hoe cgi_multipart_eof_fix'

This will install the gem port into the fake area even if the hoe and
cgi_multipart_eof_fix gems aren't installed.

ok jcs@, "sounds reasonable but I haven't really looked at it" msf@
2007-11-13 16:10:37 +00:00
bernd
17064650ea Unpack the gem metadata so we're able to patch it. This will
allow us to remove bogus dependencies from gems.

I need this for an upcoming ruby-mongrel update.

discussed with & ok sturm@
2007-11-05 20:55:03 +00:00
steven
bee72c9882 add MODRUBY_RUN_DEPENDS to help MULTI_PACKAGES
ok msf@
2006-12-01 14:04:06 +00:00
msf
1c166bbf7e remove the default CONFIGURE_STYLE and CONFIGURE_SCRIPT into the new
'ruby extconf' CONFIGURE_STYLE

this allows us to pull ruby.port.mk into fun things like subversion

ok bernd@
2006-11-27 09:36:14 +00:00
msf
8dc6071094 Change to SUBST_VARS+=
discussed and ok bernd@
2006-11-25 10:03:32 +00:00
bernd
5df9d3851a Remove REV and SUB. All ruby ports are using the new variables now. 2006-10-28 21:52:02 +00:00
bernd
c1e377c812 Add code that allows us to patch gem files.
discussed with & ok sturm@
ok for an earlier version msf@
2006-10-18 13:41:36 +00:00
sturm
f40b6dea93 add RUN_DEPENDS on ruby-gems for gems-based ports
bump PKGNAME where necessary

noticed by Ward Wouts <ward at wizeazz.nl> via markus, ok msf
2006-08-23 21:12:24 +00:00
bernd
6275bfb08d Rename REV and SUB variables to MODRUBY_REV and MODRUBY_ARCH. Keep the old
ones around until the dependent ports have been synced.

ok msf@, 'I like it' sturm@
2006-07-14 15:41:21 +00:00
sturm
845cc36920 support for CONFIGURE_STYLE "ruby gem"
with msf's consent
2006-06-11 19:56:31 +00:00
sturm
c48321f2f5 add CONFIGURE_STYLE "ruby setup" and related targets
move LIB_DEPENDS to relevant ports, no PKGNAME bump needed
this is in preparation of a soon to come ruby-gems port

with msf's consent
2006-06-11 18:57:11 +00:00
msf
a4a3f3ef73 - depend on proper library version 2006-03-23 17:15:25 +00:00
xsa
70c60882e0 prepare for new-style MODULES; ok couderc@. 2004-08-09 19:54:20 +00:00