Add ruby21-base, base of Ruby 2.1.1. Ruby 2.1.1 is second release of
Ruby 2.1, post release of Ruby 2.0. *WARNING!* Not all of ruby pkgsrc are supported yet. Ruby 2.1 has many improvements including speedup without severe incompatibilities. You can use this on Rails and other applications, and get a more comfortable experience. This release includes many bugfixes. See tickets and ChangeLog for details. Following the previously announced changed versioning policy of Ruby 2.1, this version is simply called ¡È2.1.1¡É. Update: We¡Çve noticed a regression in Hash#reject. For more details, see: Regression of Hash#reject in Ruby 2.1.1.
This commit is contained in:
parent
ce7ab79180
commit
2f72af218d
33 changed files with 2168 additions and 0 deletions
6
lang/ruby21-base/ALTERNATIVES
Normal file
6
lang/ruby21-base/ALTERNATIVES
Normal file
|
@ -0,0 +1,6 @@
|
|||
bin/erb @PREFIX@/bin/erb@RUBY_SUFFIX@
|
||||
bin/gem @PREFIX@/bin/gem@RUBY_SUFFIX@
|
||||
bin/irb @PREFIX@/bin/irb@RUBY_SUFFIX@
|
||||
bin/rake @PREFIX@/bin/rake@RUBY_SUFFIX@
|
||||
bin/ruby @PREFIX@/bin/@RUBY_NAME@
|
||||
bin/testrb @PREFIX@/bin/testrb@RUBY_SUFFIX@
|
14
lang/ruby21-base/DEINSTALL
Normal file
14
lang/ruby21-base/DEINSTALL
Normal file
|
@ -0,0 +1,14 @@
|
|||
# $NetBSD: DEINSTALL,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
RUBY_GEM_BASE="${PREFIX}/@RUBY_GEM_BASE@"
|
||||
RUBY_SITERIDIR="${PREFIX}/@RUBY_SITERIDIR@"
|
||||
|
||||
case ${STAGE} in
|
||||
DEINSTALL)
|
||||
${RM} -f ${RUBY_SITERIDIR}/created.rid
|
||||
;;
|
||||
POST-DEINSTALL)
|
||||
${RM} -rf ${GEM_HOME}
|
||||
${RMDIR} ${RUBY_GEM_BASE} 2>/dev/null || true
|
||||
;;
|
||||
esac
|
19
lang/ruby21-base/DESCR
Normal file
19
lang/ruby21-base/DESCR
Normal file
|
@ -0,0 +1,19 @@
|
|||
Ruby is the interpreted scripting language for quick and
|
||||
easy object-oriented programming. It has many features to
|
||||
process text files and to do system management tasks (as in
|
||||
Perl). It is simple, straight-forward, and extensible.
|
||||
|
||||
Features of Ruby are shown below.
|
||||
|
||||
+ Simple Syntax
|
||||
+ *Normal* Object-Oriented features (ex. class, method calls)
|
||||
+ *Advanced* Object-Oriented features (ex. Mix-in, Singleton-method)
|
||||
+ Operator Overloading
|
||||
+ Exception Handling
|
||||
+ Iterators and Closures
|
||||
+ Garbage Collection
|
||||
+ Dynamic Loading of Object files (on some architecture)
|
||||
+ Highly Portable (works on many UNIX machines, and on DOS,
|
||||
Windows, Mac, BeOS etc.)
|
||||
|
||||
This package is Ruby 2.1.0 release minimum base package.
|
14
lang/ruby21-base/INSTALL
Normal file
14
lang/ruby21-base/INSTALL
Normal file
|
@ -0,0 +1,14 @@
|
|||
# $NetBSD: INSTALL,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
DATE="@DATE@"
|
||||
RUBY_SITERIDIR="${PREFIX}/@RUBY_SITERIDIR@"
|
||||
rid="${RUBY_SITERIDIR}/created.rid"
|
||||
|
||||
case ${STAGE} in
|
||||
POST-INSTALL)
|
||||
if [ -d ${RUBY_SITERIDIR} ]; then
|
||||
${DATE} > ${rid}
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
|
14
lang/ruby21-base/MESSAGE
Normal file
14
lang/ruby21-base/MESSAGE
Normal file
|
@ -0,0 +1,14 @@
|
|||
===========================================================================
|
||||
$NetBSD: MESSAGE,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
Note that this is a minimal package.
|
||||
|
||||
The original ${RUBY_DISTNAME} distribution includes more extension
|
||||
libraries, some of which are provided as separate packages:
|
||||
|
||||
databases/ruby-gdbm: GDBM module
|
||||
devel/ruby-fiddle: Fiddle module
|
||||
devel/ruby-readline: readline module
|
||||
x11/ruby-tk: Tk modules
|
||||
|
||||
===========================================================================
|
183
lang/ruby21-base/Makefile
Normal file
183
lang/ruby21-base/Makefile
Normal file
|
@ -0,0 +1,183 @@
|
|||
# $NetBSD: Makefile,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
#
|
||||
|
||||
DISTNAME= ${RUBY_DISTNAME}
|
||||
PKGNAME= ${RUBY_PKGPREFIX}-base-${RUBY_VERSION_FULL}
|
||||
CATEGORIES= lang ruby
|
||||
MASTER_SITES= ${MASTER_SITE_RUBY}
|
||||
|
||||
MAINTAINER= taca@NetBSD.org
|
||||
HOMEPAGE= ${RUBY_HOMEPAGE}
|
||||
COMMENT= Ruby ${RUBY_VERSION} release minimum base package
|
||||
LICENSE= ${RUBY_LICENSE}
|
||||
|
||||
RUBY_VERSION_SUPPORTED= 21
|
||||
|
||||
MAKE_JOBS_SAFE= no
|
||||
USE_LANGUAGES= c
|
||||
USE_TOOLS+= pax yacc
|
||||
GNU_CONFIGURE= yes
|
||||
TEST_TARGET= test
|
||||
CONFIGURE_ARGS+= --enable-shared
|
||||
WRKSRC= ${RUBY_WRKSRC}
|
||||
|
||||
MAKE_DIRS= ${RUBY_SITEARCHLIB} ${RUBY_VENDORARCHLIB}
|
||||
|
||||
#
|
||||
# Don't refrect pkgsrc's INSTALL macro since Ruby expect it could
|
||||
# execute by unprivileged user.
|
||||
#
|
||||
CONFIGURE_ENV+= INSTALL="${INSTALL} ${COPY}" \
|
||||
INSTALL_DATA= INSTALL_PROGRAM= INSTALL_SCRIPT=
|
||||
|
||||
.include "../../mk/compiler.mk"
|
||||
|
||||
.if !empty(PKGSRC_COMPILER:Msunpro)
|
||||
LIBS.SunOS+= -B static -lsunmath -B dynamic -lm
|
||||
LDFLAGS.SunOS+= -L${SUNWSPROBASE}/lib -Wl,-R${SUNWSPROBASE}/lib
|
||||
CONFIGURE_ENV+= LDSHARED="${CC} -G"
|
||||
.else
|
||||
LIBS.SunOS+= -lm
|
||||
.endif
|
||||
|
||||
.if ${OPSYS} == "SunOS"
|
||||
CONFIGURE_ENV+= OBJCOPY=:
|
||||
CONFIGURE_ENV+= ac_cv_prog_PKG_CONFIG=""
|
||||
.endif
|
||||
|
||||
.if ${OPSYS} == "MirBSD"
|
||||
# if present, an unsupported sysconf call is used
|
||||
CONFIGURE_ENV+= ac_cv_func_getgrnam_r=no
|
||||
.endif
|
||||
|
||||
.if ${OPSYS} == "Cygwin"
|
||||
USE_TOOLS+= gmake
|
||||
MAKE_FILE= GNUmakefile
|
||||
.endif
|
||||
|
||||
# Ruby build process depends on config.status's content
|
||||
CONFIG_STATUS_OVERRIDE= # empty
|
||||
|
||||
MAKE_DIRS+= ${RUBY_SITERIDIR}
|
||||
FILES_SUBST+= DATE=${DATE:Q}
|
||||
|
||||
REQD_DIRS+= ${GEM_HOME}/cache
|
||||
REQD_DIRS+= ${GEM_HOME}/doc
|
||||
|
||||
SUBST_CLASSES+= conf
|
||||
SUBST_STAGE.conf= pre-install
|
||||
SUBST_FILES.conf= lib/rubygems/config_file.rb
|
||||
SUBST_SED.conf= -e "s|@PKG_SYSCONFDIR@|${PKG_SYSCONFDIR}|g"
|
||||
SUBST_MESSAGE.conf= Fixing configuration files.
|
||||
|
||||
.include "options.mk"
|
||||
|
||||
.include "../../lang/ruby/rubyversion.mk"
|
||||
|
||||
.if !empty(RUBY_SUFFIX)
|
||||
CONFIGURE_ARGS+= --program-suffix=${RUBY_SUFFIX}
|
||||
CONFIGURE_ARGS+= --with-soname=${RUBY_NAME}
|
||||
CONFIGURE_ARGS+= --with-ruby-version=${RUBY_VERSION}
|
||||
CONFIGURE_ARGS+= --with-ruby-pc="ruby-${RUBY_VERSION}.pc"
|
||||
.endif
|
||||
|
||||
#
|
||||
# Ruby 2.0 don't like Apple's builtin OpenSSL.
|
||||
#
|
||||
.if ${OPSYS} == "Darwin"
|
||||
USE_BUILTIN.openssl= no
|
||||
.endif
|
||||
|
||||
#
|
||||
# Win32 support (for Cygwin)
|
||||
#
|
||||
PLIST_VARS+= win32
|
||||
.if ${OPSYS} == "Cygwin"
|
||||
PLIST.win32= yes
|
||||
.endif
|
||||
|
||||
#
|
||||
# IRIX work around which should be fixed.
|
||||
#
|
||||
PLIST_VARS+= io
|
||||
.if ${OPSYS} != "IRIX"
|
||||
PLIST.io= yes
|
||||
.endif
|
||||
|
||||
#
|
||||
# Work around for getucontext(3)
|
||||
#
|
||||
.if ${OPSYS} == "DragonFly" && ${OS_VERSION} == "1.8.0"
|
||||
CONFIGURE_ENV+= ac_cv_header_ucontext_h=no
|
||||
.endif
|
||||
|
||||
#
|
||||
# prevent unwanted mkdir recorded in rbconfig.rb
|
||||
#
|
||||
CONFIGURE_ENV+= MKDIR_P=${MKDIR:Q}
|
||||
|
||||
DOCS= COPYING COPYING.ja ChangeLog NEWS README \
|
||||
README.EXT README.EXT.ja README.ja \
|
||||
doc/ChangeLog-1.8.0 doc/ChangeLog-1.9.3 doc/ChangeLog-YARV \
|
||||
doc/NEWS-1.8.7 doc/NEWS-1.9.1 doc/NEWS-1.9.2 doc/NEWS-1.9.3 \
|
||||
doc/etc.rd.ja doc/forwardable.rd.ja doc/globals.rdoc \
|
||||
doc/irb/irb-tools.rd.ja doc/irb/irb.rd.ja \
|
||||
doc/pty/README.expect.ja doc/pty/README.ja doc/shell.rd.ja
|
||||
EXT_DOCS= syslog/syslog.txt
|
||||
|
||||
BIGDECIMAL_EXAMPLES= linear.rb nlsolve.rb pi.rb
|
||||
OPENSSL_EXAMPLES= c_rehash.rb cert2text.rb certstore.rb cipher.rb \
|
||||
crlstore.rb echo_cli.rb echo_svr.rb gen_csr.rb \
|
||||
smime_read.rb smime_write.rb wget.rb
|
||||
|
||||
REPLACE_RUBY= bin/erb bin/gem bin/irb bin/rake bin/rdoc \
|
||||
bin/ri bin/testrb
|
||||
REPLACE_RUBY_DIRS= ext lib sample
|
||||
INSTALLATION_DIRS= bin ${PKGMANDIR}/man1 \
|
||||
${RUBY_DOC}/irb ${RUBY_DOC}/pty ${RUBY_DOC}/ripper \
|
||||
${RUBY_DOC}/stringio \
|
||||
${RUBY_EG}/bigdecimal ${RUBY_EG}/pty
|
||||
# ${RUBY_ARCHINC} ${RUBY_ARCHLIB}
|
||||
EMPTY_DIRS= generator/template markup/simple_markup
|
||||
|
||||
pre-configure:
|
||||
${RM} -f ${WRKSRC}/ext/gdbm/extconf.rb
|
||||
${RM} -f ${WRKSRC}/ext/fiddle/extconf.rb
|
||||
${RM} -f ${WRKSRC}/ext/readline/extconf.rb
|
||||
${RM} -f ${WRKSRC}/ext/tk/extconf.rb
|
||||
|
||||
pre-install:
|
||||
cd ${WRKSRC}/lib; \
|
||||
${FIND} . \( -name '*.orig' -o -name '*.orig_dist' \) \
|
||||
-exec ${RM} -f {} \;
|
||||
.for f in ${EMPTY_DIRS}
|
||||
${RMDIR} ${WRKSRC}/lib/rdoc/${f} 2>/dev/null || ${TRUE}
|
||||
.endfor
|
||||
|
||||
post-install:
|
||||
.for f in ${DOCS}
|
||||
${INSTALL_DATA} ${WRKSRC}/${f} ${DESTDIR}${PREFIX}/${RUBY_DOC}/${f:C/^doc\///}
|
||||
.endfor
|
||||
.for f in ${EXT_DOCS}
|
||||
${INSTALL_DATA} ${WRKSRC}/ext/${f} ${DESTDIR}${PREFIX}/${RUBY_DOC}
|
||||
.endfor
|
||||
cd ${WRKSRC}/ext/ripper; ${PAX} -rw README ${DESTDIR}${PREFIX}/${RUBY_DOC}/ripper
|
||||
cd ${WRKSRC}/ext/stringio; ${PAX} -rw README ${DESTDIR}${PREFIX}/${RUBY_DOC}/stringio
|
||||
cd ${WRKSRC}/sample; ${PAX} -rw . ${DESTDIR}${PREFIX}/${RUBY_EG}
|
||||
.for f in ${BIGDECIMAL_EXAMPLES}
|
||||
${INSTALL_DATA} ${RUBY_WRKSRC}/ext/bigdecimal/sample/${f} \
|
||||
${DESTDIR}${PREFIX}/${RUBY_EG}/bigdecimal
|
||||
.endfor
|
||||
.for f in ${OPENSSL_EXAMPLES}
|
||||
${INSTALL_DATA} ${RUBY_WRKSRC}/sample/openssl/${f} \
|
||||
${DESTDIR}${PREFIX}/${RUBY_EG}/openssl
|
||||
.endfor
|
||||
${RUBY_GENERATE_PLIST}
|
||||
|
||||
.include "../../mk/bdb.buildlink3.mk"
|
||||
.include "../../converters/libiconv/buildlink3.mk"
|
||||
.include "../../devel/zlib/buildlink3.mk"
|
||||
.include "../../security/openssl/buildlink3.mk"
|
||||
.include "../../textproc/libyaml/buildlink3.mk"
|
||||
.include "../../lang/ruby/Makefile.common"
|
||||
.include "../../mk/bsd.pkg.mk"
|
1117
lang/ruby21-base/PLIST
Normal file
1117
lang/ruby21-base/PLIST
Normal file
File diff suppressed because it is too large
Load diff
28
lang/ruby21-base/distinfo
Normal file
28
lang/ruby21-base/distinfo
Normal file
|
@ -0,0 +1,28 @@
|
|||
$NetBSD: distinfo,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
SHA1 (ruby-2.1.1.tar.bz2) = a7fd539f64864bc00fc64444d2d814df6c19fd4a
|
||||
RMD160 (ruby-2.1.1.tar.bz2) = b200bb8d1542f79306c5cd0760781ec9dc759998
|
||||
Size (ruby-2.1.1.tar.bz2) = 11990697 bytes
|
||||
SHA1 (patch-configure) = c7ba92b1a142c1b52dc732f8a0a2a0d2803f5dd5
|
||||
SHA1 (patch-ext_dl_extconf.rb) = f6c71db3c3076216c9b5db92692c7c8dad012af0
|
||||
SHA1 (patch-lib_rdoc_ri_driver.rb) = 5bdd3ed6f50a2ea79f643c6bebd7ad0063e79051
|
||||
SHA1 (patch-lib_rubygems.rb) = 9d27fa8c96f285461fbb08df7491a0a48ed612e1
|
||||
SHA1 (patch-lib_rubygems_commands_setup__command.rb) = 46991d63256d0d3cc2f707fb286d1691331ad40e
|
||||
SHA1 (patch-lib_rubygems_commands_uninstall__command.rb) = 13b7f3bceb2876228027447640d51fde2700a970
|
||||
SHA1 (patch-lib_rubygems_commands_unpack__command.rb) = 48824278d5a0f0435d44755fbfcda55032792ea0
|
||||
SHA1 (patch-lib_rubygems_config__file.rb) = 0d863d3f886c1ed83585d96064725e7db7bec1bc
|
||||
SHA1 (patch-lib_rubygems_defaults.rb) = 5a55a54988b360b995e05e6dda7ed25d9cd1d90f
|
||||
SHA1 (patch-lib_rubygems_dependency__installer.rb) = 840626e388dae2e2059b38ef300edecf60f80100
|
||||
SHA1 (patch-lib_rubygems_install__update__options.rb) = 9a15d509928aa0440691bef8ad43bbfd2688542f
|
||||
SHA1 (patch-lib_rubygems_installer.rb) = b9f5f83db56e89e0996acd9677a090cf0856bf75
|
||||
SHA1 (patch-lib_rubygems_platform.rb) = 5150a27be7d637dc2ffa44c1d053a39d5f8c9059
|
||||
SHA1 (patch-lib_rubygems_specification.rb) = ee53b1982c665bef63e60eb72f3c2d0ec8f02bdc
|
||||
SHA1 (patch-lib_rubygems_uninstaller.rb) = 87fdddc435440aab57a6d44aba64abd0b2de6907
|
||||
SHA1 (patch-man_erb.1) = 1fe6ce4f4fe6418bfabb5e132a63596562030116
|
||||
SHA1 (patch-man_irb.1) = 2bf807b4c1b1c68d1f518caa054cfd900e0fedb7
|
||||
SHA1 (patch-man_ri.1) = af855135020f18c361cc55af676adc75e26bf4d3
|
||||
SHA1 (patch-man_ruby.1) = 5bc1e2e7c4c640659e33d0131d0982ce4e0d9fe0
|
||||
SHA1 (patch-template_verconf.h.in) = 1f4c0676d1335a9fc32ccf8cbfa41678dde96dcd
|
||||
SHA1 (patch-test_rubygems_test__gem.rb) = 4d8cc50c2782e29eefea0ea6deedf295a7f09bc2
|
||||
SHA1 (patch-thread__pthread.c) = c812869041e7b05c68cc72e1bbc06561397d6591
|
||||
SHA1 (patch-tool_rbinstall.rb) = 845e5136dc2b5e3c41aeb833890e786544d6f5d5
|
37
lang/ruby21-base/hacks.mk
Normal file
37
lang/ruby21-base/hacks.mk
Normal file
|
@ -0,0 +1,37 @@
|
|||
# $NetBSD: hacks.mk,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
.if !defined(RUBY21_BASE_HACKS_MK)
|
||||
RUBY21_BASE_HACKS_MK= defined
|
||||
|
||||
.include "../../mk/compiler.mk"
|
||||
|
||||
### [ Sun Jun 5 10:05:39 CEST 2005 : seb ]
|
||||
### On NetBSD/sparc64, gcc optimisation, at least for version 3.3.3,
|
||||
### produces segmentation faulting miniruby binary.
|
||||
### Also note that `-O' level optimisation produces a miniruby
|
||||
### binary that loops while running the installation scripts.
|
||||
###
|
||||
.if !empty(MACHINE_PLATFORM:MNetBSD-*-sparc64)
|
||||
. if !empty(CC_VERSION:Mgcc-3.3.*)
|
||||
PKG_HACKS+= optimisation
|
||||
BUILDLINK_TRANSFORM+= rm:-O[0-9]*
|
||||
. endif
|
||||
### ruby193 binary built on NetBSD/sparc64 with gcc 4.5.1 and the default -O2
|
||||
### dumps core during generating RDocs.
|
||||
### Using -O1 works around.
|
||||
. if !empty(CC_VERSION:Mgcc-4.5.*)
|
||||
PKG_HACKS+= optimisation
|
||||
BUILDLINK_TRANSFORM+= rename:-O2:-O1
|
||||
. endif
|
||||
.endif
|
||||
|
||||
# On NetBSD/sh3el 6.0, the default -Os causes an error on compiling node.c:
|
||||
# {standard input}: Assembler messages: {standard input}:1458: \
|
||||
# Error: pcrel too far
|
||||
# and -O1 works around.
|
||||
.if !empty(MACHINE_PLATFORM:MNetBSD-*-sh3*) && !empty(CC_VERSION:Mgcc-4.5.*)
|
||||
PKG_HACKS+= optimisation
|
||||
BUILDLINK_TRANSFORM+= rename:-Os:-O1 rm:-freorder-blocks
|
||||
.endif
|
||||
|
||||
.endif # RUBY21_BASE_HACKS_MK
|
16
lang/ruby21-base/options.mk
Normal file
16
lang/ruby21-base/options.mk
Normal file
|
@ -0,0 +1,16 @@
|
|||
# $NetBSD: options.mk,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
PKG_OPTIONS_VAR= PKG_OPTIONS.ruby
|
||||
PKG_SUPPORTED_OPTIONS= ruby-build-ri-db
|
||||
PKG_SUGGESTED_OPTIONS= ruby-build-ri-db
|
||||
|
||||
.include "../../mk/bsd.options.mk"
|
||||
|
||||
.if !empty(PKG_OPTIONS:Mruby-build-ri-db)
|
||||
#PRIVILEGED_STAGES+= clean
|
||||
RUBY_DYNAMIC_DIRS+= ${RUBY_SYSRIDIR}
|
||||
# Use huge memory.
|
||||
UNLIMIT_RESOURCES+= datasize
|
||||
.else
|
||||
CONFIGURE_ARGS+= --enable-install-doc=no
|
||||
.endif
|
110
lang/ruby21-base/patches/patch-configure
Normal file
110
lang/ruby21-base/patches/patch-configure
Normal file
|
@ -0,0 +1,110 @@
|
|||
$NetBSD: patch-configure,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Adding Interix and MirBSD support.
|
||||
* Ignore doxygen.
|
||||
|
||||
--- configure.orig 2013-12-20 12:22:22.000000000 +0000
|
||||
+++ configure
|
||||
@@ -8430,6 +8430,10 @@ esac
|
||||
ac_cv_func_isinf=yes
|
||||
ac_cv_func_isnan=yes
|
||||
;; #(
|
||||
+ interix*) :
|
||||
+ LIBS="-lm $LIBS"
|
||||
+ ac_cv_func_getpgrp_void=yes
|
||||
+ ;; #(
|
||||
nacl) :
|
||||
|
||||
LIBS="-lm $LIBS"
|
||||
@@ -16063,6 +16067,8 @@ else
|
||||
# ifdef _MSC_VER
|
||||
# include <malloc.h>
|
||||
# define alloca _alloca
|
||||
+# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__)
|
||||
+# include <stdlib.h>
|
||||
# else
|
||||
# ifdef HAVE_ALLOCA_H
|
||||
# include <alloca.h>
|
||||
@@ -19811,7 +19817,9 @@ esac ;; #(
|
||||
interix*) :
|
||||
: ${LDSHARED='$(CC) -shared'}
|
||||
XLDFLAGS="$XLDFLAGS -Wl,-E"
|
||||
+ DLDFLAGS="$DLDFLAGS "'-Wl,-h,$(.TARGET) -Wl,--image-base,$$(($$RANDOM %4096/2*262144+1342177280))'
|
||||
LIBPATHFLAG=" -L%1\$-s"
|
||||
+ RPATHFLAG=' -Wl,-R%1$-s'
|
||||
rb_cv_dlopen=yes ;; #(
|
||||
freebsd*|dragonfly*) :
|
||||
|
||||
@@ -20797,7 +20805,7 @@ esac
|
||||
freebsd*|dragonfly*) :
|
||||
|
||||
SOLIBS='$(LIBS)'
|
||||
- LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)'
|
||||
+ LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR)$(TEENY)'
|
||||
if test "$rb_cv_binary_elf" != "yes" ; then
|
||||
LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
|
||||
LIBRUBY_ALIASES=''
|
||||
@@ -20876,7 +20884,12 @@ esac
|
||||
;; #(
|
||||
interix*) :
|
||||
|
||||
- LIBRUBYARG_SHARED='-L. -L${libdir} -l$(RUBY_SO_NAME)'
|
||||
+ SOLIBS='$(LIBS)'
|
||||
+ LIBRUBY_SO='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR).$(TEENY)'
|
||||
+ # link explicitly to 0x48000000
|
||||
+ LIBRUBY_DLDFLAGS='-Wl,-h,lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) -Wl,--image-base,1207959552'
|
||||
+ LIBRUBYARG_SHARED='-Wl,-R -Wl,${PREFIX}/lib} -L${libdir} -L. -l$(RUBY_SO_NAME)'
|
||||
+ LIBRUBY_ALIASES='lib$(RUBY_SO_NAME).so.$(MAJOR)$(MINOR) lib$(RUBY_SO_NAME).so'
|
||||
;; #(
|
||||
mingw*|cygwin*|mswin*) :
|
||||
|
||||
@@ -21034,7 +21047,7 @@ esac
|
||||
esac
|
||||
if test "$enable_rpath" = yes; then
|
||||
test -z "$LIBRUBY_RPATHFLAGS" || LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS "
|
||||
- LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS${linker_flag}-R ${linker_flag}${libprefix}"
|
||||
+ LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS${linker_flag}-R ${linker_flag}${PREFIX}/lib"
|
||||
test "x$cross_compiling" = xyes || LIBRUBY_RPATHFLAGS="$LIBRUBY_RPATHFLAGS -L${libprefix}"
|
||||
LIBRUBYARG_SHARED="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_SHARED"
|
||||
LIBRUBYARG_STATIC="$LIBRUBY_RPATHFLAGS $LIBRUBYARG_STATIC"
|
||||
@@ -21210,11 +21223,7 @@ if test "$install_doc" != no; then
|
||||
else
|
||||
RDOCTARGET="nodoc"
|
||||
fi
|
||||
- if test "$install_capi" != no -a -n "$DOXYGEN"; then
|
||||
- CAPITARGET="capi"
|
||||
- else
|
||||
- CAPITARGET="nodoc"
|
||||
- fi
|
||||
+ CAPITARGET="nodoc"
|
||||
else
|
||||
RDOCTARGET="nodoc"
|
||||
CAPITARGET="nodoc"
|
||||
@@ -21799,7 +21808,7 @@ if test ${RUBY_LIB_VERSION_STYLE+set}; t
|
||||
elif test -z "${ruby_version}"; then
|
||||
as_fn_error $? "No ruby version, No place for bundled libraries" "$LINENO" 5
|
||||
else
|
||||
- RUBY_LIB_VERSION="\"${ruby_version}\""
|
||||
+ RUBY_LIB_VERSION="${ruby_version}"
|
||||
fi
|
||||
|
||||
|
||||
@@ -23305,17 +23314,7 @@ which seems to be undefined. Please mak
|
||||
"Makefile":F)
|
||||
tmpmk=confmk$$.tmp
|
||||
{
|
||||
- if test ${VCS+set}; then
|
||||
- :
|
||||
- elif svn info "$srcdir" > /dev/null 2>&1; then
|
||||
- VCS='svn'
|
||||
- elif test -d "$srcdir/.git/svn"; then
|
||||
- VCS='git svn'
|
||||
- elif test -d "$srcdir/.git"; then
|
||||
- VCS='git'
|
||||
- else
|
||||
- VCS='echo cannot'
|
||||
- fi
|
||||
+ VCS='echo cannot'
|
||||
case "$VCS" in #(
|
||||
svn) :
|
||||
VCSUP='$(VCS) up $(SVNUPOPTIONS)' ;; #(
|
12
lang/ruby21-base/patches/patch-ext_dl_extconf.rb
Normal file
12
lang/ruby21-base/patches/patch-ext_dl_extconf.rb
Normal file
|
@ -0,0 +1,12 @@
|
|||
$NetBSD: patch-ext_dl_extconf.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
--- ext/dl/extconf.rb.orig 2012-02-25 05:47:16.000000000 +0000
|
||||
+++ ext/dl/extconf.rb
|
||||
@@ -1,7 +1,6 @@
|
||||
require 'mkmf'
|
||||
|
||||
if RbConfig::CONFIG['GCC'] == 'yes'
|
||||
- (have_macro("__clang__") ? $LDFLAGS : $CFLAGS) << " -fno-defer-pop"
|
||||
$CFLAGS << " -fno-omit-frame-pointer"
|
||||
end
|
||||
|
37
lang/ruby21-base/patches/patch-lib_rdoc_ri_driver.rb
Normal file
37
lang/ruby21-base/patches/patch-lib_rdoc_ri_driver.rb
Normal file
|
@ -0,0 +1,37 @@
|
|||
$NetBSD: patch-lib_rdoc_ri_driver.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Defer loading readline, when it is really needed.
|
||||
Some unknown reason:
|
||||
|
||||
1. build devel/ruby-readline with editline(3).
|
||||
2. Execute a ruby script loading readline in background from shell.
|
||||
3. When the script output something to stdout, it got SIGTSTP and suspends.
|
||||
|
||||
There is no such problem when build devel/ruby-readline with GNU's readline.
|
||||
|
||||
--- lib/rdoc/ri/driver.rb.orig 2013-09-18 23:33:36.000000000 +0000
|
||||
+++ lib/rdoc/ri/driver.rb
|
||||
@@ -2,11 +2,6 @@ require 'abbrev'
|
||||
require 'optparse'
|
||||
|
||||
begin
|
||||
- require 'readline'
|
||||
-rescue LoadError
|
||||
-end
|
||||
-
|
||||
-begin
|
||||
require 'win32console'
|
||||
rescue LoadError
|
||||
end
|
||||
@@ -1069,6 +1064,11 @@ The ri pager can be set with the 'RI_PAG
|
||||
# Runs ri interactively using Readline if it is available.
|
||||
|
||||
def interactive
|
||||
+ begin
|
||||
+ require 'readline'
|
||||
+ rescue LoadError
|
||||
+ end
|
||||
+
|
||||
puts "\nEnter the method name you want to look up."
|
||||
|
||||
if defined? Readline then
|
36
lang/ruby21-base/patches/patch-lib_rubygems.rb
Normal file
36
lang/ruby21-base/patches/patch-lib_rubygems.rb
Normal file
|
@ -0,0 +1,36 @@
|
|||
$NetBSD: patch-lib_rubygems.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Add install_root option for pkgsrc's rubygems support.
|
||||
|
||||
--- lib/rubygems.rb.orig 2014-02-06 02:59:36.000000000 +0000
|
||||
+++ lib/rubygems.rb
|
||||
@@ -257,7 +257,10 @@ module Gem
|
||||
##
|
||||
# The path where gem executables are to be installed.
|
||||
|
||||
- def self.bindir(install_dir=Gem.dir)
|
||||
+ def self.bindir(install_dir=Gem.dir, install_root=nil)
|
||||
+ unless install_root.nil? or install_root.empty?
|
||||
+ install_dir = install_dir.sub(install_root, "")
|
||||
+ end
|
||||
return File.join install_dir, 'bin' unless
|
||||
install_dir.to_s == Gem.default_dir.to_s
|
||||
Gem.default_bindir
|
||||
@@ -572,7 +575,7 @@ module Gem
|
||||
# gem's paths are inserted before site lib directory by default.
|
||||
|
||||
def self.load_path_insert_index
|
||||
- index = $LOAD_PATH.index RbConfig::CONFIG['sitelibdir']
|
||||
+ index = $LOAD_PATH.index RbConfig::CONFIG['vendorlibdir']
|
||||
|
||||
index
|
||||
end
|
||||
@@ -743,7 +746,7 @@ module Gem
|
||||
def self.prefix
|
||||
prefix = File.dirname RUBYGEMS_DIR
|
||||
|
||||
- if prefix != File.expand_path(RbConfig::CONFIG['sitelibdir']) and
|
||||
+ if prefix != File.expand_path(RbConfig::CONFIG['vendorlibdir']) and
|
||||
prefix != File.expand_path(RbConfig::CONFIG['libdir']) and
|
||||
'lib' == File.basename(RUBYGEMS_DIR) then
|
||||
prefix
|
|
@ -0,0 +1,41 @@
|
|||
$NetBSD: patch-lib_rubygems_commands_setup__command.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Make sure to setup under DESTDIR.
|
||||
|
||||
--- lib/rubygems/commands/setup_command.rb.orig 2013-07-22 16:33:18.000000000 +0000
|
||||
+++ lib/rubygems/commands/setup_command.rb
|
||||
@@ -145,7 +145,7 @@ By default, this RubyGems will install g
|
||||
|
||||
uninstall_old_gemcutter
|
||||
|
||||
- documentation_success = install_rdoc
|
||||
+ documentation_success = install_rdoc install_destdir
|
||||
|
||||
say
|
||||
if @verbose then
|
||||
@@ -284,11 +284,15 @@ TEXT
|
||||
end
|
||||
end
|
||||
|
||||
- def install_rdoc
|
||||
+ def install_rdoc(install_destdir)
|
||||
gem_doc_dir = File.join Gem.dir, 'doc'
|
||||
rubygems_name = "rubygems-#{Gem::VERSION}"
|
||||
rubygems_doc_dir = File.join gem_doc_dir, rubygems_name
|
||||
|
||||
+ unless install_destdir.empty?
|
||||
+ FileUtils.mkdir_p gem_doc_dir unless File.exist?(gem_doc_dir)
|
||||
+ end
|
||||
+
|
||||
begin
|
||||
Gem.ensure_gem_subdirectories Gem.dir
|
||||
rescue SystemCallError
|
||||
@@ -299,7 +303,7 @@ TEXT
|
||||
(not File.exist? rubygems_doc_dir or
|
||||
File.writable? rubygems_doc_dir) then
|
||||
say "Removing old RubyGems RDoc and ri" if @verbose
|
||||
- Dir[File.join(Gem.dir, 'doc', 'rubygems-[0-9]*')].each do |dir|
|
||||
+ Dir[File.join(gem_doc_dir, 'rubygems-[0-9]*')].each do |dir|
|
||||
rm_rf dir
|
||||
end
|
||||
|
|
@ -0,0 +1,18 @@
|
|||
$NetBSD: patch-lib_rubygems_commands_uninstall__command.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Add install_root option for pkgsrc's rubygems support.
|
||||
|
||||
--- lib/rubygems/commands/uninstall_command.rb.orig 2013-09-18 21:29:41.000000000 +0000
|
||||
+++ lib/rubygems/commands/uninstall_command.rb
|
||||
@@ -23,6 +23,11 @@ class Gem::Commands::UninstallCommand <
|
||||
options[:all] = value
|
||||
end
|
||||
|
||||
+ add_option('-B', '--install-root DIR',
|
||||
+ 'Root directory for gem files') do |value, options|
|
||||
+ options[:install_root] = File.expand_path(value)
|
||||
+ end
|
||||
+
|
||||
add_option('-I', '--[no-]ignore-dependencies',
|
||||
'Ignore dependency requirements while',
|
||||
'uninstalling') do |value, options|
|
|
@ -0,0 +1,27 @@
|
|||
$NetBSD: patch-lib_rubygems_commands_unpack__command.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Add install_root option for pkgsrc's rubygems support.
|
||||
|
||||
--- lib/rubygems/commands/unpack_command.rb.orig 2013-09-25 00:53:19.000000000 +0000
|
||||
+++ lib/rubygems/commands/unpack_command.rb
|
||||
@@ -14,6 +14,10 @@ class Gem::Commands::UnpackCommand < Gem
|
||||
:version => Gem::Requirement.default,
|
||||
:target => Dir.pwd
|
||||
|
||||
+ add_option('--install-root DIR', 'Root directory for gem files on extract') do |value, options|
|
||||
+ options[:install_root] = value
|
||||
+ end
|
||||
+
|
||||
add_option('--target=DIR',
|
||||
'target directory for unpacking') do |value, options|
|
||||
options[:target] = value
|
||||
@@ -87,6 +91,9 @@ command help for an example.
|
||||
else
|
||||
basename = File.basename path, '.gem'
|
||||
target_dir = File.expand_path basename, options[:target]
|
||||
+ if options[:install_root]
|
||||
+ target_dir = File.join(options[:install_root], target_dir)
|
||||
+ end
|
||||
|
||||
package = Gem::Package.new path
|
||||
package.extract_files target_dir
|
40
lang/ruby21-base/patches/patch-lib_rubygems_config__file.rb
Normal file
40
lang/ruby21-base/patches/patch-lib_rubygems_config__file.rb
Normal file
|
@ -0,0 +1,40 @@
|
|||
$NetBSD: patch-lib_rubygems_config__file.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Don't hard code config file's path for gem.
|
||||
|
||||
--- lib/rubygems/config_file.rb.orig 2013-10-24 14:31:17.000000000 +0000
|
||||
+++ lib/rubygems/config_file.rb
|
||||
@@ -57,32 +57,7 @@ class Gem::ConfigFile
|
||||
|
||||
# :stopdoc:
|
||||
|
||||
- system_config_path =
|
||||
- begin
|
||||
- require "etc"
|
||||
- Etc.sysconfdir
|
||||
- rescue LoadError, NoMethodError
|
||||
- begin
|
||||
- # TODO: remove after we drop 1.8.7 and 1.9.1
|
||||
- require 'Win32API'
|
||||
-
|
||||
- CSIDL_COMMON_APPDATA = 0x0023
|
||||
- path = 0.chr * 260
|
||||
- if RUBY_VERSION > '1.9' then
|
||||
- SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'PLPLP',
|
||||
- 'L', :stdcall
|
||||
- SHGetFolderPath.call nil, CSIDL_COMMON_APPDATA, nil, 1, path
|
||||
- else
|
||||
- SHGetFolderPath = Win32API.new 'shell32', 'SHGetFolderPath', 'LLLLP',
|
||||
- 'L'
|
||||
- SHGetFolderPath.call 0, CSIDL_COMMON_APPDATA, 0, 1, path
|
||||
- end
|
||||
-
|
||||
- path.strip
|
||||
- rescue LoadError
|
||||
- RbConfig::CONFIG["sysconfdir"] || "/etc"
|
||||
- end
|
||||
- end
|
||||
+ system_config_path = '@PKG_SYSCONFDIR@'
|
||||
|
||||
# :startdoc:
|
||||
|
15
lang/ruby21-base/patches/patch-lib_rubygems_defaults.rb
Normal file
15
lang/ruby21-base/patches/patch-lib_rubygems_defaults.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-lib_rubygems_defaults.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Use vendordir instead of sitedir.
|
||||
|
||||
--- lib/rubygems/defaults.rb.orig 2014-02-06 02:59:36.000000000 +0000
|
||||
+++ lib/rubygems/defaults.rb
|
||||
@@ -29,7 +29,7 @@ module Gem
|
||||
def self.default_dir
|
||||
path = if defined? RUBY_FRAMEWORK_VERSION then
|
||||
[
|
||||
- File.dirname(RbConfig::CONFIG['sitedir']),
|
||||
+ File.dirname(RbConfig::CONFIG['vendordir']),
|
||||
'Gems',
|
||||
RbConfig::CONFIG['ruby_version']
|
||||
]
|
|
@ -0,0 +1,36 @@
|
|||
$NetBSD: patch-lib_rubygems_dependency__installer.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Add install_root option for pkgsrc's rubygems support.
|
||||
|
||||
--- lib/rubygems/dependency_installer.rb.orig 2013-12-18 01:02:58.000000000 +0000
|
||||
+++ lib/rubygems/dependency_installer.rb
|
||||
@@ -63,6 +63,7 @@ class Gem::DependencyInstaller
|
||||
# :format_executable:: See Gem::Installer#initialize.
|
||||
# :ignore_dependencies:: Don't install any dependencies.
|
||||
# :install_dir:: See Gem::Installer#install.
|
||||
+ # :install_root:: See Gem::Installer#install.
|
||||
# :prerelease:: Allow prerelease versions. See #install.
|
||||
# :security_policy:: See Gem::Installer::new and Gem::Security.
|
||||
# :user_install:: See Gem::Installer.new
|
||||
@@ -100,7 +101,12 @@ class Gem::DependencyInstaller
|
||||
@installed_gems = []
|
||||
@toplevel_specs = nil
|
||||
|
||||
- @cache_dir = options[:cache_dir] || @install_dir
|
||||
+ @install_root = options[:install_root] || ""
|
||||
+ install_dir = @install_dir
|
||||
+ if not @install_root.nil? or @install_root.empty?
|
||||
+ install_dir = File.join(@install_root, install_dir)
|
||||
+ end
|
||||
+ @cache_dir = options[:cache_dir] || install_dir
|
||||
|
||||
@errors = nil
|
||||
end
|
||||
@@ -379,6 +385,7 @@ class Gem::DependencyInstaller
|
||||
:force => @force,
|
||||
:format_executable => @format_executable,
|
||||
:ignore_dependencies => @ignore_dependencies,
|
||||
+ :install_root => @install_root,
|
||||
:security_policy => @security_policy,
|
||||
:user_install => @user_install,
|
||||
:wrappers => @wrappers,
|
|
@ -0,0 +1,19 @@
|
|||
$NetBSD: patch-lib_rubygems_install__update__options.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Add install_root option for pkgsrc's rubygems support.
|
||||
|
||||
--- lib/rubygems/install_update_options.rb.orig 2013-09-14 08:59:02.000000000 +0000
|
||||
+++ lib/rubygems/install_update_options.rb
|
||||
@@ -36,6 +36,12 @@ module Gem::InstallUpdateOptions
|
||||
value
|
||||
end
|
||||
|
||||
+ add_option(:"Install/Update", '-B', '--install-root DIR',
|
||||
+ 'Root directory for gem files on install') do |value, options|
|
||||
+ options[:install_root] = File.expand_path(value)
|
||||
+ Gem.ensure_gem_subdirectories File.join options[:install_root], Gem.dir
|
||||
+ end
|
||||
+
|
||||
add_option(:"Install/Update", '-i', '--install-dir DIR',
|
||||
'Gem repository directory to get installed',
|
||||
'gems') do |value, options|
|
49
lang/ruby21-base/patches/patch-lib_rubygems_installer.rb
Normal file
49
lang/ruby21-base/patches/patch-lib_rubygems_installer.rb
Normal file
|
@ -0,0 +1,49 @@
|
|||
$NetBSD: patch-lib_rubygems_installer.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Add install_root option for pkgsrc's rubygems support.
|
||||
* Tweak build_info directory with destdir to store build_args.
|
||||
|
||||
--- lib/rubygems/installer.rb.orig 2013-12-19 03:05:37.000000000 +0000
|
||||
+++ lib/rubygems/installer.rb
|
||||
@@ -95,6 +95,9 @@ class Gem::Installer
|
||||
# foo_exec18.
|
||||
# :ignore_dependencies:: Don't raise if a dependency is missing.
|
||||
# :install_dir:: The directory to install the gem into.
|
||||
+ # :install_root:: The directory to use as a buildroot for "destdir"-style
|
||||
+ # installation. All paths during installation are relative
|
||||
+ # to the buildroot.
|
||||
# :security_policy:: Use the specified security policy. See Gem::Security
|
||||
# :user_install:: Indicate that the gem should be unpacked into the users
|
||||
# personal gem directory.
|
||||
@@ -583,12 +586,20 @@ class Gem::Installer
|
||||
@format_executable = options[:format_executable]
|
||||
@security_policy = options[:security_policy]
|
||||
@wrappers = options[:wrappers]
|
||||
+ install_root = options[:install_root]
|
||||
+ unless install_root.nil? or install_root.empty?
|
||||
+ @install_root = File.expand_path install_root
|
||||
+ @gem_home = File.join(@install_root, @gem_home)
|
||||
+ end
|
||||
@only_install_dir = options[:only_install_dir]
|
||||
|
||||
# If the user has asked for the gem to be installed in a directory that is
|
||||
# the system gem directory, then use the system bin directory, else create
|
||||
# (or use) a new bin dir under the gem_home.
|
||||
- @bin_dir = options[:bin_dir] || Gem.bindir(gem_home)
|
||||
+ @bin_dir = options[:bin_dir] || Gem.bindir(gem_home, @install_root)
|
||||
+ unless @install_root.nil? or @install_root.empty?
|
||||
+ @bin_dir = File.join(@install_root, @bin_dir)
|
||||
+ end
|
||||
@development = options[:development]
|
||||
|
||||
@build_args = options[:build_args] || Gem::Command.build_args
|
||||
@@ -769,6 +780,9 @@ TEXT
|
||||
return if @build_args.empty?
|
||||
|
||||
build_info_dir = File.join gem_home, 'build_info'
|
||||
+ unless @install_root.nil? or @install_root.empty?
|
||||
+ build_info_dir = File.join @gem_home, "build_info"
|
||||
+ end
|
||||
|
||||
FileUtils.mkdir_p build_info_dir
|
||||
|
14
lang/ruby21-base/patches/patch-lib_rubygems_platform.rb
Normal file
14
lang/ruby21-base/patches/patch-lib_rubygems_platform.rb
Normal file
|
@ -0,0 +1,14 @@
|
|||
$NetBSD: patch-lib_rubygems_platform.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
Allow simple "netbsd" as Gem::Platform.
|
||||
|
||||
--- lib/rubygems/platform.rb.orig 2014-02-06 02:59:36.000000000 +0000
|
||||
+++ lib/rubygems/platform.rb
|
||||
@@ -94,6 +94,7 @@ class Gem::Platform
|
||||
@cpu = 'x86' if @cpu.nil? and os =~ /32$/
|
||||
[os, version]
|
||||
when /netbsdelf/ then [ 'netbsdelf', nil ]
|
||||
+ when /netbsd/ then [ 'netbsd', nil ]
|
||||
when /openbsd(\d+\.\d+)?/ then [ 'openbsd', $1 ]
|
||||
when /solaris(\d+\.\d+)?/ then [ 'solaris', $1 ]
|
||||
# test
|
71
lang/ruby21-base/patches/patch-lib_rubygems_specification.rb
Normal file
71
lang/ruby21-base/patches/patch-lib_rubygems_specification.rb
Normal file
|
@ -0,0 +1,71 @@
|
|||
$NetBSD: patch-lib_rubygems_specification.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Changes for pkgsrc environment:
|
||||
|
||||
- Allow some attributes to nil.
|
||||
- Relax date/time format.
|
||||
|
||||
And allow multiple conditions for requirement from Ruby 2.0.0 and
|
||||
Rubygem 1.8.25.
|
||||
|
||||
--- lib/rubygems/specification.rb.orig 2013-12-19 22:09:19.000000000 +0000
|
||||
+++ lib/rubygems/specification.rb
|
||||
@@ -178,6 +178,12 @@ class Gem::Specification < Gem::BasicSpe
|
||||
@@default_value[k].nil?
|
||||
}
|
||||
|
||||
+ # under pkgsrc environment
|
||||
+ @@pkgsrc_nil_attributes = {}
|
||||
+ [:authors, :cert_chain, :executables, :extensions, :extra_rdoc_files, :licenses, :required_rubygems_version, :test_files].each do |k|
|
||||
+ @@pkgsrc_nil_attributes[k] = true
|
||||
+ end
|
||||
+
|
||||
######################################################################
|
||||
# :section: Required gemspec attributes
|
||||
|
||||
@@ -2415,7 +2421,24 @@ class Gem::Specification < Gem::BasicSpe
|
||||
normalize
|
||||
|
||||
nil_attributes = self.class.non_nil_attributes.find_all do |name|
|
||||
- instance_variable_get("@#{name}").nil?
|
||||
+ val = instance_variable_get("@#{name}")
|
||||
+ if val.nil?
|
||||
+ if @@pkgsrc_nil_attributes.key?(name)
|
||||
+ case name
|
||||
+ when :required_rubygems_version
|
||||
+ val = Gem::Requirement.default
|
||||
+ else
|
||||
+ val = []
|
||||
+ end
|
||||
+ instance_variable_set("@#{name}", val)
|
||||
+ false
|
||||
+ end
|
||||
+ end
|
||||
+ if name == :authors and val.empty?
|
||||
+ val = ['not specified']
|
||||
+ self.authors = val
|
||||
+ false
|
||||
+ end
|
||||
end
|
||||
|
||||
unless nil_attributes.empty? then
|
||||
@@ -2559,10 +2582,15 @@ http://opensource.org/licenses/alphabeti
|
||||
raise Gem::InvalidSpecificationException, "#{lazy} is not a summary"
|
||||
end
|
||||
|
||||
- if homepage and not homepage.empty? and
|
||||
- homepage !~ /\A[a-z][a-z\d+.-]*:/i then
|
||||
- raise Gem::InvalidSpecificationException,
|
||||
- "\"#{homepage}\" is not a URI"
|
||||
+ if homepage and not homepage.empty?
|
||||
+ if @homepage =~ /\A[a-z][a-z\d+.-]*/i and
|
||||
+ @homepage !~ /\A[a-z][a-z\d+.-]*:/i
|
||||
+ @homepage = "http://" + @homepage
|
||||
+ end
|
||||
+ if homepage !~ /\A[a-z][a-z\d+.-]*:/i then
|
||||
+ raise Gem::InvalidSpecificationException,
|
||||
+ "\"#{homepage}\" is not a URI"
|
||||
+ end
|
||||
end
|
||||
|
||||
# Warnings
|
31
lang/ruby21-base/patches/patch-lib_rubygems_uninstaller.rb
Normal file
31
lang/ruby21-base/patches/patch-lib_rubygems_uninstaller.rb
Normal file
|
@ -0,0 +1,31 @@
|
|||
$NetBSD: patch-lib_rubygems_uninstaller.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Add install_root option for pkgsrc's rubygems support.
|
||||
|
||||
--- lib/rubygems/uninstaller.rb.orig 2013-12-10 19:54:19.000000000 +0000
|
||||
+++ lib/rubygems/uninstaller.rb
|
||||
@@ -51,6 +51,11 @@ class Gem::Uninstaller
|
||||
@force_ignore = options[:ignore]
|
||||
@bin_dir = options[:bin_dir]
|
||||
@format_executable = options[:format_executable]
|
||||
+ install_root = options[:install_root]
|
||||
+ unless install_root.nil? or install_root.empty?
|
||||
+ @install_root = File.expand_path install_root
|
||||
+ @gem_home = File.join(@install_root, @gem_home)
|
||||
+ end
|
||||
@abort_on_dependent = options[:abort_on_dependent]
|
||||
|
||||
# Indicate if development dependencies should be checked when
|
||||
@@ -200,7 +205,11 @@ class Gem::Uninstaller
|
||||
end
|
||||
|
||||
if remove then
|
||||
- bin_dir = @bin_dir || Gem.bindir(spec.base_dir)
|
||||
+ bin_dir = @bin_dir || (Gem.bindir @gem_home, @install_root)
|
||||
+
|
||||
+ unless @install_root.nil? or @install_root.empty?
|
||||
+ bindir = File.join(@install_root, bindir)
|
||||
+ end
|
||||
|
||||
raise Gem::FilePermissionError, bin_dir unless File.writable? bin_dir
|
||||
|
24
lang/ruby21-base/patches/patch-man_erb.1
Normal file
24
lang/ruby21-base/patches/patch-man_erb.1
Normal file
|
@ -0,0 +1,24 @@
|
|||
$NetBSD: patch-man_erb.1,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Fix mdoc markup.
|
||||
|
||||
--- man/erb.1.orig 2012-11-15 04:22:44.000000000 +0000
|
||||
+++ man/erb.1
|
||||
@@ -143,12 +143,12 @@ class.
|
||||
.Pp
|
||||
.Sh REPORTING BUGS
|
||||
.Bl -bullet
|
||||
-.Li Security vulnerabilities should be reported via an email to
|
||||
-.Aq security@ruby-lang.org Ns
|
||||
-.Li .
|
||||
+.It
|
||||
+Security vulnerabilities should be reported via an email to
|
||||
+.Aq security@ruby-lang.org .
|
||||
Reported problems will be published after being fixed.
|
||||
-.Pp
|
||||
-.Li And you can report other bugs and feature requests via the
|
||||
+.It
|
||||
+You can report other bugs and feature requests via the
|
||||
Ruby Issue Tracking System (http://bugs.ruby-lang.org).
|
||||
Do not report security vulnerabilities
|
||||
via the system because it publishes the vulnerabilities immediately.
|
24
lang/ruby21-base/patches/patch-man_irb.1
Normal file
24
lang/ruby21-base/patches/patch-man_irb.1
Normal file
|
@ -0,0 +1,24 @@
|
|||
$NetBSD: patch-man_irb.1,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Fix mdoc markup.
|
||||
|
||||
--- man/irb.1.orig 2012-11-15 04:22:44.000000000 +0000
|
||||
+++ man/irb.1
|
||||
@@ -159,12 +159,12 @@ Personal irb initialization.
|
||||
.Pp
|
||||
.Sh REPORTING BUGS
|
||||
.Bl -bullet
|
||||
-.Li Security vulnerabilities should be reported via an email to
|
||||
-.Aq security@ruby-lang.org Ns
|
||||
-.Li .
|
||||
+.It
|
||||
+Security vulnerabilities should be reported via an email to
|
||||
+.Aq security@ruby-lang.org .
|
||||
Reported problems will be published after being fixed.
|
||||
-.Pp
|
||||
-.Li And you can report other bugs and feature requests via the
|
||||
+.It
|
||||
+You can report other bugs and feature requests via the
|
||||
Ruby Issue Tracking System (http://bugs.ruby-lang.org).
|
||||
Do not report security vulnerabilities
|
||||
via the system because it publishes the vulnerabilities immediately.
|
24
lang/ruby21-base/patches/patch-man_ri.1
Normal file
24
lang/ruby21-base/patches/patch-man_ri.1
Normal file
|
@ -0,0 +1,24 @@
|
|||
$NetBSD: patch-man_ri.1,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Fix mdoc markup.
|
||||
|
||||
--- man/ri.1.orig 2013-07-13 15:17:18.000000000 +0000
|
||||
+++ man/ri.1
|
||||
@@ -166,12 +166,12 @@ Searches user-wide documents here.
|
||||
.Pp
|
||||
.Sh REPORTING BUGS
|
||||
.Bl -bullet
|
||||
-.Li Security vulnerabilities should be reported via an email to
|
||||
-.Aq security@ruby-lang.org Ns
|
||||
-.Li .
|
||||
+.It
|
||||
+Security vulnerabilities should be reported via an email to
|
||||
+.Aq security@ruby-lang.org .
|
||||
Reported problems will be published after being fixed.
|
||||
-.Pp
|
||||
-.Li And you can report other bugs and feature requests via the
|
||||
+.It
|
||||
+You can report other bugs and feature requests via the
|
||||
Ruby Issue Tracking System (http://bugs.ruby-lang.org).
|
||||
Do not report security vulnerabilities
|
||||
via the system because it publishes the vulnerabilities immediately.
|
24
lang/ruby21-base/patches/patch-man_ruby.1
Normal file
24
lang/ruby21-base/patches/patch-man_ruby.1
Normal file
|
@ -0,0 +1,24 @@
|
|||
$NetBSD: patch-man_ruby.1,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Fix mdoc markup.
|
||||
|
||||
--- man/ruby.1.orig 2013-01-11 17:44:16.000000000 +0000
|
||||
+++ man/ruby.1
|
||||
@@ -499,12 +499,12 @@ Ruby projects on Github.
|
||||
.Pp
|
||||
.Sh REPORTING BUGS
|
||||
.Bl -bullet
|
||||
-.Li Security vulnerabilities should be reported via an email to
|
||||
-.Aq security@ruby-lang.org Ns
|
||||
-.Li .
|
||||
+.It
|
||||
+Security vulnerabilities should be reported via an email to
|
||||
+.Aq security@ruby-lang.org .
|
||||
Reported problems will be published after they've been fixed.
|
||||
-.Pp
|
||||
-.Li And you can report other bugs and feature requests via the
|
||||
+.It
|
||||
+You can report other bugs and feature requests via the
|
||||
Ruby Issue Tracking System (http://bugs.ruby-lang.org).
|
||||
Do not report security vulnerabilities
|
||||
via the system because it publishes the vulnerabilities immediately.
|
13
lang/ruby21-base/patches/patch-template_verconf.h.in
Normal file
13
lang/ruby21-base/patches/patch-template_verconf.h.in
Normal file
|
@ -0,0 +1,13 @@
|
|||
$NetBSD: patch-template_verconf.h.in,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
--- template/verconf.h.in.orig 2013-05-16 13:35:44.000000000 +0000
|
||||
+++ template/verconf.h.in
|
||||
@@ -8,7 +8,7 @@
|
||||
% elsif !C["RUBY_LIB_VERSION"]
|
||||
#define RUBY_LIB_VERSION_STYLE 3 /* full */
|
||||
% else
|
||||
-#define RUBY_LIB_VERSION ${RUBY_LIB_VERSION}
|
||||
+#define RUBY_LIB_VERSION "${RUBY_LIB_VERSION}"
|
||||
% end
|
||||
#define RUBY_EXEC_PREFIX "<%='${RUBY_EXEC_PREFIX}' if C['RUBY_EXEC_PREFIX']%>"
|
||||
#define RUBY_LIB_PREFIX "${rubylibprefix}"
|
21
lang/ruby21-base/patches/patch-test_rubygems_test__gem.rb
Normal file
21
lang/ruby21-base/patches/patch-test_rubygems_test__gem.rb
Normal file
|
@ -0,0 +1,21 @@
|
|||
$NetBSD: patch-test_rubygems_test__gem.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Use vendordir instead of sitedir.
|
||||
|
||||
--- test/rubygems/test_gem.rb.orig 2014-02-06 02:59:36.000000000 +0000
|
||||
+++ test/rubygems/test_gem.rb
|
||||
@@ -560,12 +560,12 @@ class TestGem < Gem::TestCase
|
||||
end
|
||||
|
||||
def test_self_prefix_sitelibdir
|
||||
- orig_sitelibdir = RbConfig::CONFIG['sitelibdir']
|
||||
+ orig_sitelibdir = RbConfig::CONFIG['vendorlibdir']
|
||||
RbConfig::CONFIG['sitelibdir'] = @@project_dir
|
||||
|
||||
assert_nil Gem.prefix
|
||||
ensure
|
||||
- RbConfig::CONFIG['sitelibdir'] = orig_sitelibdir
|
||||
+ RbConfig::CONFIG['vendorlibdir'] = orig_sitelibdir
|
||||
end
|
||||
|
||||
def test_self_read_binary
|
19
lang/ruby21-base/patches/patch-thread__pthread.c
Normal file
19
lang/ruby21-base/patches/patch-thread__pthread.c
Normal file
|
@ -0,0 +1,19 @@
|
|||
$NetBSD: patch-thread__pthread.c,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
Correct usage of pthread_setname_np() on NetBSD.
|
||||
|
||||
--- thread_pthread.c.orig 2014-02-22 07:17:22.000000000 +0000
|
||||
+++ thread_pthread.c
|
||||
@@ -1424,8 +1424,12 @@ timer_thread_sleep(rb_global_vm_lock_t*
|
||||
#if defined(__linux__) && defined(PR_SET_NAME)
|
||||
# define SET_THREAD_NAME(name) prctl(PR_SET_NAME, name)
|
||||
#elif defined(HAVE_PTHREAD_SETNAME_NP)
|
||||
+#ifdef __NetBSD__
|
||||
+# define SET_THREAD_NAME(name) pthread_setname_np(pthread_self(), "%s", ((name)))
|
||||
+#else
|
||||
/* pthread_setname_np() on Darwin does not have target thread argument */
|
||||
# define SET_THREAD_NAME(name) pthread_setname_np(name)
|
||||
+#endif
|
||||
#else
|
||||
# define SET_THREAD_NAME(name) (void)0
|
||||
#endif
|
15
lang/ruby21-base/patches/patch-tool_rbinstall.rb
Normal file
15
lang/ruby21-base/patches/patch-tool_rbinstall.rb
Normal file
|
@ -0,0 +1,15 @@
|
|||
$NetBSD: patch-tool_rbinstall.rb,v 1.1 2014/03/14 19:40:47 taca Exp $
|
||||
|
||||
* Don't install which has already ${RUBY_VER} suffix.
|
||||
|
||||
--- tool/rbinstall.rb.orig 2013-11-09 16:37:46.000000000 +0000
|
||||
+++ tool/rbinstall.rb
|
||||
@@ -222,7 +222,7 @@ def install_recursive(srcdir, dest, opti
|
||||
end
|
||||
end
|
||||
end
|
||||
- skip |= %w"#*# *~ *.old *.bak *.orig *.rej *.diff *.patch *.core"
|
||||
+ skip |= %w"#*# *~ *.old *.bak *.orig *.rej *.diff *.patch *.core *210"
|
||||
prune = path_matcher(prune)
|
||||
skip = path_matcher(skip)
|
||||
File.directory?(srcdir) or return rescue return
|
Loading…
Reference in a new issue