aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteve Wills <swills@FreeBSD.org>2011-08-23 03:47:28 +0000
committerSteve Wills <swills@FreeBSD.org>2011-08-23 03:47:28 +0000
commit894c447bb7dcd8b106a7102aee13228bd1d8a489 (patch)
tree48b2d9cc3bb7ad4464d8444a8027c2fd54b6f785
parent83bd1bbc3308a98ca204dda7fee1293b31e6be0c (diff)
downloadports-894c447bb7dcd8b106a7102aee13228bd1d8a489.tar.gz
ports-894c447bb7dcd8b106a7102aee13228bd1d8a489.zip
Notes
-rw-r--r--Mk/bsd.ruby.mk6
-rw-r--r--devel/ruby-gems/Makefile20
-rw-r--r--devel/ruby-gems/pkg-plist4
-rw-r--r--lang/ruby19/Makefile36
-rw-r--r--lang/ruby19/files/patch-common.mk9
-rw-r--r--lang/ruby19/pkg-plist102
6 files changed, 144 insertions, 33 deletions
diff --git a/Mk/bsd.ruby.mk b/Mk/bsd.ruby.mk
index 24b1ed7160dd..e37f4f33a685 100644
--- a/Mk/bsd.ruby.mk
+++ b/Mk/bsd.ruby.mk
@@ -267,11 +267,7 @@ RUBY_MODNAME?= ${PORTNAME}
# Commands
RUBY_RD2?= ${LOCALBASE}/bin/rd2
-.if ${RUBY_VER} == 1.8
-RUBY_RDOC?= ${LOCALBASE}/bin/rdoc
-.else
RUBY_RDOC?= ${LOCALBASE}/bin/rdoc${RUBY_VER:S/.//}
-.endif
# Ports
RUBY_BASE_PORT?= lang/ruby${RUBY_VER:S/.//}
@@ -390,8 +386,10 @@ RUBY_FLAGS+= -d
#
.if defined(USE_RUBYGEMS)
+. if ${RUBY_VER} == 1.8
BUILD_DEPENDS+= ${RUBYGEMBIN}:${PORTSDIR}/devel/ruby-gems
RUN_DEPENDS+= ${RUBYGEMBIN}:${PORTSDIR}/devel/ruby-gems
+. endif
PKGNAMEPREFIX?= rubygem-
EXTRACT_SUFX= .gem
diff --git a/devel/ruby-gems/Makefile b/devel/ruby-gems/Makefile
index 51d4e7fd0fee..9fd968df17c0 100644
--- a/devel/ruby-gems/Makefile
+++ b/devel/ruby-gems/Makefile
@@ -20,11 +20,11 @@ COMMENT= Package management framework for the Ruby language
USE_RUBY= yes
RUBY_SETUP= setup.rb
+RUBY_VER= 1.8
NO_BUILD= yes
-PLIST_SUB+= DISTNAME="${DISTNAME}" \
- RUBY_SUFFIX="${RUBY_SUFFIX}"
+PLIST_SUB+= DISTNAME="${DISTNAME}"
.if !defined(NOPORTDOCS)
RUBY_SETUP_OPTIONS=
@@ -43,20 +43,18 @@ GEMS_DOC_DIR_P= ${GEMS_DOC_BASE_DIR_P}/%%DISTNAME%%
.include <bsd.port.pre.mk>
+.if ${RUBY_VER} == 1.9
+IGNORE= already included in this ruby distribution
+.endif
+
do-install:
cd ${WRKSRC}; ${RUBY} ${RUBY_SETUP} ${RUBY_SETUP_OPTIONS}
post-install:
@${MKDIR} ${PREFIX}/${GEMS_DOC_BASE_DIR}/
@${TOUCH} ${PREFIX}/${GEMS_DOC_BASE_DIR}/.keep_this
- @${LN} -sf ${PREFIX}/bin/gem${RUBY_VER:S/.//} ${PREFIX}/bin/gem
+ @${LN} -sf ${PREFIX}/bin/gem18 ${PREFIX}/bin/gem
-.if !defined(NOPORTDOCS)
- @${FIND} -ds ${PREFIX}/lib/ruby/gems/${RUBY_VER}/doc/${DISTNAME} \
- -type f -print | ${SED} -E -e 's,^${PREFIX}/?,,' >> ${TMPPLIST}
- @${FIND} -ds ${PREFIX}/lib/ruby/gems/${RUBY_VER}/doc/${DISTNAME} \
- -type d -print | ${SED} -E -e 's,^${PREFIX}/?,@dirrm ,' >> ${TMPPLIST}
-.endif
@${ECHO_CMD} "@unexec rmdir %D/lib/ruby/gems/${RUBY_VER}/doc 2>/dev/null || true" >> ${TMPPLIST}
@${ECHO_CMD} "@unexec rmdir %D/lib/ruby/gems/${RUBY_VER} 2>/dev/null || true" >> ${TMPPLIST}
@${ECHO_CMD} "@unexec rmdir %D/lib/ruby/gems 2>/dev/null || true" >> ${TMPPLIST}
@@ -65,8 +63,8 @@ post-install:
# This target is only meant to be used by the port maintainer.
x-generate-plist:
${ECHO} bin/gem > pkg-plist.new
- ${ECHO} bin/gem${RUBY_VER:S/.//} >> pkg-plist.new
- ${ECHO} bin/update_rubygems${RUBY_VER:S/.//} >> pkg-plist.new
+ ${ECHO} bin/gem18 >> pkg-plist.new
+ ${ECHO} bin/update_rubygems18 >> pkg-plist.new
${ECHO} ${GEMS_VER_DIR_P}/cache/sources-0.0.2.gem >> pkg-plist.new
${FIND} ${PREFIX}/${GEMS_VER_DIR}/gems/sources-0.0.2 -type f | ${SORT} | ${SED} -e 's,${PREFIX}/${GEMS_VER_DIR},${GEMS_VER_DIR_P},' >> pkg-plist.new
${ECHO} ${GEMS_VER_DIR_P}/specifications/sources-0.0.2.gemspec >> pkg-plist.new
diff --git a/devel/ruby-gems/pkg-plist b/devel/ruby-gems/pkg-plist
index f6d9370053a4..4e653dd9dbd8 100644
--- a/devel/ruby-gems/pkg-plist
+++ b/devel/ruby-gems/pkg-plist
@@ -1,7 +1,7 @@
@comment $FreeBSD$
bin/gem
-bin/gem%%RUBY_SUFFIX%%
-bin/update_rubygems%%RUBY_SUFFIX%%
+bin/gem18
+bin/update_rubygems18
lib/ruby/gems/%%RUBY_VER%%/cache/sources-0.0.2.gem
lib/ruby/gems/%%RUBY_VER%%/gems/sources-0.0.2/lib/sources.rb
lib/ruby/gems/%%RUBY_VER%%/specifications/sources-0.0.2.gemspec
diff --git a/lang/ruby19/Makefile b/lang/ruby19/Makefile
index 94f607b8bac4..6dde5e2cf66e 100644
--- a/lang/ruby19/Makefile
+++ b/lang/ruby19/Makefile
@@ -86,7 +86,10 @@ PLIST_SUB+= IF_DEFAULT=""
PLIST_SUB+= IF_DEFAULT="@comment "
.endif
-INSTALLED_SCRIPTS= irb erb rdoc ri ruby testrb
+GEMS_DIR= ${PREFIX}/lib/ruby/gems/${RUBY_VER}
+PLIST_SUB+= GEMS_DIR="lib/ruby/gems/${RUBY_VER}"
+
+INSTALLED_SCRIPTS= irb erb rdoc ri ruby testrb gem
EXTSAMPLES= bigdecimal/sample/*.rb \
curses/hello.rb \
@@ -133,12 +136,6 @@ post-patch:
${MV} ${BUILD_WRKSRC}/ext/${d} ${WRKDIR}/
.endfor
-# we get ruby-gems from ports
-.for d in bin/gem doc/rubygems lib/rubygems test/rubygems \
- lib/rubygems.rb lib/ubygems.rb gem_prelude.rb
- ${RM} -rf ${BUILD_WRKSRC}/${d}
-.endfor
-
# we get rake from ports
.for d in bin/rake doc/rake lib/rake test/rake man/rake.1 lib/rake.rb
${RM} -rf ${BUILD_WRKSRC}/${d}
@@ -169,6 +166,8 @@ pre-su-install:
${TOUCH} ${RUBY_DOCDIR}/.keep_me
${TOUCH} ${RUBY_SITEARCHLIBDIR}/.keep_me
${TOUCH} ${RUBY_VENDORARCHLIBDIR}/.keep_me
+ ${MKDIR} ${GEMS_DIR}/gems
+ ${TOUCH} ${GEMS_DIR}/gems/.keep_me
post-install:
#
@@ -286,6 +285,29 @@ plist::
@${FIND} -ds ${RUBY_LIBDIR}/ -type d | ${SORT} -r | \
${SED} -E -e 's,^${RUBY_LIBDIR}(.*),@dirrm %%RUBY_LIBDIR%%\1,' >> pkg-plist
+#
+# Find all gem files/folders
+#
+ @${FIND} -ds ${GEMS_DIR}/ ! -type d | \
+ ${SED} 's,^${GEMS_DIR},%%GEMS_DIR%%,' >> pkg-plist
+ @${FIND} -ds ${GEMS_DIR}/ -type d | ${SORT} -r | \
+ ${SED} -E -e 's,^${GEMS_DIR}(.*),@dirrm %%GEMS_DIR%%\1,' >> pkg-plist
+
+ @${ECHO_CMD} "%%RUBY_SITEARCHLIBDIR%%/.keep_me" >> pkg-plist
+ @${ECHO_CMD} "@dirrmtry %%RUBY_SITEARCHLIBDIR%%" >> pkg-plist
+ @${ECHO_CMD} "@dirrmtry %%RUBY_SITELIBDIR%%" >> pkg-plist
+ @${ECHO_CMD} "@dirrmtry lib/ruby/site_ruby" >> pkg-plist
+
+ @${ECHO_CMD} "%%RUBY_VENDORARCHLIBDIR%%/.keep_me" >> pkg-plist
+ @${ECHO_CMD} "@dirrmtry %%RUBY_VENDORARCHLIBDIR%%" >> pkg-plist
+ @${ECHO_CMD} "@dirrmtry %%RUBY_VENDORLIBDIR%%" >> pkg-plist
+ @${ECHO_CMD} "@dirrmtry lib/ruby/vendor_ruby" >> pkg-plist
+ @${ECHO_CMD} "@dirrmtry lib/ruby/gems" >> pkg-plist
+
+ @${ECHO_CMD} "@dirrmtry lib/ruby" >> pkg-plist
+
+ @${SED} -i "" -E -e "s,${RUBY_ARCH},%%RUBY_ARCH%%,g" pkg-plist
+
test:
@(cd ${WRKSRC}; ${MAKE} test)
diff --git a/lang/ruby19/files/patch-common.mk b/lang/ruby19/files/patch-common.mk
index a068f6d240f3..0836883c8ed2 100644
--- a/lang/ruby19/files/patch-common.mk
+++ b/lang/ruby19/files/patch-common.mk
@@ -1,14 +1,5 @@
--- common.mk.orig 2011-05-17 21:19:20.689620679 -0400
+++ common.mk 2011-05-17 21:19:28.688621223 -0400
-@@ -96,7 +96,7 @@
-
- GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
-
--PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(srcdir)/gem_prelude.rb
-+PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb
- PRELUDES = prelude.c miniprelude.c
- GOLFPRELUDES = golf_prelude.c
-
@@ -256,7 +256,7 @@
install-capi: capi pre-install-capi do-install-capi post-install-capi
pre-install-capi:: install-prereq
diff --git a/lang/ruby19/pkg-plist b/lang/ruby19/pkg-plist
index cf5122a397e6..a3d72f4b5826 100644
--- a/lang/ruby19/pkg-plist
+++ b/lang/ruby19/pkg-plist
@@ -10,6 +10,8 @@ bin/ruby%%RUBY_SUFFIX%%
%%IF_DEFAULT%%bin/ruby
bin/testrb%%RUBY_SUFFIX%%
%%IF_DEFAULT%%bin/testrb
+bin/gem%%RUBY_SUFFIX%%
+%%IF_DEFAULT%%bin/gem
lib/lib%%RUBY_NAME%%-static.a
lib/lib%%RUBY_NAME%%.so
lib/lib%%RUBY_NAME%%.so.%%RUBY_SHLIBVER%%
@@ -69,9 +71,14 @@ include/ruby-1.9/ruby.h
%%PORTDOCS%%%%RUBY_DOCDIR%%/readline/README
%%PORTDOCS%%%%RUBY_DOCDIR%%/readline/README.ja
%%PORTDOCS%%%%RUBY_DOCDIR%%/ripper/README
+%%PORTDOCS%%%%RUBY_DOCDIR%%/rubygems/ChangeLog
+%%PORTDOCS%%%%RUBY_DOCDIR%%/rubygems/History.txt
+%%PORTDOCS%%%%RUBY_DOCDIR%%/rubygems/LICENSE.txt
+%%PORTDOCS%%%%RUBY_DOCDIR%%/rubygems/README
%%PORTDOCS%%%%RUBY_DOCDIR%%/shell.rd
%%PORTDOCS%%%%RUBY_DOCDIR%%/shell.rd.ja
%%PORTDOCS%%%%RUBY_DOCDIR%%/stringio/README
+%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/rubygems
%%PORTDOCS%%%%RUBY_DOCDIR%%/syslog/syslog.txt
%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/syslog
%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/stringio
@@ -712,6 +719,91 @@ include/ruby-1.9/ruby.h
%%RUBY_LIBDIR%%/rss/parser.rb
%%RUBY_LIBDIR%%/rss/rexmlparser.rb
%%RUBY_LIBDIR%%/rss/rss.rb
+%%RUBY_LIBDIR%%/rubygems/builder.rb
+%%RUBY_LIBDIR%%/rubygems/command.rb
+%%RUBY_LIBDIR%%/rubygems/command_manager.rb
+%%RUBY_LIBDIR%%/rubygems/commands/build_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/cert_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/check_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/cleanup_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/contents_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/dependency_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/environment_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/fetch_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/generate_index_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/help_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/install_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/list_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/lock_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/mirror_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/outdated_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/owner_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/pristine_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/push_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/query_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/rdoc_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/search_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/server_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/setup_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/sources_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/specification_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/stale_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/uninstall_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/unpack_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/update_command.rb
+%%RUBY_LIBDIR%%/rubygems/commands/which_command.rb
+%%RUBY_LIBDIR%%/rubygems/config_file.rb
+%%RUBY_LIBDIR%%/rubygems/custom_require.rb
+%%RUBY_LIBDIR%%/rubygems/defaults.rb
+%%RUBY_LIBDIR%%/rubygems/dependency.rb
+%%RUBY_LIBDIR%%/rubygems/dependency_installer.rb
+%%RUBY_LIBDIR%%/rubygems/dependency_list.rb
+%%RUBY_LIBDIR%%/rubygems/doc_manager.rb
+%%RUBY_LIBDIR%%/rubygems/errors.rb
+%%RUBY_LIBDIR%%/rubygems/exceptions.rb
+%%RUBY_LIBDIR%%/rubygems/ext/builder.rb
+%%RUBY_LIBDIR%%/rubygems/ext/configure_builder.rb
+%%RUBY_LIBDIR%%/rubygems/ext/ext_conf_builder.rb
+%%RUBY_LIBDIR%%/rubygems/ext/rake_builder.rb
+%%RUBY_LIBDIR%%/rubygems/ext.rb
+%%RUBY_LIBDIR%%/rubygems/format.rb
+%%RUBY_LIBDIR%%/rubygems/gem_openssl.rb
+%%RUBY_LIBDIR%%/rubygems/gem_path_searcher.rb
+%%RUBY_LIBDIR%%/rubygems/gem_runner.rb
+%%RUBY_LIBDIR%%/rubygems/gemcutter_utilities.rb
+%%RUBY_LIBDIR%%/rubygems/indexer.rb
+%%RUBY_LIBDIR%%/rubygems/install_update_options.rb
+%%RUBY_LIBDIR%%/rubygems/installer.rb
+%%RUBY_LIBDIR%%/rubygems/local_remote_options.rb
+%%RUBY_LIBDIR%%/rubygems/old_format.rb
+%%RUBY_LIBDIR%%/rubygems/package/f_sync_dir.rb
+%%RUBY_LIBDIR%%/rubygems/package/tar_header.rb
+%%RUBY_LIBDIR%%/rubygems/package/tar_input.rb
+%%RUBY_LIBDIR%%/rubygems/package/tar_output.rb
+%%RUBY_LIBDIR%%/rubygems/package/tar_reader/entry.rb
+%%RUBY_LIBDIR%%/rubygems/package/tar_reader.rb
+%%RUBY_LIBDIR%%/rubygems/package/tar_writer.rb
+%%RUBY_LIBDIR%%/rubygems/package.rb
+%%RUBY_LIBDIR%%/rubygems/package_task.rb
+%%RUBY_LIBDIR%%/rubygems/platform.rb
+%%RUBY_LIBDIR%%/rubygems/remote_fetcher.rb
+%%RUBY_LIBDIR%%/rubygems/require_paths_builder.rb
+%%RUBY_LIBDIR%%/rubygems/requirement.rb
+%%RUBY_LIBDIR%%/rubygems/security.rb
+%%RUBY_LIBDIR%%/rubygems/server.rb
+%%RUBY_LIBDIR%%/rubygems/source_index.rb
+%%RUBY_LIBDIR%%/rubygems/source_info_cache.rb
+%%RUBY_LIBDIR%%/rubygems/source_info_cache_entry.rb
+%%RUBY_LIBDIR%%/rubygems/spec_fetcher.rb
+%%RUBY_LIBDIR%%/rubygems/specification.rb
+%%RUBY_LIBDIR%%/rubygems/test_utilities.rb
+%%RUBY_LIBDIR%%/rubygems/text.rb
+%%RUBY_LIBDIR%%/rubygems/uninstaller.rb
+%%RUBY_LIBDIR%%/rubygems/user_interaction.rb
+%%RUBY_LIBDIR%%/rubygems/validator.rb
+%%RUBY_LIBDIR%%/rubygems/version.rb
+%%RUBY_LIBDIR%%/rubygems/version_option.rb
+%%RUBY_LIBDIR%%/rubygems.rb
%%RUBY_LIBDIR%%/rss/slash.rb
%%RUBY_LIBDIR%%/rss/syndication.rb
%%RUBY_LIBDIR%%/rss/taxonomy.rb
@@ -763,6 +855,7 @@ include/ruby-1.9/ruby.h
%%RUBY_LIBDIR%%/tmpdir.rb
%%RUBY_LIBDIR%%/tracer.rb
%%RUBY_LIBDIR%%/tsort.rb
+%%RUBY_LIBDIR%%/ubygems.rb
%%RUBY_LIBDIR%%/un.rb
%%RUBY_LIBDIR%%/uri/common.rb
%%RUBY_LIBDIR%%/uri/ftp.rb
@@ -833,6 +926,11 @@ include/ruby-1.9/ruby.h
@dirrm %%RUBY_LIBDIR%%/test
@dirrm %%RUBY_LIBDIR%%/syck
@dirrm %%RUBY_LIBDIR%%/shell
+@dirrm %%RUBY_LIBDIR%%/rubygems/package/tar_reader
+@dirrm %%RUBY_LIBDIR%%/rubygems/package
+@dirrm %%RUBY_LIBDIR%%/rubygems/ext
+@dirrm %%RUBY_LIBDIR%%/rubygems/commands
+@dirrm %%RUBY_LIBDIR%%/rubygems
@dirrm %%RUBY_LIBDIR%%/rss/maker
@dirrm %%RUBY_LIBDIR%%/rss/dublincore
@dirrm %%RUBY_LIBDIR%%/rss/content
@@ -891,6 +989,9 @@ include/ruby-1.9/ruby.h
@dirrm %%RUBY_LIBDIR%%/%%RUBY_ARCH%%/dl
@dirrm %%RUBY_LIBDIR%%/%%RUBY_ARCH%%/digest
@dirrm %%RUBY_LIBDIR%%/%%RUBY_ARCH%%
+%%GEMS_DIR%%/gems/.keep_me
+@dirrm %%GEMS_DIR%%/gems
+@dirrm %%GEMS_DIR%%
@dirrm %%RUBY_LIBDIR%%/
%%RUBY_SITEARCHLIBDIR%%/.keep_me
@dirrm %%RUBY_SITEARCHLIBDIR%%
@@ -899,5 +1000,6 @@ include/ruby-1.9/ruby.h
%%RUBY_VENDORARCHLIBDIR%%/.keep_me
@dirrm %%RUBY_VENDORARCHLIBDIR%%
@dirrm %%RUBY_VENDORLIBDIR%%
+@dirrmtry lib/ruby/gems
@dirrmtry lib/ruby/vendor_ruby
@dirrmtry lib/ruby