pkgsrc/lang/ruby23-base/hacks.mk
taca b22a24a715 Add ruby23-base package, core part of Ruby 2.3.0 pacakge.
From release announce:

Ruby 2.3.0 Released

Posted by naruse on 25 Dec 2015

We are pleased to announce the release of Ruby 2.3.0.

This is the first stable release of Ruby 2.3 series. It introduces many new
features for example:

A Frozen String Literal Pragma is introduced. With Ruby 2.1, "str".freeze has
been optimized to reduce object allocation. Ruby 2.3 introduces a new magic
comment and command line option to freeze all string literals in the source
files. Additionally for debugging, you can get where the object is created on
"can't modify frozen String" error by --debug=frozen-string-literal command
line option.

A safe navigation operator (so-called lonely operator) &., which already
exists in C#, Groovy, and Swift, is introduced to ease nil handling as
obj&.foo. Array#dig and Hash#dig are also added. Note that this behaves as
try! of Active Support, which specially handle only nil.

The did_you_mean gem is bundled. The did_you_mean gem shows the candidates on
the NameError and NoMethodError to ease debugging.

RubyVM::InstructionSequence#to_binary and .load_from_binary are introduced as
experimental feature. With these features, we can make a ISeq (bytecode)
pre-compilation system.

It also includes many performance improvements for example, reconsider method
entry data structure, introducing new table data structure, optimize
Proc#call, machine code level tuning for object allocation and method calling
code, smarter instance variable data structure, Socket and I/O allow to use
“exception:” keywords for high-performance non-blocking I/O and so on. Check
“Implementation improvements” section in NEWS file.

For a complete list of new features and compatibility notes, please see NEWS
and ChangeLog.
2015-12-30 14:59:42 +00:00

37 lines
1.2 KiB
Makefile

# $NetBSD: hacks.mk,v 1.1 2015/12/30 14:59:42 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+= opt:-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+= opt:-Os:-O1 rm:-freorder-blocks
.endif
.endif # RUBY21_BASE_HACKS_MK