aboutsummaryrefslogtreecommitdiffstats
path: root/lang/ruby-devel
diff options
context:
space:
mode:
authorknu <knu@FreeBSD.org>2001-06-04 22:54:32 +0800
committerknu <knu@FreeBSD.org>2001-06-04 22:54:32 +0800
commitd2fda4d75090d760c7e0d70fbfafc92df31a93f2 (patch)
tree267720349b21325ef72b9234bbff8c0ae4856769 /lang/ruby-devel
parent50d74821005e5cf938004c9705e327165a03f9a2 (diff)
downloadfreebsd-ports-gnome-d2fda4d75090d760c7e0d70fbfafc92df31a93f2.tar.gz
freebsd-ports-gnome-d2fda4d75090d760c7e0d70fbfafc92df31a93f2.tar.zst
freebsd-ports-gnome-d2fda4d75090d760c7e0d70fbfafc92df31a93f2.zip
Introduce RUBY_DEFALUT_VER to choose a default version of ruby to use.
Introduce RUBY_R in preparation for ruby_r & ruby_r-devel ports. Define RUBY_CONFIGURE_ARGS.
Diffstat (limited to 'lang/ruby-devel')
-rw-r--r--lang/ruby-devel/Makefile66
-rw-r--r--lang/ruby-devel/pkg-message3
-rw-r--r--lang/ruby-devel/pkg-plist200
3 files changed, 140 insertions, 129 deletions
diff --git a/lang/ruby-devel/Makefile b/lang/ruby-devel/Makefile
index e9d4e2f87fe1..ec68d7f7e577 100644
--- a/lang/ruby-devel/Makefile
+++ b/lang/ruby-devel/Makefile
@@ -5,7 +5,7 @@
# $FreeBSD$
#
-PORTNAME= ruby
+PORTNAME= ruby${RUBY_R}
PORTVERSION= ${RUBY_PORTVERSION}
CATEGORIES= lang ruby ipv6
MASTER_SITES= http://www.ruby-lang.org/~knu/ # ${MASTER_SITE_RUBY}
@@ -28,24 +28,32 @@ RUBY_NO_RUN_DEPENDS= yes
USE_AUTOCONF= yes
INSTALLS_SHLIB= yes
WRKSRC= ${RUBY_WRKSRC}
-CONFIGURE_ARGS= --enable-shared
+CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \
+ --enable-shared
MAN1= ruby${_RUBY_SUFFIX}.1
-MLINKS= ruby${_RUBY_SUFFIX}.1 ruby.1
-
-.if defined(WITH_LIBC_R)
-CONFIGURE_ARGS+= --with-libc_r=yes
-.endif
.include <bsd.port.pre.mk>
-.if !empty(RUBY_SUFFIX)
-CONFIGURE_ARGS+= --program-suffix="${RUBY_SUFFIX}"
-.endif
-
.if ${OSVERSION} >= 400014
CONFIGURE_ARGS+= --enable-ipv6
.endif
+.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
+MLINKS= ruby${_RUBY_SUFFIX}.1 ruby${RUBY_R}.1
+IF_DEFAULT= ""
+.else
+IF_DEFAULT= "@comment "
+.endif
+
+.if defined(NORUBYLIB)
+RUBYLIB= "@comment "
+.else
+RUBYLIB= ""
+.endif
+
+PLIST_SUB+= IF_DEFAULT=${IF_DEFAULT} \
+ RUBYLIB=${RUBYLIB}
+
IRB_WITHOUT_SUFFIX= ${LOCALBASE}/bin/irb
IRB_WITH_SUFFIX= ${IRB_WITHOUT_SUFFIX}${_RUBY_SUFFIX}
@@ -58,28 +66,30 @@ post-patch:
${MV} ${WRKSRC}/ext/${d} ${WRKDIR}/
.endfor
+pre-install:
+ ${RM} -f ${RUBY_WITHOUT_SUFFIX}${RUBY_R} \
+ ${PREFIX}/man/man1/ruby${RUBY_R}.1 \
+ ${PREFIX}/man/man1/ruby${RUBY_R}.1.gz \
+ ${IRB_WITHOUT_SUFFIX}${RUBY_R}
+
post-install:
.if ${STRIP} == -s
strip ${RUBY}
.endif
-.if empty(RUBY_SUFFIX)
- ${MV} -f ${RUBY_WITHOUT_SUFFIX} ${RUBY_WITH_SUFFIX}
- ${LN} -fs ${RUBY_WITH_SUFFIX} ${RUBY_WITHOUT_SUFFIX}
- ${MV} ${PREFIX}/man/man1/ruby.1 ${PREFIX}/man/man1/ruby${_RUBY_SUFFIX}.1
-.else
- ${LN} -fs ${RUBY_WITH_SUFFIX} ${RUBY_WITHOUT_SUFFIX}
+.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
+ ${MV} -f ${RUBY_WITHOUT_SUFFIX}${RUBY_R} ${RUBY_WITH_SUFFIX}
+ ${MV} -f ${PREFIX}/man/man1/ruby${RUBY_R}.1 ${PREFIX}/man/man1/ruby${_RUBY_SUFFIX}.1
.endif
- ${INSTALL_SCRIPT} ${IRB_WITHOUT_SUFFIX} ${IRB_WITH_SUFFIX}
- ${RUBY} ${RUBY_FLAGS} -i -p \
- -e 'if $$. == 1; ' \
- -e ' if /^#!/; ' \
- -e ' sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!${RUBY_WITHOUT_SUFFIX}";' \
- -e ' else;' \
- -e ' $$_ = "#!${RUBY_WITHOUT_SUFFIX}\n" + $$_;' \
- -e ' end;' \
- -e 'end' \
- ${IRB_WITHOUT_SUFFIX}
- ${RUBY} ${RUBY_FLAGS} -i -p \
+ ${MV} -f ${IRB_WITHOUT_SUFFIX} ${IRB_WITH_SUFFIX}
+ if [ -x ${RUBY_WITHOUT_SUFFIX}${RUBY_DEFAULT_SUFFIX}${RUBY_R} ]; then \
+ ${LN} -fs ${RUBY_WITHOUT_SUFFIX}${RUBY_DEFAULT_SUFFIX}${RUBY_R} ${RUBY_WITHOUT_SUFFIX}${RUBY_R}; \
+ ${LN} -fs ruby${RUBY_DEFAULT_SUFFIX}${RUBY_R}.1 ${PREFIX}/man/man1/ruby${RUBY_R}.1; \
+ fi
+ ${LN} -fs ${IRB_WITHOUT_SUFFIX}${RUBY_DEFAULT_SUFFIX} ${IRB_WITHOUT_SUFFIX}
+.if !empty(RUBY_R)
+ ${LN} -fs ${IRB_WITH_SUFFIX} ${IRB_WITHOUT_SUFFIX}${RUBY_R}
+.endif
+ ${RUBY_WITH_SUFFIX} ${RUBY_FLAGS} -i -p \
-e 'if $$. == 1; ' \
-e ' if /^#!/; ' \
-e ' sub /^#!\s*\S*(\benv\s+)?\bruby/, "#!${RUBY_WITH_SUFFIX}";' \
diff --git a/lang/ruby-devel/pkg-message b/lang/ruby-devel/pkg-message
index ba5b117d70bf..0a25857ba8da 100644
--- a/lang/ruby-devel/pkg-message
+++ b/lang/ruby-devel/pkg-message
@@ -1,7 +1,8 @@
====
When you are to build a ruby related port for Ruby 1.7, please define
RUBY_VER=1.7 in the make command line, or put it in your
-/etc/make.conf if you want to always use Ruby 1.7 instead of 1.6.
+/etc/make.conf. If you want to always use Ruby 1.7 instead of 1.6,
+set RUBY_DEFAULT_VER=1.7.
Note that some stuff that comes with the standard Ruby distribution is
provided as separate ports:
diff --git a/lang/ruby-devel/pkg-plist b/lang/ruby-devel/pkg-plist
index 6e2d93d3dafb..2effb5e05516 100644
--- a/lang/ruby-devel/pkg-plist
+++ b/lang/ruby-devel/pkg-plist
@@ -1,6 +1,6 @@
-bin/irb
+%%IF_DEFAULT%%bin/irb%%RUBY_R%%
bin/irb%%_RUBY_SUFFIX%%
-bin/ruby
+%%IF_DEFAULT%%bin/ruby%%RUBY_R%%
bin/ruby%%_RUBY_SUFFIX%%
lib/lib%%RUBY_NAME%%.so
lib/lib%%RUBY_NAME%%.so.%%RUBY_SHLIBVER%%
@@ -31,108 +31,108 @@ lib/lib%%RUBY_NAME%%.so.%%RUBY_SHLIBVER%%
%%RUBY_ARCHLIBDIR%%/st.h
%%RUBY_ARCHLIBDIR%%/util.h
%%RUBY_ARCHLIBDIR%%/version.h
-%%RUBY_LIBDIR%%/English.rb
-%%RUBY_LIBDIR%%/Env.rb
-%%RUBY_LIBDIR%%/base64.rb
-%%RUBY_LIBDIR%%/cgi-lib.rb
-%%RUBY_LIBDIR%%/cgi.rb
-%%RUBY_LIBDIR%%/complex.rb
-%%RUBY_LIBDIR%%/date.rb
-%%RUBY_LIBDIR%%/date2.rb
-%%RUBY_LIBDIR%%/debug.rb
-%%RUBY_LIBDIR%%/delegate.rb
-%%RUBY_LIBDIR%%/e2mmap.rb
-%%RUBY_LIBDIR%%/eregex.rb
-%%RUBY_LIBDIR%%/expect.rb
-%%RUBY_LIBDIR%%/final.rb
-%%RUBY_LIBDIR%%/finalize.rb
-%%RUBY_LIBDIR%%/find.rb
-%%RUBY_LIBDIR%%/forwardable.rb
-%%RUBY_LIBDIR%%/ftools.rb
-%%RUBY_LIBDIR%%/ftplib.rb
-%%RUBY_LIBDIR%%/getoptlong.rb
-%%RUBY_LIBDIR%%/getopts.rb
-%%RUBY_LIBDIR%%/importenv.rb
-%%RUBY_LIBDIR%%/irb.rb
-%%RUBY_LIBDIR%%/jcode.rb
-%%RUBY_LIBDIR%%/kconv.rb
-%%RUBY_LIBDIR%%/mailread.rb
-%%RUBY_LIBDIR%%/mathn.rb
-%%RUBY_LIBDIR%%/matrix.rb
-%%RUBY_LIBDIR%%/mkmf.rb
-%%RUBY_LIBDIR%%/monitor.rb
-%%RUBY_LIBDIR%%/mutex_m.rb
-%%RUBY_LIBDIR%%/observer.rb
-%%RUBY_LIBDIR%%/open3.rb
-%%RUBY_LIBDIR%%/ostruct.rb
-%%RUBY_LIBDIR%%/parsearg.rb
-%%RUBY_LIBDIR%%/parsedate.rb
-%%RUBY_LIBDIR%%/ping.rb
-%%RUBY_LIBDIR%%/profile.rb
-%%RUBY_LIBDIR%%/pstore.rb
-%%RUBY_LIBDIR%%/rational.rb
-%%RUBY_LIBDIR%%/readbytes.rb
-%%RUBY_LIBDIR%%/resolv-replace.rb
-%%RUBY_LIBDIR%%/resolv.rb
-%%RUBY_LIBDIR%%/shell.rb
-%%RUBY_LIBDIR%%/shellwords.rb
-%%RUBY_LIBDIR%%/singleton.rb
-%%RUBY_LIBDIR%%/sync.rb
-%%RUBY_LIBDIR%%/telnet.rb
-%%RUBY_LIBDIR%%/tempfile.rb
-%%RUBY_LIBDIR%%/thread.rb
-%%RUBY_LIBDIR%%/thwait.rb
-%%RUBY_LIBDIR%%/timeout.rb
-%%RUBY_LIBDIR%%/tracer.rb
-%%RUBY_LIBDIR%%/weakref.rb
-%%RUBY_LIBDIR%%/cgi/session.rb
-%%RUBY_LIBDIR%%/irb/xmp.rb
-%%RUBY_LIBDIR%%/irb/ws-for-case-2.rb
-%%RUBY_LIBDIR%%/irb/workspace.rb
-%%RUBY_LIBDIR%%/irb/version.rb
-%%RUBY_LIBDIR%%/irb/slex.rb
-%%RUBY_LIBDIR%%/irb/ruby-token.rb
-%%RUBY_LIBDIR%%/irb/ruby-lex.rb
-%%RUBY_LIBDIR%%/irb/multi-irb.rb
-%%RUBY_LIBDIR%%/irb/locale.rb
-%%RUBY_LIBDIR%%/irb/loader.rb
-%%RUBY_LIBDIR%%/irb/input-method.rb
-%%RUBY_LIBDIR%%/irb/init.rb
-%%RUBY_LIBDIR%%/irb/help.rb
-%%RUBY_LIBDIR%%/irb/frame.rb
-%%RUBY_LIBDIR%%/irb/extend-command.rb
-%%RUBY_LIBDIR%%/irb/context.rb
-%%RUBY_LIBDIR%%/irb/completion.rb
-%%RUBY_LIBDIR%%/irb/lc/error.rb
-%%RUBY_LIBDIR%%/irb/lc/help-message
-%%RUBY_LIBDIR%%/irb/lc/ja/error.rb
-%%RUBY_LIBDIR%%/irb/lc/ja/help-message
-%%RUBY_LIBDIR%%/net/ftp.rb
-%%RUBY_LIBDIR%%/net/http.rb
-%%RUBY_LIBDIR%%/net/imap.rb
-%%RUBY_LIBDIR%%/net/pop.rb
-%%RUBY_LIBDIR%%/net/protocol.rb
-%%RUBY_LIBDIR%%/net/smtp.rb
-%%RUBY_LIBDIR%%/net/telnet.rb
-%%RUBY_LIBDIR%%/shell/builtin-command.rb
-%%RUBY_LIBDIR%%/shell/command-processor.rb
-%%RUBY_LIBDIR%%/shell/error.rb
-%%RUBY_LIBDIR%%/shell/filter.rb
-%%RUBY_LIBDIR%%/shell/process-controller.rb
-%%RUBY_LIBDIR%%/shell/system-command.rb
-%%RUBY_LIBDIR%%/shell/version.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/English.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/Env.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/base64.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/cgi-lib.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/cgi.rb
+%%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UBY_LIBDIR%%/parsearg.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/parsedate.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/ping.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/profile.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/pstore.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/rational.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/readbytes.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/resolv-replace.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/resolv.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/shell.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/shellwords.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/singleton.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/sync.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/telnet.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/tempfile.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/thread.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/thwait.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/timeout.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/tracer.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/weakref.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/cgi/session.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/xmp.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/ws-for-case-2.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/workspace.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/version.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/slex.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/ruby-token.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/ruby-lex.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/multi-irb.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/locale.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/loader.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/input-method.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/init.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/help.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/frame.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/extend-command.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/context.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/completion.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/lc/error.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/lc/help-message
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/lc/ja/error.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/irb/lc/ja/help-message
+%%RUBYLIB%%%%RUBY_LIBDIR%%/net/ftp.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/net/http.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/net/imap.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/net/pop.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/net/protocol.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/net/smtp.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/net/telnet.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/shell/builtin-command.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/shell/command-processor.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/shell/error.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/shell/filter.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/shell/process-controller.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/shell/system-command.rb
+%%RUBYLIB%%%%RUBY_LIBDIR%%/shell/version.rb
@exec /bin/mkdir -p %D/%%RUBY_SITEARCHLIBDIR%%
@dirrm %%RUBY_SITEARCHLIBDIR%%
-@dirrm %%RUBY_SITELIBDIR%%
+%%RUBYLIB%%@dirrm %%RUBY_SITELIBDIR%%
@unexec rmdir %D/lib/ruby/site_ruby 2>/dev/null || true
@dirrm %%RUBY_ARCHLIBDIR%%
-@dirrm %%RUBY_LIBDIR%%/cgi
-@dirrm %%RUBY_LIBDIR%%/irb/lc/ja
-@dirrm %%RUBY_LIBDIR%%/irb/lc
-@dirrm %%RUBY_LIBDIR%%/irb
-@dirrm %%RUBY_LIBDIR%%/net
-@dirrm %%RUBY_LIBDIR%%/shell
-@dirrm %%RUBY_LIBDIR%%
+%%RUBYLIB%%@dirrm %%RUBY_LIBDIR%%/cgi
+%%RUBYLIB%%@dirrm %%RUBY_LIBDIR%%/irb/lc/ja
+%%RUBYLIB%%@dirrm %%RUBY_LIBDIR%%/irb/lc
+%%RUBYLIB%%@dirrm %%RUBY_LIBDIR%%/irb
+%%RUBYLIB%%@dirrm %%RUBY_LIBDIR%%/net
+%%RUBYLIB%%@dirrm %%RUBY_LIBDIR%%/shell
+%%RUBYLIB%%@dirrm %%RUBY_LIBDIR%%
@unexec rmdir %D/lib/ruby 2>/dev/null || true
%%PORTDOCS%%%%RUBY_DOCDIR%%/README
%%PORTDOCS%%%%RUBY_DOCDIR%%/README.jp