Commit graph

77 commits

Author SHA1 Message Date
minskim
1d65de3ca5 Fix a typo. Reported by Filip Hajny. 2009-09-25 16:09:00 +00:00
minskim
a4b35bb189 Update rubygems to 1.3.5.
Changes:
* Fix use of prerelease gems.
* Gem.bin_path no longer escapes path with spaces. Bug #25935 and #26458.
* Bulk index update is no longer supported (the code currently
  remains, but not the tests)
2009-07-24 06:38:53 +00:00
joerg
59d47660a0 Fix a number of GENERATE_PLIST entries to always have a terminating ; 2009-06-16 15:25:31 +00:00
joerg
76039544d1 Remove @dirrm related logic. 2009-06-14 22:57:58 +00:00
minskim
9fbecca39e Do not add @dirrm to automatically-generated PLIST. 2009-06-14 22:34:19 +00:00
minskim
929397ec0a Remove all dirrm-related entries from PRINT_PLIST_AWK, because print-PLIST
no longer generates those.
2009-06-14 18:12:48 +00:00
joerg
62d1ba2bac Remove @dirrm entries from PLISTs 2009-06-14 18:03:28 +00:00
minskim
463618a6f2 Skip "@dirrm lib/ruby" in PRINT_PLIST for packages including rubygems.mk. 2009-06-14 17:55:59 +00:00
minskim
888f200320 Test variables before using them. Several variables in
Gem::Specification can be nil for old gemspec.

Bump PKGREVISION.
2009-06-12 23:02:57 +00:00
minskim
ba5c5dc0b8 Update rubygems to 1.3.4.
New features since 1.3.1:
* RubyGems now loads plugins from rubygems_plugin.rb in installed gems.
This can be used to add commands (See Gem::CommandManager) or add
install/uninstall hooks (See Gem::Installer and Gem::Uninstaller).
* Gem::Version now understands prerelease versions using letters. (eg.
'1.2.1.b') Thanks to Josh Susser, Alex Vollmer and Phil Hagelberg.
* RubyGems now includes a Rake task for creating gems which replaces rake's
Rake::GemPackageTask. See Gem::PackageTask.
* Gem::find_files now returns paths in $LOAD_PATH.
* Added Gem::promote_load_path for use with Gem::find_files
* Added Gem::bin_path to make finding executables easier. Patch #24114 by
James Tucker.
* Various improvements to build arguments for installing gems.
* `gem contents` added --all and --no-prefix.
* Gem::Specification
* #validate strips directories and errors on not-files.
* #description no longer removes newlines.
* #name must be a String.
* FIXME and TODO are no longer allowed in various fields.
* Added support for a license attribute. Feature #11041 (partial).
* Removed Gem::Specification::list, too much process growth. Bug #23668 by
Steve Purcell.
* `gem generate_index`
* Can now generate an RSS feed.
* Modern indicies can now be updated incrementally.
* Legacy indicies can be updated separately from modern.
* `gem server` allows port names (from /etc/services) with --port.
* `gem server` now has search that jumps to RDoc. Patch #22959 by Vladimir
Dobriakov.
* `gem spec` can retrieve single fields from a spec (like `gem spec rake
authors`).
* Gem::Specification#has_rdoc= is deprecated and ignored (defaults to true)
* RDoc is now generated regardless of Gem::Specification#has_rdoc?
2009-06-10 21:44:30 +00:00
minskim
35e19d3f45 Update rubygems to 1.3.1.
New features since 1.2.0:
* RubyGems doesn't print LOCAL/REMOTE titles for `gem query` and friends if
  stdout is not a TTY, except with --both.
* Added Gem.find_files, allows a gem to discover features provided by other
  gems.
* Added pre/post (un)install hooks for packagers of RubyGems.  (Not for gems
  themselves).
* RubyGems now installs gems into ~/.gem if GEM_HOME is not writable.  Use
  --no-user-install command-line switch to disable this behavior.
* Fetching specs for update now uses If-Modified-Since requests.
* RubyGems now updates the ri cache when the rdoc gem is installed and
  documentation is generated.
2009-04-07 07:35:44 +00:00
taca
8de24d4f76 Update rubygems pacakge to 1.2.0.
Release 1.2.0 adds new features and fixes some bugs.

New features:

* RubyGems no longer performs bulk updates and instead only fetches the gemspec
  files it needs.  Alternate sources will need to upgrade to RubyGems 1.2 to
  allow RubyGems to take advantage of the new metadata updater.  If a pre 1.2
  remote source is in the sources list, RubyGems will revert to the bulk update
  code for compatibility.
* RubyGems now has runtime and development dependency types.  Use
  #add_development_dependency and #add_runtime_dependency.  All typeless
  dependencies are considered to be runtime dependencies.
* RubyGems will now require rubygems/defaults/operating_system.rb and
  rubygems/defaults/#{RBX_ENGINE}.rb if they exist.  This allows packagers and
  ruby implementers to add custom behavior to RubyGems via these files.  (If
  the RubyGems API is insufficient, please suggest improvements via the
  RubyGems list.)
* /etc/gemrc (and windows equivalent) for global settings
* setup.rb now handles --vendor and --destdir for packagers
* `gem stale` command that lists gems by last access time

Bugs Fixed:

* File modes from gems are now honored, patch #19737
* Marshal Gem::Specification objects from the future can now be loaded.
* A trailing / is now added to remote sources when missing, bug #20134
* Gems with legacy platforms will now be correctly uninstalled, patch #19877
* `gem install --no-wrappers` followed by `gem install --wrappers` no longer
  overwrites executables
* `gem pristine` now forces reinstallation of gems, bug #20387
* RubyGems gracefully handles ^C while loading .gemspec files from disk, bug
  #20523
* Paths are expanded in more places, bug #19317, bug #19896
* Gem::DependencyInstaller resets installed gems every install, bug #19444
* Gem.default_path is now honored if GEM_PATH is not set, patch #19502

Other Changes Include:

* setup.rb
  * stub files created by RubyGems 0.7.x and older are no longer removed.  When
    upgrading from these ancient versions, upgrade to 1.1.x first to clean up
    stubs.
  * RDoc is no longer required until necessary, patch #20414
* `gem server`
  * Now completely matches the output of `gem generate_index` and
    has correct content types
  * Refreshes from source directories for every hit.  The server will no longer
    need to be restarted after installing gems.
* `gem query --details` and friends now display author, homepage, rubyforge url
  and installed location
* `gem install` without -i no longer reinstalls dependencies if they are in
  GEM_PATH but not in GEM_HOME
* Gem::RemoteFetcher now performs persistent connections for HEAD requests,
  bug #7973
2008-09-15 08:43:44 +00:00
taca
e45a919f8f Replace shbang path of files under bin directory. 2008-09-15 08:42:37 +00:00
minskim
c55f17adb0 Move targets requiring the root privilege to the install stage.
This fixes PR 39333.

Thanks to taca@ for testing.
2008-09-14 17:34:28 +00:00
taca
f7ceb84d39 - Switch to use vendor_dir with Ruby 1.8.7.
Bump PKGREVISION.
2008-06-19 14:52:11 +00:00
joerg
a8a3c01339 Explicitly add pax dependency in those Makefiles that use it (or have
patches to add it). Drop pax from the default USE_TOOLS list.
Make bsdtar the default for those places that wanted gtar to extract
long links etc, as bsdtar can be built of the tree.
2008-05-25 21:42:20 +00:00
jlam
e9d673cb77 Update misc/rubygems to 1.1.1. Changes from version 1.1.0 include:
* Gem.prefix now returns non-nil only when RubyGems was installed outside
  sitelibdir or libdir.
* The `gem server` gem list now correctly links to gem details.
* `gem update --system` now passes --no-format-executable to setup.rb.
* Gem::SourceIndex#refresh! now works with multiple gem repositories.
* Downloaded gems now go into --install-dir's cache directory.
* Various fixes to downloading gem metadata.
* `gem install --force` now ignores network errors too.
* `gem pristine` now rebuilds extensions.
* `gem update --system` now works on virgin Apple ruby.
* Gem::RemoteFetcher handles Errno::ECONNABORTED.
2008-04-13 06:01:59 +00:00
jlam
0d212600d5 Set up the shell environment before calling ``gem'' during the extract
phase.  Also set TZ to null to prevent timezone differences from
affecting the printing of the "date" field during the extraction of
the gemspec file.
2008-03-31 15:47:44 +00:00
jlam
725605277e Update rubygems to 1.1.0. Changes from version 1.0.1 include:
+ Port patches to allow gems to be installed into an "installion root"
  from 1.0.1nb2.

+ Rename the --build-root option to --install-root, which more accurately
  reflects the purpose of the option.

+ Update rubygem.mk to work with rubygems-1.1.0.
  + Require 1.1.0 as the minimum rubygems version for the build.
  + Remove GEM_FORMAT and special code to extract the gemspec file
    from a gem archive -- `gem spec' can now do it correctly by itself.
  + Rename various *buildroot* targets to *install-root* to match the
    name of the `gem' option.

* RubyGems now uses persistent connections on index updates and only
  updates from a latest index by default, cutting candidate gems for
  updates to roughly 1/4 (at present).  Index updates are much faster
  now.

* `gem list -r` may only show the latest version of a gem, add --all to
  see all gems.

* `gem spec` now extracts specifications from .gem files.

* `gem query --installed` to aid automation of checking for gems.

This update has been tested with the 3 packages in pkgsrc that install
using the ``gem'' command:

	devel/rubyforge
	misc/ruby-gem_plugin
	www/mongrel

This update has also been tested with the 129 packages in my local
tree that install using the ``gem'' command.
2008-03-31 15:40:43 +00:00
jlam
298e2a2343 Use the correct variable name (GEM_CACHEDIR, not GEM_CACHE). 2008-03-27 05:34:31 +00:00
jlam
fa183dde4f The ``gem'' command doesn't exit with an error if the install fails.
Manually check that the installation actually succeeds or exit with an
error so that the pkgsrc make process halts with the proper error code.

Suggestion for change by <seb> in private email.
2008-03-27 05:29:42 +00:00
jlam
7ae7bbbbfe Restore default setting of PKG_DESTDIR_SUPPORT removed in revision
1.29.  This does the right thing automatically for most gems, and
packages that need PKG_DESTDIR_SUPPORT set earlier can set it manually
themselves.
2008-03-24 18:48:54 +00:00
jlam
c8daa62dfa Add default value for GEM_FORMAT missing from previous commit. 2008-03-22 01:37:52 +00:00
jlam
24544808be Update description to be less rambling and more consise. 2008-03-21 22:23:51 +00:00
jlam
b5f8795e64 + Drop the GEMFILE variable which is completely unused.
+ Add a GEM_SPECFILE variable which points to the gemspec file
  to use when building using the ``gemspec'' GEM_BUILD method.
  It defaults to ${WRKDIR}/${DISTNAME}.gemspec.

+ Add a GEM_FORMAT variable that indicates the archive format of
  the downloaded gem.  Possible are "packed" and "tar" with a default
  of "tar".  "Packed" is the old gem-0.8.x format, while "tar" is the
  current one.

+ Make gem-extract a dependency for post-extract, not do-extract.
  This allows for the usual do-extract actions to take place in
  the case where EXTRACT_SUFX is not ".gem".

  Now, if any of the DISTFILES are gems, then gem-extract takes care
  of all of the extraction, but otherwise, the usual do-extract actions
  take place.

+ Use the gem script to unpack the downloaded gem.  We still have to
  manually extract the gemspec file, but at least we make fewer
  assumptions about the format of the gem.
2008-03-21 22:22:01 +00:00
jlam
0961a5f6f9 Remove PKG_DESTDIR_SUPPORT setting from rubygem.mk. Its placement in
this file was awkward because PKG_DESTDIR_SUPPORT must be set before
the first inclusion of bsd.prefs.mk, which forced rubygem.mk to be
included before any other file.  Instead, packages which install as
Ruby gems should define PKG_DESTDIR_SUPPORT on their own.
2008-03-21 14:13:58 +00:00
jlam
b14c333aaf + About half of the gems I've touched have required rubygems>=1.0.1, so
make that the default version required for dependencies.

+ Same deal for rake>=0.8.1.
2008-03-19 23:03:22 +00:00
jlam
bd603564ba + Move the "install into buildroot" step into the build phase and out
of the install phase.  The whole point of "buildroot" was to avoid
  building anything in the install phase.
2008-03-19 20:26:15 +00:00
jlam
ebdd30c58e Extract the gemspec file before the data.tar.gz so that we avoid any
possibility of a name collision with a file named "metadata".
2008-03-18 20:01:20 +00:00
jlam
b0f9c2722e Use ${BUILD_TARGET} as the Rakefile task invoked to create the local
gem during the build process.  This allows for specifying non-standard
tasks used by some Ruby packages.  It defaults to "gem".
2008-03-18 16:35:52 +00:00
jlam
1ba20e8a93 Fix subtle interaction with DESTDIR during installation -- the Makefiles
generated by mkmf.rb are actually not DESTDIR-safe because the $(DESTDIR)
value gets propagated to the rpath.  Since we already pass --buildroot
to deal with staged installations, explicitly strip out DESTDIR from
the environment.
2008-03-18 04:01:27 +00:00
jlam
cc508cadcb Unify the two clauses in _gem-install-cleanbuild that removed the
intermediate build files.  GEM_CLEANBUILD now defaults to "ext/*".
2008-03-18 03:50:35 +00:00
jlam
11efc3c217 REPLACE_RUBY_DIRS is relative to ${WRKSRC} by default, so shorten the
value a bit.
2008-03-18 03:47:07 +00:00
jlam
501981a89a Installed gems have wrapper scripts that call the right interpreter,
regardless of the #! line at the head of a script, so we can skip
the interpreter path check for gems.

As a side benefit, the resulting gems are more suitable for distribution
to other platforms.
2008-03-18 01:40:48 +00:00
jlam
cc71b06e12 Pass MAKE_ENV to the build process when building the gem from the
unpacked sources.  This fixes certain checks for $HOME, $PATH and the
like.
2008-03-17 19:33:25 +00:00
jlam
a8457261fb Allow for gem-extract to be overridden so that packages with special
extraction procedures can be handled by this file.
2008-03-14 16:41:21 +00:00
jlam
fd91e6e275 + Add an example value for GEM_CLEANBUILD. 2008-03-14 15:30:10 +00:00
jlam
228b705253 + Minor improvements to documentation.
+ The local gem is not ${GEMFILE}; it's ${GEM_NAME}.gem.  The two can
  be different due to capitalization/case differences.
2008-03-14 15:25:28 +00:00
jlam
5108f37128 + Rename the metadata (gemspec) file to a more sensible name (*.gemspec).
+ Clean up additional unpacked bits (*.sig) files during extraction.

+ Fix the "cleanbuild" step:
  + In GEM_CLEANBUILD case, sanity check that the file doesn't exist
    in the unpacked gem before removing it from the installed gem.
  + Actually removes unwanted directories.
2008-03-14 14:18:21 +00:00
jlam
5420ec3544 + Modify gem-rake-build to find the generated .gem file in the event
that the Rakefile creates it in a non-standard place.

+ Create a new variable GEM_CLEANBUILD which is a list of globs for
  files to remove from the gem installed in the buildroot in the
  _gem-install-cleanbuild target.  This allows for packages with a
  non-standard gem directory structure (one that has the .c files
  under ext/).
2008-03-13 22:20:04 +00:00
jlam
d6d382c1ca Rename PLIST.common to PLIST as we just use the standard PLIST mechanism
now.
2008-03-13 18:46:20 +00:00
jlam
73af02e25b + Rename some variables and modify a few definitions so that we match
the same variables used in rubygem.mk.

+ Use a GENERATE_PLIST statement instead of manually generating a
  PLIST_DYNAMIC file.  This code is copied from RUBYGEM_GENERATE_PLIST
  in rubygem.mk.

+ Use INSTALL_ENV, which is meant to contain the extra environment
  bits for use during installation.
2008-03-13 18:45:05 +00:00
jlam
37de960a09 Most gems need at least rubygems-0.9.4 to work properly. 2008-03-13 18:29:20 +00:00
jlam
95900725f4 Whitespacify to be easier on my eyes. 2008-03-13 15:58:27 +00:00
jlam
64eba0d7e3 When cleaning out the intermediate build files, be more thorough about
looking through the ext/ directory structure.  Not all gems are simple.
2008-03-13 15:57:25 +00:00
jlam
253c5212c3 For brevity, rename the do-gem-* targets to just "gem-*". 2008-03-13 15:48:32 +00:00
jlam
2687107ce3 Split the do-gem-install target into smaller sub-targets. 2008-03-13 15:45:59 +00:00
jlam
840b5908d7 + Add a package-settable variable GEM_BUILD that sets the way that
the local gem that is installed is built from the extracted sources.
  The possible values are "gemspec" and "rake", with "rake" being the
  default.

+ Change the do-gem-extract target so that it also extracts the gemspec
  file from the source gem.  This gemspec file is used when the
  "gemspec" GEM_BUILD method is chosen.

+ Add do-gem-${GEM_BUILD}-targets that build the local gem using the
  corresponding ${GEM_BUILD} method.
2008-03-13 14:38:46 +00:00
jlam
2959d878c5 Make RUBYGEM_PKGPREFIX the same as RUBY_PKGPREFIX. 2008-03-12 22:04:40 +00:00
jlam
e285acf52d Don't hardcode the package version number into the PLIST -- use
${PKGVERSION} instead.
2008-03-12 22:04:07 +00:00