aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori MUSHA <knu@FreeBSD.org>2004-02-26 19:20:09 +0000
committerAkinori MUSHA <knu@FreeBSD.org>2004-02-26 19:20:09 +0000
commit7be480ee5d74ff048498affc4b642d0be5142347 (patch)
tree2f9bbc325056d2d4fafab21eb8fab30520e4bdb4
parenta6cf5720c796c8010b5b07ed22aa1bc7f367b7bd (diff)
downloadports-7be480ee5d74ff048498affc4b642d0be5142347.tar.gz
ports-7be480ee5d74ff048498affc4b642d0be5142347.zip
Change the default version of ruby to 1.8 for i386 as well, finally.
Always put a version suffix to the ruby name (no matter if ruby is the default version) to avoid mess in future. [Notes for i386 users] If you are a ruby developer and still want to stick with ruby 1.6 as default, please add RUBY_DEFAULT_VER=1.6 to /etc/make.conf. If you are a ruby developer and want to keep ruby 1.6 as default, please add RUBY_DEFAULT_VER=1.6 to /etc/make.conf. Otherwise, please run the following series of commands to migrate to ruby 1.8: 1) Reinstall portupgrade manually (and ruby 1.8 will be installed) pkg_delete portupgrade-\* (cd /usr/ports/sysutils/portupgrade; make install clean) 2) Reinstall everything that depends on ruby 1.6 (to use ruby 1.8) portupgrade -fr lang/ruby16 3) Reinstall ruby 1.8 (because the previous step kills symlinks) portupgrade -f lang/ruby18 4) Deinstall ruby 1.6 stuff (if you are paranoia) pkg_deinstall -ri lang/ruby16
Notes
Notes: svn path=/head/; revision=102227
-rw-r--r--Mk/bsd.ruby.mk38
-rw-r--r--lang/ruby16-shim-ruby18/Makefile2
-rw-r--r--lang/ruby16-shim-ruby18/pkg-plist6
-rw-r--r--lang/ruby16/Makefile11
-rw-r--r--lang/ruby16/pkg-plist4
-rw-r--r--lang/ruby16_static/Makefile4
-rw-r--r--lang/ruby16_static/pkg-plist2
-rw-r--r--lang/ruby18/Makefile12
-rw-r--r--lang/ruby18/pkg-plist14
9 files changed, 43 insertions, 50 deletions
diff --git a/Mk/bsd.ruby.mk b/Mk/bsd.ruby.mk
index 3b124fc52ac2..0c1bfb0a0a9b 100644
--- a/Mk/bsd.ruby.mk
+++ b/Mk/bsd.ruby.mk
@@ -61,10 +61,9 @@ Ruby_Include_MAINTAINER= knu@FreeBSD.org
# RUBY_SHLIBVER - Major version of libruby (see below for current value).
# RUBY_ARCH - Set to target architecture name. (e.g. i386-freebsdelf4.3)
# RUBY_R - Extra suffix only defined when RUBY_WITH_PTHREAD is defined. (_r)
-# RUBY_SUFFIX - Suffix for ruby binaries and directories. ${RUBY_R} or ${_RUBY_SUFFIX}.
-# _RUBY_SUFFIX - String to be used as RUBY_SUFFIX. Always ${RUBY_VER:S/.//}${RUBY_R}.
+# RUBY_SUFFIX - Suffix for ruby binaries and directories (${RUBY_VER:S/.//}${RUBY_R}).
# RUBY_WITHOUT_SUFFIX - Always ${LOCALBASE}/bin/ruby.
-# RUBY_WITH_SUFFIX - Always ${RUBY_WITHOUT_SUFFIX}${_RUBY_SUFFIX}.
+# RUBY_WITH_SUFFIX - Always ${RUBY_WITHOUT_SUFFIX}${RUBY_SUFFIX}.
# RUBY_NAME - Ruby's name with trailing suffix.
#
# RUBY_MODNAME - Set to the module name (default: ${PORTNAME}).
@@ -97,11 +96,7 @@ Ruby_Include_MAINTAINER= knu@FreeBSD.org
# RUBY_ELISPDIR - Installation path for emacs lisp files.
#
-.if ${ARCH} == alpha || ${ARCH} == sparc64 || ${ARCH} == amd64 || ${ARCH} == ia64
RUBY_DEFAULT_VER?= 1.8
-.else
-RUBY_DEFAULT_VER?= 1.6
-.endif
RUBY_VER?= ${RUBY_DEFAULT_VER}
@@ -169,18 +164,12 @@ RUBY_WRKSRC?= ${WRKDIR}/${RUBY_DISTNAME}
RUBY_VERSION_CODE?= ${RUBY_VERSION:S/.//g}
RUBY_VER= ${RUBY_VERSION:R}
-_RUBY_SUFFIX= ${RUBY_VER:S/.//}${RUBY_R}
-
-.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
-RUBY_SUFFIX?= ${RUBY_R}
-.else
-RUBY_SUFFIX?= ${_RUBY_SUFFIX}
-.endif
+RUBY_SUFFIX= ${RUBY_VER:S/.//}${RUBY_R}
RUBY_WITHOUT_SUFFIX?= ${LOCALBASE}/bin/ruby
-RUBY_WITH_SUFFIX?= ${RUBY_WITHOUT_SUFFIX}${_RUBY_SUFFIX}
+RUBY_WITH_SUFFIX?= ${RUBY_WITHOUT_SUFFIX}${RUBY_SUFFIX}
-RUBY_PKGNAMEPREFIX?= ruby${RUBY_SUFFIX}- # could be rb${RUBY_SUFFIX}-
+RUBY_PKGNAMEPREFIX?= ruby${RUBY_SUFFIX}-
RUBY_SHLIBVER?= ${RUBY_VER:S/.//}
RUBY_CONFIGURE_ARGS+= --program-prefix=""
@@ -199,9 +188,7 @@ RUBY_CONFIGURE_ARGS+= --with-libc_r=no
RUBY_R= # none
.endif
-.if !empty(RUBY_SUFFIX)
RUBY_CONFIGURE_ARGS+= --program-suffix="${RUBY_SUFFIX}"
-.endif
RUBY_MODNAME?= ${PORTNAME}
@@ -250,19 +237,24 @@ PLIST_SUB+= RUBY_VERSION="${RUBY_VERSION}" \
RUBY_VER="${RUBY_VER}" \
RUBY_SHLIBVER="${RUBY_SHLIBVER}" \
RUBY_ARCH="${RUBY_ARCH}" \
- _RUBY_SUFFIX="${_RUBY_SUFFIX}" \
RUBY_SUFFIX="${RUBY_SUFFIX}" \
RUBY_NAME="${RUBY_NAME}" \
RUBY_R="${RUBY_R}" \
RUBY_DEFAULT_SUFFIX="${RUBY_DEFAULT_SUFFIX}" \
${PLIST_RUBY_DIRS:S,DIR="${LOCALBASE}/,DIR=",}
-.if ${RUBY_VER} >= 1.8
-PLIST_SUB+= RUBY18_ONLY=""
-.else
-PLIST_SUB+= RUBY18_ONLY="@comment "
+.if ${RUBY_VER} >= 1.7
+RUBY18_ONLY= ""
+.elif ${RUBY_VER} >= 1.6
+RUBY16_ONLY= ""
.endif
+RUBY16_ONLY?= "@comment "
+RUBY18_ONLY?= "@comment "
+
+PLIST_SUB+= RUBY16_ONLY=${RUBY16_ONLY} \
+ RUBY18_ONLY=${RUBY18_ONLY}
+
# require check
.if defined(RUBY_REQUIRE)
USE_RUBY= yes
diff --git a/lang/ruby16-shim-ruby18/Makefile b/lang/ruby16-shim-ruby18/Makefile
index 292afe44110d..eac37967966c 100644
--- a/lang/ruby16-shim-ruby18/Makefile
+++ b/lang/ruby16-shim-ruby18/Makefile
@@ -50,7 +50,7 @@ pre-install:
post-install:
.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
for f in ${INSTALLED_SCRIPTS}; do \
- ${LN} -f $${f}${RUBY_R} $${f}${_RUBY_SUFFIX}; \
+ ${LN} -f $${f}${RUBY_SUFFIX} $${f}${RUBY_R}; \
done
.endif
diff --git a/lang/ruby16-shim-ruby18/pkg-plist b/lang/ruby16-shim-ruby18/pkg-plist
index 8f9e1edbe966..60e87b19803e 100644
--- a/lang/ruby16-shim-ruby18/pkg-plist
+++ b/lang/ruby16-shim-ruby18/pkg-plist
@@ -1,9 +1,9 @@
%%IF_DEFAULT%%bin/erb%%RUBY_R%%
-bin/erb%%_RUBY_SUFFIX%%
+bin/erb%%RUBY_SUFFIX%%
%%IF_DEFAULT%%bin/h2rb%%RUBY_R%%
-bin/h2rb%%_RUBY_SUFFIX%%
+bin/h2rb%%RUBY_SUFFIX%%
%%IF_DEFAULT%%bin/rdoc%%RUBY_R%%
-bin/rdoc%%_RUBY_SUFFIX%%
+bin/rdoc%%RUBY_SUFFIX%%
@comment features/ruby18
%%RUBY_SITEARCHLIBDIR%%/features/ruby18/file_ruby18.so
%%RUBY_SITEARCHLIBDIR%%/features/ruby18/io_ruby18.so
diff --git a/lang/ruby16/Makefile b/lang/ruby16/Makefile
index b2b3679a12fe..c87b5ef388df 100644
--- a/lang/ruby16/Makefile
+++ b/lang/ruby16/Makefile
@@ -7,6 +7,7 @@
PORTNAME= ruby${RUBY_R}
PORTVERSION= ${RUBY_PORTVERSION}
+PORTREVISION= 1
CATEGORIES= lang ruby ipv6
MASTER_SITES= ${MASTER_SITE_RUBY}
MASTER_SITE_SUBDIR= ${MASTER_SITE_SUBDIR_RUBY}
@@ -56,7 +57,7 @@ STRIP= # none
.endif
INSTALLS_SHLIB= yes
-MAN1= ruby${_RUBY_SUFFIX}.1
+MAN1= ${RUBY_NAME}.1
.include <bsd.port.pre.mk>
@@ -67,7 +68,7 @@ CONFIGURE_ARGS+= --enable-ipv6
.endif
.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
-MLINKS= ruby${_RUBY_SUFFIX}.1 ruby${RUBY_R}.1
+MLINKS= ${RUBY_NAME}.1 ruby${RUBY_R}.1
IF_DEFAULT= ""
.else
IF_DEFAULT= "@comment "
@@ -114,10 +115,10 @@ post-install:
.endif
.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
# Link just installed "ruby" to "ruby16", etc.
- ${LN} -f ${RUBY_WITHOUT_SUFFIX}${RUBY_R} ${RUBY_WITH_SUFFIX}
- ${LN} -f ${PREFIX}/man/man1/ruby${RUBY_R}.1 ${PREFIX}/man/man1/ruby${_RUBY_SUFFIX}.1
+ ${LN} -f ${RUBY_WITH_SUFFIX} ${RUBY_WITHOUT_SUFFIX}${RUBY_R}
+ ${LN} -f ${PREFIX}/man/man1/${RUBY_NAME}.1 ${PREFIX}/man/man1/ruby${RUBY_R}.1
for f in ${INSTALLED_SCRIPTS}; do \
- ${LN} -f $${f}${RUBY_R} $${f}${_RUBY_SUFFIX}; \
+ ${LN} -f $${f}${RUBY_SUFFIX} $${f}${RUBY_R}; \
done
.endif
${LDCONFIG} -m ${PREFIX}/lib
diff --git a/lang/ruby16/pkg-plist b/lang/ruby16/pkg-plist
index f1d200a04290..ece180bb53e8 100644
--- a/lang/ruby16/pkg-plist
+++ b/lang/ruby16/pkg-plist
@@ -1,7 +1,7 @@
%%IF_DEFAULT%%bin/irb%%RUBY_R%%
-bin/irb%%_RUBY_SUFFIX%%
+bin/irb%%RUBY_SUFFIX%%
%%IF_DEFAULT%%bin/ruby%%RUBY_R%%
-bin/ruby%%_RUBY_SUFFIX%%
+bin/ruby%%RUBY_SUFFIX%%
lib/lib%%RUBY_NAME%%.so
lib/lib%%RUBY_NAME%%.so.%%RUBY_SHLIBVER%%
%%RUBY_ARCHLIBDIR%%/config.h
diff --git a/lang/ruby16_static/Makefile b/lang/ruby16_static/Makefile
index f53a67d07e0f..5e42cc3efecb 100644
--- a/lang/ruby16_static/Makefile
+++ b/lang/ruby16_static/Makefile
@@ -7,7 +7,7 @@
PORTNAME= ruby_static
PORTVERSION= ${RUBY_PORTVERSION}
-PORTREVISION?= 0
+PORTREVISION?= 1
CATEGORIES= lang ruby ipv6
MASTER_SITES= # none
DISTFILES= # none
@@ -128,7 +128,7 @@ do-extract:
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/${RUBY_NAME} ${RUBY_WITH_SUFFIX}_s
.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
- ${LN} -fs ruby${_RUBY_SUFFIX}_s ${RUBY_WITHOUT_SUFFIX}_s
+ ${LN} -fs ${RUBY_NAME}_s ${RUBY_WITHOUT_SUFFIX}_s
.endif
.include <bsd.port.post.mk>
diff --git a/lang/ruby16_static/pkg-plist b/lang/ruby16_static/pkg-plist
index e8e4eb369d6f..68ba1db162d4 100644
--- a/lang/ruby16_static/pkg-plist
+++ b/lang/ruby16_static/pkg-plist
@@ -1,2 +1,2 @@
%%IF_DEFAULT%%bin/ruby_s
-bin/ruby%%_RUBY_SUFFIX%%_s
+bin/ruby%%RUBY_SUFFIX%%_s
diff --git a/lang/ruby18/Makefile b/lang/ruby18/Makefile
index ca18bc1447d0..5e352c21b0f5 100644
--- a/lang/ruby18/Makefile
+++ b/lang/ruby18/Makefile
@@ -7,7 +7,7 @@
PORTNAME= ruby${RUBY_R}
PORTVERSION= ${RUBY_PORTVERSION}
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= lang ruby ipv6
MASTER_SITES= ${MASTER_SITE_RUBY}
MASTER_SITE_SUBDIR= ${MASTER_SITE_SUBDIR_RUBY}
@@ -53,7 +53,7 @@ STRIP= # none
.endif
INSTALLS_SHLIB= yes
-MAN1= ruby${_RUBY_SUFFIX}.1
+MAN1= ${RUBY_NAME}.1
LATEST_LINK= ruby-devel
@@ -66,7 +66,7 @@ CONFIGURE_ARGS+= --enable-ipv6
.endif
.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
-MLINKS= ruby${_RUBY_SUFFIX}.1 ruby${RUBY_R}.1
+MLINKS= ${RUBY_NAME}.1 ruby${RUBY_R}.1
IF_DEFAULT= ""
.else
IF_DEFAULT= "@comment "
@@ -141,10 +141,10 @@ post-install:
.endif
.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
# Link just installed "ruby" to "ruby18", etc.
- ${LN} -f ${RUBY_WITHOUT_SUFFIX}${RUBY_R} ${RUBY_WITH_SUFFIX}
- ${LN} -f ${PREFIX}/man/man1/ruby${RUBY_R}.1 ${PREFIX}/man/man1/ruby${_RUBY_SUFFIX}.1
+ ${LN} -f ${RUBY_WITH_SUFFIX} ${RUBY_WITHOUT_SUFFIX}${RUBY_R}
+ ${LN} -f ${PREFIX}/man/man1/${RUBY_NAME}.1 ${PREFIX}/man/man1/ruby${RUBY_R}.1
for f in ${INSTALLED_SCRIPTS}; do \
- ${LN} -f $${f}${RUBY_R} $${f}${_RUBY_SUFFIX}; \
+ ${LN} -f $${f}${RUBY_SUFFIX} $${f}${RUBY_R}; \
done
.endif
${LDCONFIG} -m ${PREFIX}/lib
diff --git a/lang/ruby18/pkg-plist b/lang/ruby18/pkg-plist
index 80c48e78faae..04b57386b200 100644
--- a/lang/ruby18/pkg-plist
+++ b/lang/ruby18/pkg-plist
@@ -1,17 +1,17 @@
%%IF_DEFAULT%%bin/erb%%RUBY_R%%
-bin/erb%%_RUBY_SUFFIX%%
+bin/erb%%RUBY_SUFFIX%%
%%IF_DEFAULT%%bin/h2rb%%RUBY_R%%
-bin/h2rb%%_RUBY_SUFFIX%%
+bin/h2rb%%RUBY_SUFFIX%%
%%IF_DEFAULT%%bin/irb%%RUBY_R%%
-bin/irb%%_RUBY_SUFFIX%%
+bin/irb%%RUBY_SUFFIX%%
%%IF_DEFAULT%%bin/rdoc%%RUBY_R%%
-bin/rdoc%%_RUBY_SUFFIX%%
+bin/rdoc%%RUBY_SUFFIX%%
%%IF_DEFAULT%%bin/ri%%RUBY_R%%
-bin/ri%%_RUBY_SUFFIX%%
+bin/ri%%RUBY_SUFFIX%%
%%IF_DEFAULT%%bin/ruby%%RUBY_R%%
-bin/ruby%%_RUBY_SUFFIX%%
+bin/ruby%%RUBY_SUFFIX%%
%%IF_DEFAULT%%bin/testrb%%RUBY_R%%
-bin/testrb%%_RUBY_SUFFIX%%
+bin/testrb%%RUBY_SUFFIX%%
lib/lib%%RUBY_NAME%%-static.a
lib/lib%%RUBY_NAME%%.so
lib/lib%%RUBY_NAME%%.so.%%RUBY_SHLIBVER%%