pkgsrc-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[pkgsrc/trunk]: pkgsrc/lang/ruby Start of updating Ruby to 1.8.7.
details: https://anonhg.NetBSD.org/pkgsrc/rev/02dfe907166d
branches: trunk
changeset: 543470:02dfe907166d
user: taca <taca%pkgsrc.org@localhost>
date: Thu Jun 19 14:30:45 2008 +0000
description:
Start of updating Ruby to 1.8.7.
* Update RUBY18_VERSION to 1.8.7 and RUBY18_PATCHLEVEL to 17.
* Use vendor_ruby instead for site_ruby.
* Introduce macros for relative path and use them instead of old absolete
path.
RUBY_LIB lib/ruby/${RUBY_VER_DIR}
RUBY_ARCHLIB ${RUBY_LIB}/${RUBY_ARCH}
RUBY_SITELIB_BASE lib/ruby/site_ruby
RUBY_SITELIB ${RUBY_SITELIB_BASE}/${RUBY_VER_DIR}
RUBY_SITEARCHLIB ${RUBY_SITELIB}/${RUBY_ARCH}
RUBY_VENDORLIB_BASE lib/ruby/vendor_ruby
RUBY_VENDORLIB ${RUBY_VENDORLIB_BASE}/${RUBY_VER_DIR}
RUBY_VENDORARCHLIB ${RUBY_VENDORLIB}/${RUBY_ARCH}
RUBY_DOC share/doc/${RUBY_NAME}
RUBY_EG share/examples/${RUBY_NAME}
Old these macros are removed after 2008Q2 branch.
RUBY_LIBDIR
RUBY_ARCHLIBDIR
RUBY_SITELIBDIR
RUBY_SITEARCHLIBDIR
RUBY_VENDORLIBDIR
RUBY_VENDORARCHLIBDIR
RUBY_DOCDIR
RUBY_EXAMPLESDIR
* update PRINT_PLIST_AWK macro to reality and move some of them from
ruby/modules.mk to ruby/rubyversion.mk.
diffstat:
lang/ruby/modules.mk | 38 +++++++----------
lang/ruby/rubyversion.mk | 99 +++++++++++++++++++++++++++++++++++++++++++----
2 files changed, 105 insertions(+), 32 deletions(-)
diffs (211 lines):
diff -r e1e9ced674d6 -r 02dfe907166d lang/ruby/modules.mk
--- a/lang/ruby/modules.mk Thu Jun 19 14:10:16 2008 +0000
+++ b/lang/ruby/modules.mk Thu Jun 19 14:30:45 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: modules.mk,v 1.22 2008/03/12 03:18:47 jlam Exp $
+# $NetBSD: modules.mk,v 1.23 2008/06/19 14:30:45 taca Exp $
.if !defined(_RUBY_MODULE_MK)
_RUBY_MODULE_MK= # defined
@@ -26,7 +26,8 @@
RUBY_EXTCONF?= extconf.rb
INSTALL_TARGET?= site-install
-CONFIGURE_ARGS+= --with-opt-dir=${PREFIX:Q}
+CONFIGURE_ARGS+= ${RUBY_EXTCONF_ARGS}
+RUBY_EXTCONF_ARGS?= --with-opt-dir=${PREFIX:Q} --vendor
RUBY_EXTCONF_CHECK?= yes
RUBY_EXTCONF_MAKEFILE?= Makefile
@@ -128,6 +129,15 @@
RUBY_SIMPLE_INSTALL?= install.rb
INSTALL_TARGET?= # empty
+SUBST_CLASSES+= rinstall
+SUBST_STAGE.rinstall= pre-install
+SUBST_FILES.rinstall= ${RUBY_SIMPLE_INSTALL}
+SUBST_SED.rinstall= -e "s|'sitedir'|'vendordir'|g"
+SUBST_SED.rinstall+= -e "s|'sitelibdir'|'vendorlibdir'|g"
+SUBST_SED.rinstall+= -e 's|"sitelibdir"|"vendorlibdir"|g'
+SUBST_SED.rinstall+= -e 's|/site_ruby/|/vendor_ruby/|g'
+SUBST_MESSAGE.rinstall= Fixing ${RUBY_SIMPLE_INSTALL} files.
+
.if !target(do-install)
do-install: ruby-simple-install
@@ -140,29 +150,13 @@
.include "replace.mk"
-PRINT_PLIST_AWK+= /^@dirrm lib\/ruby$$/ { next; }
-PRINT_PLIST_AWK+= /^@dirrm lib\/ruby\/site_ruby$$/ { next; }
-PRINT_PLIST_AWK+= /\.${RUBY_DLEXT}$$/ \
- { gsub(/${RUBY_DLEXT}$$/, "$${RUBY_DLEXT}") }
-PRINT_PLIST_AWK+= /^@dirrm ${RUBY_SITEARCHLIBDIR:S|${PREFIX}/||:S|/|\\/|g}$$/ \
+PRINT_PLIST_AWK+= /^@dirrm ${RUBY_SITEARCHLIB:S|/|\\/|g}$$/ \
{ next; }
-PRINT_PLIST_AWK+= /^@dirrm ${RUBY_SITELIBDIR:S|${PREFIX}/||:S|/|\\/|g}$$/ \
+PRINT_PLIST_AWK+= /^@dirrm ${RUBY_SITELIB:S|/|\\/|g}$$/ \
{ next; }
-PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_SITEARCHLIBDIR:S|${PREFIX}/||:S|/|\\/|g}/ \
- { gsub(/${RUBY_SITEARCHLIBDIR:S|${PREFIX}/||:S|/|\\/|g}/, "$${RUBY_SITEARCHLIBDIR}"); \
- print; next; }
-PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_SITELIBDIR:S|${PREFIX}/||:S|/|\\/|g}/ \
- { gsub(/${RUBY_SITELIBDIR:S|${PREFIX}/||:S|/|\\/|g}/, "$${RUBY_SITELIBDIR}"); \
- print; next; }
-PRINT_PLIST_AWK+= /^@dirrm ${RUBY_DOCDIR:S|${PREFIX}/||:S|/|\\/|g}$$/ \
+PRINT_PLIST_AWK+= /^@dirrm ${RUBY_VENDORARCHLIB:S|/|\\/|g}$$/ \
{ next; }
-PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_DOCDIR:S|${PREFIX}/||:S|/|\\/|g}/ \
- { gsub(/${RUBY_DOCDIR:S|${PREFIX}/||:S|/|\\/|g}/, "$${RUBY_DOCDIR}"); \
- print; next; }
-PRINT_PLIST_AWK+= /^@dirrm ${RUBY_EXAMPLESDIR:S|${PREFIX}/||:S|/|\\/|g}$$/ \
+PRINT_PLIST_AWK+= /^@dirrm ${RUBY_VENDORLIB:S|/|\\/|g}$$/ \
{ next; }
-PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_EXAMPLESDIR:S|${PREFIX}/||:S|/|\\/|g}/ \
- { gsub(/${RUBY_EXAMPLESDIR:S|${PREFIX}/||:S|/|\\/|g}/, "$${RUBY_EXAMPLESDIR}"); \
- print; next; }
.endif
diff -r e1e9ced674d6 -r 02dfe907166d lang/ruby/rubyversion.mk
--- a/lang/ruby/rubyversion.mk Thu Jun 19 14:10:16 2008 +0000
+++ b/lang/ruby/rubyversion.mk Thu Jun 19 14:30:45 2008 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: rubyversion.mk,v 1.39 2008/03/21 15:07:28 jlam Exp $
+# $NetBSD: rubyversion.mk,v 1.40 2008/06/19 14:30:45 taca Exp $
#
.if !defined(_RUBYVERSION_MK)
@@ -7,10 +7,10 @@
.include "../../mk/bsd.prefs.mk"
# current supported Ruby's version
-RUBY18_VERSION= 1.8.6
+RUBY18_VERSION= 1.8.7
# patch
-RUBY18_PATCHLEVEL= 114
+RUBY18_PATCHLEVEL= 17
# RUBY_VERSION_DEFAULT defines default version for Ruby related
# packages and user can define in mk.conf. (1.6 or 1.8)
@@ -63,7 +63,9 @@
_RUBY_VER_MAJOR= ${_RUBY_VER:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\1/}
_RUBY_VER_MINOR= ${_RUBY_VER:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\2/}
_RUBY_VER_TEENY= ${_RUBY_VER:C/([0-9]+)\.([0-9]+)\.([0-9]+)/\3/}
+.if !empty(RUBY_PATCH_LEVEL)
_RUBY_PATCHLEVEL= ${RUBY_VERSION:C/(.*-)//}
+.endif
# RUBY_VER defines Ruby base release.
#
@@ -188,12 +190,28 @@
#
# common paths
#
-RUBY_LIBDIR?= ${PREFIX}/lib/ruby/${RUBY_VER_DIR}
-RUBY_ARCHLIBDIR?= ${RUBY_LIBDIR}/${RUBY_ARCH}
-RUBY_SITELIBDIR?= ${PREFIX}/lib/ruby/site_ruby/${RUBY_VER_DIR}
-RUBY_SITEARCHLIBDIR?= ${RUBY_SITELIBDIR}/${RUBY_ARCH}
-RUBY_DOCDIR?= ${PREFIX}/share/doc/${RUBY_NAME}
-RUBY_EXAMPLESDIR?= ${PREFIX}/share/examples/${RUBY_NAME}
+RUBY_LIB?= lib/ruby/${RUBY_VER_DIR}
+RUBY_ARCHLIB?= ${RUBY_LIB}/${RUBY_ARCH}
+RUBY_SITELIB_BASE?= lib/ruby/site_ruby
+RUBY_SITELIB?= ${RUBY_SITELIB_BASE}/${RUBY_VER_DIR}
+RUBY_SITEARCHLIB?= ${RUBY_SITELIB}/${RUBY_ARCH}
+RUBY_VENDORLIB_BASE?= lib/ruby/vendor_ruby
+RUBY_VENDORLIB?= ${RUBY_VENDORLIB_BASE}/${RUBY_VER_DIR}
+RUBY_VENDORARCHLIB?= ${RUBY_VENDORLIB}/${RUBY_ARCH}
+RUBY_DOC?= share/doc/${RUBY_NAME}
+RUBY_EG?= share/examples/${RUBY_NAME}
+
+#
+# These will be discontinued in near future.
+#
+RUBY_LIBDIR= ${PREFIX}/${RUBY_LIB}
+RUBY_ARCHLIBDIR= ${PREFIX}/${RUBY_ARCHLIB}
+RUBY_SITELIBDIR= ${PREFIX}/${RUBY_SITELIB}
+RUBY_SITEARCHLIBDIR= ${PREFIX}/${RUBY_SITEARCHLIB}
+RUBY_VENDORLIBDIR= ${PREFIX}/${RUBY_VENDORLIB}
+RUBY_VENDORARCHLIBDIR= ${PREFIX}/${RUBY_VENDORARCHLIB}
+RUBY_DOCDIR= ${PREFIX}/${RUBY_DOC}
+RUBY_EXAMPLESDIR= ${PREFIX}/${RUBY_EG}
#
# ri database relative path
@@ -215,7 +233,17 @@
# PLIST
#
-PLIST_RUBY_DIRS= RUBY_LIBDIR="${RUBY_LIBDIR}" \
+PLIST_RUBY_DIRS= RUBY_LIB="${RUBY_LIB}" \
+ RUBY_ARCHLIB="${RUBY_ARCHLIB}" \
+ RUBY_SITELIB_BASE=${RUBY_SITELIB_BASE:Q} \
+ RUBY_SITELIB="${RUBY_SITELIB}" \
+ RUBY_SITEARCHLIB="${RUBY_SITEARCHLIB}" \
+ RUBY_VENDORLIB_BASE=${RUBY_VENDORLIB_BASE:Q} \
+ RUBY_VENDORLIB=${RUBY_VENDORLIB:Q} \
+ RUBY_VENDORARCHLIB=${RUBY_VENDORARCHLIB:Q} \
+ RUBY_DOC="${RUBY_DOC}" \
+ RUBY_EG="${RUBY_EG}" \
+ RUBY_LIBDIR="${RUBY_LIBDIR}" \
RUBY_ARCHLIBDIR="${RUBY_ARCHLIBDIR}" \
RUBY_SITELIBDIR="${RUBY_SITELIBDIR}" \
RUBY_SITEARCHLIBDIR="${RUBY_SITEARCHLIBDIR}" \
@@ -293,4 +321,55 @@
.include "../../mk/dlopen.buildlink3.mk"
.endif
+PRINT_PLIST_AWK+= /\.${RUBY_DLEXT}$$/ \
+ { gsub(/${RUBY_DLEXT}$$/, "$${RUBY_DLEXT}") }
+PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_ARCHLIB:S|/|\\/|g}/ \
+ { gsub(/${RUBY_ARCHLIB:S|/|\\/|g}/, "$${RUBY_ARCHLIB}"); \
+ print; next; }
+PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_VENDORARCHLIB:S|/|\\/|g}/ \
+ { gsub(/${RUBY_VENDORARCHLIB:S|/|\\/|g}/, "$${RUBY_VENDORARCHLIB}"); \
+ print; next; }
+PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_VENDORLIB:S|/|\\/|g}/ \
+ { gsub(/${RUBY_VENDORLIB:S|/|\\/|g}/, "$${RUBY_VENDORLIB}"); \
+ print; next; }
+PRINT_PLIST_AWK+= /^@dirrm ${RUBY_SITEARCHLIB:S|/|\\/|g}$$/ \
+ { next; }
+PRINT_PLIST_AWK+= /^@dirrm ${RUBY_SITELIB:S|/|\\/|g}$$/ \
+ { next; }
+PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_SITEARCHLIB:S|/|\\/|g}/ \
+ { gsub(/${RUBY_SITEARCHLIB:S|/|\\/|g}/, "$${RUBY_SITEARCHLIB}"); \
+ print; next; }
+PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_SITELIB:S|/|\\/|g}/ \
+ { gsub(/${RUBY_SITELIB:S|/|\\/|g}/, "$${RUBY_SITELIB}"); \
+ print; next; }
+PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_SITELIB_BASE:S|/|\\/|g}$$/ \
+ { gsub(/${RUBY_SITELIB_BASE:S|/|\\/|g}/, "$${RUBY_SITELIB_BASE}"); \
+ print; next; }
+PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_VENDORLIB_BASE:S|/|\\/|g}$$/ \
+ { gsub(/${RUBY_VENDORLIB_BASE:S|/|\\/|g}/, "$${RUBY_VENDORLIB_BASE}"); \
+ print; next; }
+PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_LIB:S|/|\\/|g}/ \
+ { gsub(/${RUBY_LIB:S|/|\\/|g}/, "$${RUBY_LIB}"); \
+ print; next; }
+PRINT_PLIST_AWK+= /^@dirrm ${RUBY_DOC:S|/|\\/|g}$$/ \
+ { next; }
+PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_DOC:S|/|\\/|g}/ \
+ { gsub(/${RUBY_DOC:S|/|\\/|g}/, "$${RUBY_DOC}"); \
+ print; next; }
+PRINT_PLIST_AWK+= /^@dirrm ${RUBY_EG:S|/|\\/|g}$$/ \
+ { next; }
+PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_EG:S|/|\\/|g}/ \
+ { gsub(/${RUBY_EG:S|/|\\/|g}/, "$${RUBY_EG}"); \
+ print; next; }
+PRINT_PLIST_AWK+= /^@dirrm ${RUBY_SITERIDIR:S|/|\\/|g}$$/ \
+ { next; }
+PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_SITERIDIR:S|/|\\/|g}/ \
+ { gsub(/${RUBY_SITERIDIR:S|/|\\/|g}/, "$${RUBY_SITERIDIR}"); \
+ print; next; }
+PRINT_PLIST_AWK+= /^@dirrm ${RUBY_SYSRIDIR:S|/|\\/|g}$$/ \
+ { next; }
+PRINT_PLIST_AWK+= /^(@dirrm )?${RUBY_SYSRIDIR:S|/|\\/|g}/ \
+ { gsub(/${RUBY_SYSRIDIR:S|/|\\/|g}/, "$${RUBY_SYSRIDIR}"); \
+ print; next; }
+
.endif # _RUBY_MK
Home |
Main Index |
Thread Index |
Old Index