Commit graph

112 commits

Author SHA1 Message Date
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
jlam
57fd7ef1e9 Skip printing "@dirrm lib/ruby/gems" in the print-PLIST output.
Now, print-PLIST with USE_DESTDIR=full will generate the correct
PLISTs for rubygems.
2008-03-12 20:27:08 +00:00
jlam
6d0c4a966f Don't try to remove the intermediate build files unless the ext/ directory
exists.
2008-03-12 20:08:22 +00:00
jlam
112d0b9b53 + For print-PLIST, don't output any files or directories in
${GEM_DOCDIR} as those are automatically listed by
  RUBYGEM_GENERATE_PLIST.

+ Clean up the intermediate build files in the "ext" directory of
  installed gem by removing everything that's not also in the unpacked
  gem.
2008-03-12 18:53:35 +00:00
jlam
f8cb5229fc + By default, support user-destdir installation as the gem installation
process makes that easily possible.

+ Use ${EXTRACTOR} to manually unpack the gem file.

+ Change the do-gem-install target to initially build and install the
  gem into a buildroot, ${WRKDIR}/.inst, then to copy the files from
  the buildroot into the final install location, ${DESTDIR}${PREFIX}.

XXX We still need to find some way to remove the intermediate build
XXX files, e.g. *.o object files, from the buildroot before copying
XXX to the final location.
2008-03-12 16:59:13 +00:00
jlam
90e29ad4d3 Fix bug in the interaction between --build-root and --remote noted in:
http://rubyforge.org/pipermail/rubygems-developers/2006-June/002010.html

If --build-root is specified, then any remote gems are now downloaded
into the "cache" directory under the buildroot.

Bump PKGREVISION to 2.
2008-03-12 15:07:47 +00:00
jlam
cf881d57ed + Improve the documentation in the header of the rubygem.mk file.
+ Add a build dependency on rake, which is used to build a new gem
  file.  Define RAKE to be the path to the installed rake binary.

+ Add "ruby" as a package category by default.

+ Define MASTER_SITES to a default value pointing to the main remote gem
  repository: http://gems.rubyforge.net/gems/.

+ Add a "do-gem-extract" target that extracts the files from the downloaded
  gem and into ${WRKSRC}.  This allows us to patch or otherwise manipulate
  the files that are part of the gem that is to be installed.

+ Add a "do-gem-build" target that builds a new local gem from the
  contents of ${WRKSRC} using the provided Rakefile.  This local gem
  which contains all pkgsrc modifications will be the one installed
  on the system.

+ Modify "do-gem-install" target to install from the new local gem
  created by the "do-gem-build" target.

XXX The do-gem-install target still needs to use the new --buildroot
XXX option to allow DESTDIR-style installations.
2008-03-12 04:06:15 +00:00
jlam
dc9c4be108 + We need rubygems>=1.0.1nb1 (which has the OpenSuSE buildroot patch)
for building and installing the gems, but we can use older rubygems
  at run-time.

+ Move GEMFILE definition ahead of EXTRACT_SUFX just as a style issue.
  This looks more like a normal package Makefile layout.

+ Rename GEMS_BASEDIR to GEM_HOME, which is the actual rubygems variable
  name for that directory.

+ Rename some variables to be more in line with other ruby variable
  names:

	GEM_LIB_DIR	=> GEM_LIBDIR
	GEM_DOC_DIR	=> GEM_DOCDIR

+ Set RUBYGEM_PKGPREFIX to ${RUBY_PKGPREFIX}-gem for now.  We know
  that at least we don't want ruby packages to prefix with "rubygems".

+ Just use EVAL_PREFIX instead of directly using find-prefix.mk.
2008-03-11 22:11:32 +00:00
seb
99b1bb5956 As discussed on tech-pkg@ add a Makefile fragment intended to help
packaging RubyGems.
Its functionality is somewhat limited for now but will be without
doubt improved and refactored in the very near future.
2008-03-11 20:12:17 +00:00
jlam
daa416222d Don't hardcode "1.8" in the GEM_SUBDIR -- use ${RUBY_VER_DIR} instead. 2008-03-08 03:37:55 +00:00
jlam
60a8b26dfb + Add patches by Marcus Rueckert for destdir-style installation of gems.
Patches from the OpenSuSE rubygems-1.0.1 src rpm.

+ Support user-destdir installation.

+ Dynamically generate the entire portion of the PLIST that corresponds
  to the documentation generated by rubygem at install-time.

Bump the PKGREVISION to 1.
2008-03-08 00:43:54 +00:00
minskim
14b4db8807 Update rubygems to 1.0.1.
Major New Features Include:

* RubyGems warns about various problems with gemspecs during gem building
* More-consistent versioning for the RubyGems software

Other Changes Include:

* Fixed various bugs and problems with installing gems on Windows
* Fixed using `gem server` for installing gems
* Various operations are even more verbose with --verbose
* Built gems are now backwards compatible with 0.9.4
* Improved detection of RUBYOPT loading rubygems
* `ruby setup.rb` now has a --help option
* Gem::Specification#bindir is now respected on installation
* Executable stubs can now be installed to match ruby's name, so if ruby is
  installed as 'ruby18', foo_exec will be installed as 'foo_exec18'
* `gem unpack` can now unpack into a specific directory with --target
* OpenSSL is no longer required by default
2008-01-16 22:56:42 +00:00
taca
9a5ce3acf4 Use more Ruby specific name: s/REPLACE_FILE_PAT/REPLACE_RUBY_PAT/. 2007-12-13 14:46:58 +00:00
minskim
fb6523bedc Remove entries that are automatically included in PLIST.
Noted by Filip Hajny in a private email.
2007-12-03 17:59:45 +00:00
minskim
33289744c5 Update to rubygems to 0.9.5.
New features:
* Automatic installation of platform gems
* New bandwidth and memory friendlier index file format
* "Offline" mode (--no-update-sources)
* Bulk update threshold can be specified (-B, --bulk-threshold)
* New `gem fetch` command
* `gem` now has "really verbose" output when you specify -v
* Ruby 1.9 compatible

See http://rubyforge.org/frs/shownotes.php?release_id=16500 for the
complete list.
2007-12-02 22:32:51 +00:00
minskim
8faabb4557 Update rubygems to 0.9.4.
Changes:
* Several people have been experiencing problems with no method errors
  on the source index cache.  The source index cache is now a bit more
  self healing.  Furthermore, if the source index cache is
  irreparable, then it is automatically dropped and reloaded.
* The source cache files may now be dropped with the "gem sources
  --clear-all" command.  (This command may require root is the system
  source cache is in a root protected area).
* Several sub-commands were accidently dropped from the "gem" command.
  These commands have been restored.
2007-05-30 19:09:33 +00:00
minskim
a26a154c12 Update rubygems to 0.9.3.
This is a maintenance release of RubyGems that fixs a problem
with ZLib on Windows platforms.
2007-05-23 01:51:19 +00:00
minskim
f794d9ad07 Make REPLACE_FILE_PAT more restrictive not to attempt to modify
non-ruby files.  This makes the package build on Darwin.
2007-04-27 19:31:08 +00:00
minskim
aa75317196 Update rubygems to 0.9.2.
Major changes since 0.9.0:
* RubyGems no longer allows installation of files outside the gem directory
* #require_gem will now print a warning, use #gem instead
* RubyGems now requires ruby 1.8.2 or greater
* RubyGems is -w clean
* The "unpack" command now works properly.
* User name and password are now passed properly to the authenticating
   proxy when downloading gems.
2007-04-23 03:21:04 +00:00
salo
ee6059cd21 Add missing rcsid. 2007-02-03 20:42:33 +00:00
taca
1e9ddd06c8 Add a patch to fix security problem of RubyGems 0.9.0 and prior.
(http://www.frsirt.com/english/advisories/2007/0295)

Bump PKGREVISION.
2007-01-28 16:08:55 +00:00
cube
7e61227538 Add a patch to make "gem contents" work.
http://rubyforge.org/tracker/index.php?func=detail&aid=6032&group_id=126&atid=575
2006-10-05 09:30:27 +00:00
taca
39a1b534b3 Sort PLIST. 2006-09-07 15:51:25 +00:00
taca
5a5bb9c1be Update rubygems to 0.9.0:
- update HOMEPAGE.
- Many chages to write here, please see ChangeLog file.
2006-08-07 16:12:27 +00:00
taca
dccd827fac Stop handling DIST_SUBDIR default for Ruby based packages.
Second, update distinfo and/or stop using USE_RUBY_DIST_SUBDIR in Makefiles.
2006-01-03 14:25:49 +00:00
taca
5f0adcb4f0 - remove dependency to ruby-digest, ruby-openssl and ruby-zlib packages.
- require Ruby 1.8.3 or lator.

Bump PKGREVISION.
2005-11-03 05:12:42 +00:00
jlam
79201920ba Update misc/rubygems to 0.8.11. Changes from version 0.8.10 include:
* Improved dependency checks and installation via gems.
    * .gemrc now allows setting default options per gem sub-command.
    * Wrappers and/or symlinks are created as needd to put executables
      into the ruby bindir.
    * Creating and checking digital signatures on gems.
2005-08-18 05:43:32 +00:00
minskim
7192354855 Import rubygems.
RubyGems is a way to package Ruby libraries/applications for
distribution, its a distribution manager, its a package manager.
RubyGems brings to the world of Ruby a very valuable capability--the
ability to manage concurrent versions of libraries and dependencies
between those libraries.  This last aspect of RubyGems is one of the
most important to the end user, because its value is continuous as you
use and program Ruby, but to understand its impact an explanation of
how Ruby manages libraries is in order.
2005-04-10 01:01:33 +00:00