Commit Graph

153 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
7f925b471d Bump to ruby 1.9.2p180, fixing a security vulnerability:
* FileUtils is vulnerable to symlink race attacks

OK jasper@
2011-03-07 18:59:18 +00:00
jeremy
942f36623c Bump to ruby 1.8.7p334, fixing two security vulnerabilities:
* FileUtils is vulnerable to symlink race attacks
* Exception methods can bypass $SAFE
2011-03-07 18:57:38 +00:00
naddy
4cb3e73f03 bump revision for plist changes 4.8 -> 4.9 2011-01-15 01:09:42 +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
8d82ee4e2f Update ruby 1.9 port to 1.9.2p136, only minor bugfixes. A couple of
our patches were accepted upstream.  While here, fix REGRESS_DEPENDS.

OK landry@
2011-01-06 04:04:37 +00:00
jeremy
3d9913e6e5 Update ruby 1.8 port to 1.8.7p330, only minor bugfixes. While here,
fix REGRESS_DEPENDS.

OK landry@
2011-01-06 04:01:52 +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
espie
15196452e1 default db-* for db/v4 is incorrect, set PKGSPEC=db->=4,<5, bump packages
with erroneous depends.
2010-11-26 14:44:27 +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
7b0a3f93b8 Add a PKGSPEC entry to restrict ports depending on lang/ruby/1.9 to
depend on ruby-1.9 and not ruby-1.8.  This PKGSPEC is slightly
different from the previous one used in ruby.port.mk, so all
dependent ports need to be REVISION bumped (which will happen soon).
In addition, since the subpackages depend on the -main package and
also had a slightly different pkgspec, they need to be bumped as well.

In addition, the -main package is also being bumped for the inclusion
of a patch for Addrinfo that fixes a failing IPv6 UDP regression test.

OK landry@
2010-11-24 21:28:04 +00:00
jeremy
25f37c11c5 Add a PKGSPEC entry to restrict ports depending on lang/ruby/1.8 to
depend on ruby-1.8 and not ruby-1.9.  This PKGSPEC is slightly
different from the previous one used in ruby.port.mk, so all
dependent ports need to be REVISION bumped (which will happen soon).
In addition, since the subpackages depend on the -main package and
also had a slightly different pkgspec, they need to be bumped as well.

OK landry@
2010-11-24 21:26:19 +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
espie
5e243a5257 convert WANTLIB on geo/lang 2010-11-07 19:12:42 +00:00
espie
dcdfee948c convert libiconv to new wantlib 2010-11-06 10:18:38 +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
ajacoutot
ff07e285bc Remove USE_X11. 2010-10-24 20:58:58 +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
espie
88dd25abf4 USE_GROFF=Yes 2010-10-18 19:20:41 +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
71ecdc8e96 Modify FileUtils.mkdir_p to behave more like mkdir(1) -p. Instead of
attempting to create all intermediate directories and rescuing failures,
don't attempt to create directories that already exist.  Fixes systrace
warnings when building ruby ports.

ok landry
2010-10-12 15:39:06 +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
3f369fe90e This adds an ugly hack to make gem install --user-install work
for gems with native extensions. Without this, it calls
/usr/bin/install -o root -g bin as a regular user, which fails due
to permission issues. This removes the -o root -g bin, so it can
succeed as a regular user.

This same patch was recently added to devel/ruby-gems, which is
specific to ruby 1.8.  ruby 1.9 ships with ruby-gems, so the
patch needs to be included here as well.

OK landry@
2010-10-06 18:43:11 +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
f19ae70951 Remove files that I checked out with -r HEAD 2010-09-23 22:04:13 +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
jasper
ba9b762f6e Apply a SECURITY FIX from upstream ruby for a WEBrick HTTP server XSS
vulnerability (CVE-2010-0541).

from TAKAHASHI Kaoru
maintainer timed-out
2010-09-14 12:03:42 +00:00
naddy
34837b39ea bump PKGNAME for PLIST changes 4.7 -> 4.8 2010-07-24 23:05:08 +00:00
jcs
f701c7fd45 add a patch to prevent seg faulting when loading compiled modules on
amd64

bump pkgname

ok bernd@
2010-05-03 17:01:33 +00:00
ajacoutot
5985d2ef24 Consistency: remove the 1, 2 or even 3 empty blank lines.
sthen@ agrees
2010-04-15 14:11:01 +00:00
naddy
72b44c5513 bump PKGNAME for PLIST changes 4.6 -> 4.7 2010-01-27 21:43:27 +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
kili
6b51812b24 WANTLIB changes after xcb addition and bump.
For some unknown reason, I forgot to commit lang/*
this morning.
2009-08-10 17:31:07 +00:00
naddy
2b84b064ff bump PKGNAME for PLIST changes 4.5 -> 4.6 2009-06-22 17:00:23 +00:00
bernd
ede46f770e Security update to ruby-1.8.6-p369.
Fixes a denial of service vulnerability in the BigDecimal
standard library of Ruby.

http://www.ruby-lang.org/en/news/2009/06/09/dos-vulnerability-in-bigdecimal/
2009-06-16 09:12:44 +00:00
bernd
03af0b16cd Update to ruby-1.8.6.368.
Including security fixes for CVE-2008-1447 and CVE-2007-1558.

Tested by Jeremy Evans, jcs@, sturm@ and msf@. Thank you!
2009-04-27 10:54:09 +00:00
jakemsr
c1d4cf76d9 use /dev/arandom instead of /dev/urandom. reading from /dev/urandom is
too slow.

ok bernd@
2009-03-23 00:35:44 +00:00
espie
ec94f4e745 zap obsolete spec, replace tk-8.5* with tk->=8.5,<8.6
bump corresponding pkgname
2009-03-09 17:54:21 +00:00
bernd
04529b0584 Bring back the fix for short-named constants.
This previous problems should be gone now.
(ruby svn r18485 and r22679)

Thanks to Jeremy Evans!
2009-03-07 12:30:17 +00:00