aboutsummaryrefslogtreecommitdiffstats
path: root/lang
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2001-04-05 22:11:09 +0800
committerknu <knu@FreeBSD.org>2001-04-05 22:11:09 +0800
commit65a08cbc49e4adbac1f187f24e1073c5bbabd9fb (patch)
treef265e37c1870b2b1dc143245ae697667fe1a41c5 /lang
parentf8ba4a93297688fc4f87b9376e5d39b7e08556b2 (diff)
downloadfreebsd-ports-gnome-65a08cbc49e4adbac1f187f24e1073c5bbabd9fb.tar.gz
freebsd-ports-gnome-65a08cbc49e4adbac1f187f24e1073c5bbabd9fb.tar.zst
freebsd-ports-gnome-65a08cbc49e4adbac1f187f24e1073c5bbabd9fb.zip
Add ruby-ri, Ruby Interactive reference with command line and Emacs
interfaces.
Diffstat (limited to 'lang')
-rw-r--r--lang/Makefile1
-rw-r--r--lang/ruby-ri/Makefile49
-rw-r--r--lang/ruby-ri/distinfo1
-rw-r--r--lang/ruby-ri/files/patch-contrib::dblack::emacs::ri.el34
-rw-r--r--lang/ruby-ri/files/patch-install.rb33
-rw-r--r--lang/ruby-ri/files/patch-ri::ri.rb11
-rw-r--r--lang/ruby-ri/pkg-comment1
-rw-r--r--lang/ruby-ri/pkg-descr23
-rw-r--r--lang/ruby-ri/pkg-message14
-rw-r--r--lang/ruby-ri/pkg-plist63
10 files changed, 230 insertions, 0 deletions
diff --git a/lang/Makefile b/lang/Makefile
index 5f41d5108144..41a7d093211e 100644
--- a/lang/Makefile
+++ b/lang/Makefile
@@ -115,6 +115,7 @@
SUBDIR += ruby-programmingruby
SUBDIR += ruby-python
SUBDIR += ruby-reference
+ SUBDIR += ruby-ri
SUBDIR += ruby-tcltklib
SUBDIR += ruby-usersguide
SUBDIR += ruby14
diff --git a/lang/ruby-ri/Makefile b/lang/ruby-ri/Makefile
new file mode 100644
index 000000000000..c2bc524da0d5
--- /dev/null
+++ b/lang/ruby-ri/Makefile
@@ -0,0 +1,49 @@
+# New ports collection makefile for: ri
+# Date created: 5 April 2001
+# Whom: Akinori MUSHA aka knu <knu@idaemons.org>
+#
+# $FreeBSD$
+#
+
+PORTNAME= ri
+PORTVERSION= 0.7a
+CATEGORIES= lang ruby
+MASTER_SITES= ftp://www.pragmaticprogrammer.com/ruby/downloads/files/
+PKGNAMEPREFIX= ${RUBY_PKGNAMEPREFIX}
+EXTRACT_SUFX= .tgz
+DIST_SUBDIR= ruby
+
+MAINTAINER= knu@FreeBSD.org
+
+USE_RUBY= yes
+
+WRKSRC= ${WRKDIR}/${PORTNAME}
+NO_BUILD= yes
+
+DOCS= COPYING ChangeLog README
+EMACS_DOCS= Changelog DESCRIPTION
+
+EMACSLISPDIR= ${PREFIX}/share/emacs/site-lisp
+XEMACSLISPDIR= ${PREFIX}/lib/xemacs/site-lisp
+
+post-patch:
+ ${RUBY} -i -pe 'gsub /!!PREFIX!!/, "${PREFIX}"' \
+ ${WRKSRC}/contrib/dblack/emacs/ri.el
+
+do-install:
+ cd ${WRKSRC} && ${RUBY} install.rb
+ ${INSTALL_DATA} ${WRKSRC}/contrib/dblack/emacs/Emacs.rb ${RUBY_SITELIBDIR}/${PORTNAME}/op/
+ ${INSTALL_DATA} ${WRKSRC}/contrib/dblack/emacs/ri.el ${EMACSLISPDIR}/
+ ${INSTALL_DATA} ${EMACSLISPDIR}/ri.el ${XEMACSLISPDIR}/
+.if !defined(NOPORTDOCS)
+ ${MKDIR} ${RUBY_DOCDIR}/${PORTNAME}/emacs
+.for f in ${DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/${f} ${RUBY_DOCDIR}/${PORTNAME}/
+.endfor
+.for f in ${EMACS_DOCS}
+ ${INSTALL_DATA} ${WRKSRC}/contrib/dblack/emacs/${f} ${RUBY_DOCDIR}/${PORTNAME}/emacs/
+.endfor
+.endif
+ @${CAT} ${PKGMESSAGE}
+
+.include <bsd.port.mk>
diff --git a/lang/ruby-ri/distinfo b/lang/ruby-ri/distinfo
new file mode 100644
index 000000000000..ca2c610c607d
--- /dev/null
+++ b/lang/ruby-ri/distinfo
@@ -0,0 +1 @@
+MD5 (ruby/ri-0.7a.tgz) = 861acd6785f9c49b302c0e0704f3c08f
diff --git a/lang/ruby-ri/files/patch-contrib::dblack::emacs::ri.el b/lang/ruby-ri/files/patch-contrib::dblack::emacs::ri.el
new file mode 100644
index 000000000000..324b837fabca
--- /dev/null
+++ b/lang/ruby-ri/files/patch-contrib::dblack::emacs::ri.el
@@ -0,0 +1,34 @@
+--- contrib/dblack/emacs/ri.el.orig Fri Mar 16 12:25:28 2001
++++ contrib/dblack/emacs/ri.el Thu Apr 5 23:01:04 2001
+@@ -63,11 +63,11 @@
+ ;; (autoload 'ri-show-term-composite-at-point "ri.el" "ri utility" t)
+ ;;
+ ;;;; Set this command to whatever you use to run ri:
+-;; (setq ri-ri-command "/usr/local/bin/ri")
++(setq ri-ri-command "!!PREFIX!!/bin/ri")
+ ;;
+ ;;;; If you put Emacs.rb somewhere other than the main ri/op
+ ;;;; directory, then change "Emacs" to "/full/path/to/Emacs.rb":
+-;; (setq ri-emacsrb "Emacs")
++(setq ri-emacsrb "Emacs")
+ ;;
+ ;;;; These two global key bindings enable the instant ri lookup of a
+ ;;;; term at point.
+@@ -82,7 +82,7 @@
+ ;;; <ENTER> for convenience)
+ ;;;
+ ;;; (setq ri-key-quit "q")
+-;;; bound to function ri-quit, which is probably quit-window)
++;;; bound to function ri-quit, which is probably delete-window)
+ ;;;
+ ;;; (setq ri-key-fnt "\C-i")
+ ;;; find-next-term (TAB)
+@@ -365,7 +365,7 @@
+ (defun ri-quit()
+ "Function bound to 'q' key in ri output buffer(s)"
+ (interactive)
+- (quit-window))
++ (delete-window))
+
+ ;;; Functions to find and show terms at or beyond point
+
diff --git a/lang/ruby-ri/files/patch-install.rb b/lang/ruby-ri/files/patch-install.rb
new file mode 100644
index 000000000000..2f60a3018f6a
--- /dev/null
+++ b/lang/ruby-ri/files/patch-install.rb
@@ -0,0 +1,33 @@
+--- install.rb.orig Sun Mar 25 11:48:54 2001
++++ install.rb Thu Apr 5 21:49:24 2001
+@@ -16,16 +16,18 @@
+ # This sets up a standard environment for any sub-installs as well
+
+ $version = CONFIG["MAJOR"]+"."+CONFIG["MINOR"]
+-$libdir = File.join(CONFIG["libdir"], "ruby", $version)
++#$libdir = File.join(CONFIG["libdir"], "ruby", $version)
+
+ $bindir = CONFIG["bindir"]
+-$sitedir = CONFIG["sitedir"] || File.join($libdir, "site_ruby")
++#$sitedir = CONFIG["sitedir"] || File.join($libdir, "site_ruby")
++$sitedir = File.join(CONFIG["sitedir"], $version)
+ $ri_dest = File.join($sitedir, "ri")
+ $ri_op = File.join($ri_dest, "op")
+
+
+ # This is old stuff, but we need it to get tidy up a previous installation
+
++=begin
+ $site_libdir = $:.find {|x| x =~ /site_ruby$/}
+
+ if !$site_libdir
+@@ -33,7 +35,9 @@
+ elsif $site_libdir !~ Regexp.quote($version)
+ $site_libdir = File.join($site_libdir, $version)
+ end
++=end
+
++$site_libdir = $sitedir
+
+ ##
+ # Install an output formatter
diff --git a/lang/ruby-ri/files/patch-ri::ri.rb b/lang/ruby-ri/files/patch-ri::ri.rb
new file mode 100644
index 000000000000..403ba6428ae1
--- /dev/null
+++ b/lang/ruby-ri/files/patch-ri::ri.rb
@@ -0,0 +1,11 @@
+--- ri/ri.rb.orig Sun Mar 25 11:25:57 2001
++++ ri/ri.rb Thu Apr 5 22:13:35 2001
+@@ -31,7 +31,7 @@
+
+ include Config
+
+-$sitedir = CONFIG["sitedir"]
++$sitedir = File.join(CONFIG["sitedir"], CONFIG["MAJOR"] + "." + CONFIG["MINOR"])
+ $datadir = File.join($sitedir, "ri")
+ $opdir = File.join($datadir, "op")
+
diff --git a/lang/ruby-ri/pkg-comment b/lang/ruby-ri/pkg-comment
new file mode 100644
index 000000000000..5538ae29cf64
--- /dev/null
+++ b/lang/ruby-ri/pkg-comment
@@ -0,0 +1 @@
+Ruby Interactive reference
diff --git a/lang/ruby-ri/pkg-descr b/lang/ruby-ri/pkg-descr
new file mode 100644
index 000000000000..13fd1a25b691
--- /dev/null
+++ b/lang/ruby-ri/pkg-descr
@@ -0,0 +1,23 @@
+ri--Ruby Interactive reference
+
+ri displays descriptions of Ruby's built-in methods, classes, and
+modules. Run "ri each_with_index" and you get:
+
+ --------------------------------------------------------
+ enumObj.each_with_index {| obj, i | block } -> nil
+ --------------------------------------------------------
+
+ Calls block with two arguments, the item and its index,
+ for each item in enumObj.
+
+ hash = Hash.new
+ %w(cat dog wombat).each_with_index {|item, index|
+ hash[item] = index
+ }
+ hash #=> {"dog"=>1, "wombat"=>2, "cat"=>0}
+
+Emacs interface by David Alan Black <dblack@candle.superlink.net> is
+also bundled.
+
+WWW: http://www.pragmaticprogrammer.com/ruby/downloads/ri.html
+Author: The Pragmatic Programmers, LLC
diff --git a/lang/ruby-ri/pkg-message b/lang/ruby-ri/pkg-message
new file mode 100644
index 000000000000..56a32d4ab133
--- /dev/null
+++ b/lang/ruby-ri/pkg-message
@@ -0,0 +1,14 @@
+**********************************************************************
+To use ri from Emacs, add the following to your startup file.
+(e.g. ~/.emacs)
+
+ (autoload 'ruby-index "ri.el" "ri utility" t)
+ (autoload 'ri "ri.el" "ri utility" t)
+ (autoload 'ri-show-term-at-point "ri.el" "ri utility" t)
+ (autoload 'ri-show-term-composite-at-point "ri.el" "ri utility" t)
+
+ (global-set-key "\C-c\C-c\C-r" 'ri-show-term-at-point)
+ (global-set-key "\C-c\C-c\C-t" 'ri-show-term-composite-at-point)
+
+For details, refer to the comment section of ri.el.
+**********************************************************************
diff --git a/lang/ruby-ri/pkg-plist b/lang/ruby-ri/pkg-plist
new file mode 100644
index 000000000000..d371c98bcb36
--- /dev/null
+++ b/lang/ruby-ri/pkg-plist
@@ -0,0 +1,63 @@
+bin/ri
+%%RUBY_SITELIBDIR%%/ri/Array
+%%RUBY_SITELIBDIR%%/ri/index
+%%RUBY_SITELIBDIR%%/ri/Bignum
+%%RUBY_SITELIBDIR%%/ri/Binding
+%%RUBY_SITELIBDIR%%/ri/Class
+%%RUBY_SITELIBDIR%%/ri/Continuation
+%%RUBY_SITELIBDIR%%/ri/Dir
+%%RUBY_SITELIBDIR%%/ri/Exception
+%%RUBY_SITELIBDIR%%/ri/FalseClass
+%%RUBY_SITELIBDIR%%/ri/File
+%%RUBY_SITELIBDIR%%/ri/File__Stat
+%%RUBY_SITELIBDIR%%/ri/Fixnum
+%%RUBY_SITELIBDIR%%/ri/Float
+%%RUBY_SITELIBDIR%%/ri/Hash
+%%RUBY_SITELIBDIR%%/ri/Integer
+%%RUBY_SITELIBDIR%%/ri/IO
+%%RUBY_SITELIBDIR%%/ri/MatchData
+%%RUBY_SITELIBDIR%%/ri/Method
+%%RUBY_SITELIBDIR%%/ri/Module
+%%RUBY_SITELIBDIR%%/ri/NilClass
+%%RUBY_SITELIBDIR%%/ri/Numeric
+%%RUBY_SITELIBDIR%%/ri/Object
+%%RUBY_SITELIBDIR%%/ri/Proc
+%%RUBY_SITELIBDIR%%/ri/Range
+%%RUBY_SITELIBDIR%%/ri/Regexp
+%%RUBY_SITELIBDIR%%/ri/String
+%%RUBY_SITELIBDIR%%/ri/Struct
+%%RUBY_SITELIBDIR%%/ri/Struct__Tms
+%%RUBY_SITELIBDIR%%/ri/Symbol
+%%RUBY_SITELIBDIR%%/ri/Thread
+%%RUBY_SITELIBDIR%%/ri/ThreadGroup
+%%RUBY_SITELIBDIR%%/ri/Time
+%%RUBY_SITELIBDIR%%/ri/TrueClass
+%%RUBY_SITELIBDIR%%/ri/Comparable
+%%RUBY_SITELIBDIR%%/ri/Enumerable
+%%RUBY_SITELIBDIR%%/ri/Errno
+%%RUBY_SITELIBDIR%%/ri/FileTest
+%%RUBY_SITELIBDIR%%/ri/GC
+%%RUBY_SITELIBDIR%%/ri/Kernel
+%%RUBY_SITELIBDIR%%/ri/Marshal
+%%RUBY_SITELIBDIR%%/ri/Math
+%%RUBY_SITELIBDIR%%/ri/ObjectSpace
+%%RUBY_SITELIBDIR%%/ri/Process
+%%RUBY_SITELIBDIR%%/ri/ri.rb
+%%RUBY_SITELIBDIR%%/ri/refdoc.rb
+%%RUBY_SITELIBDIR%%/ri/outputstream.rb
+%%RUBY_SITELIBDIR%%/ri/op/Emacs.rb
+%%RUBY_SITELIBDIR%%/ri/op/Tagged.rb
+%%RUBY_SITELIBDIR%%/ri/op/Plain.rb
+@dirrm %%RUBY_SITELIBDIR%%/ri/op
+@dirrm %%RUBY_SITELIBDIR%%/ri
+%%PORTDOCS%%%%RUBY_DOCDIR%%/ri/COPYING
+%%PORTDOCS%%%%RUBY_DOCDIR%%/ri/ChangeLog
+%%PORTDOCS%%%%RUBY_DOCDIR%%/ri/README
+%%PORTDOCS%%%%RUBY_DOCDIR%%/ri/emacs/Changelog
+%%PORTDOCS%%%%RUBY_DOCDIR%%/ri/emacs/DESCRIPTION
+%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/ri/emacs
+%%PORTDOCS%%@dirrm %%RUBY_DOCDIR%%/ri
+lib/xemacs/site-lisp/ri.el
+@unexec rmdir -p %D/lib/xemacs/site-lisp 2>/dev/null || true
+share/emacs/site-lisp/ri.el
+@comment share/emacs/site-lisp is created by mtree