Add ruby26 2.6.3 (copied from ruby25)

PR:		234509 235826
Submitted by:	pete@nomadlogic.org (initial revision)
		Yasuhiro KIMURA <yasu@utahime.org> (initial revision)
		meta (myself, minor modifications)
Relnotes::	https://www.ruby-lang.org/en/news/2018/12/25/ruby-2-6-0-released/
		https://www.ruby-lang.org/en/news/2019/01/30/ruby-2-6-1-released/
		https://www.ruby-lang.org/en/news/2019/03/13/ruby-2-6-2-released/
		https://www.ruby-lang.org/en/news/2019/04/17/ruby-2-6-3-released/
Differential Revision:	https://reviews.freebsd.org/D19961
This commit is contained in:
Koichiro Iwao
2019-05-09 01:28:38 +00:00
parent 91dfec49fe
commit 96e32bdc19
12 changed files with 22140 additions and 3 deletions
+1 -1
View File
@@ -87,7 +87,7 @@ PYTHON_DEFAULT?= 3.6
PYTHON2_DEFAULT?= 2.7
# Possible values: 3.5, 3.6, 3.7
PYTHON3_DEFAULT?= 3.6
# Possible values: 2.4, 2.5
# Possible values: 2.4, 2.5, 2.6
RUBY_DEFAULT?= 2.5
# Possible values: rust, rust-nightly
RUST_DEFAULT?= rust
+14 -2
View File
@@ -170,13 +170,23 @@ RUBY_PORTEPOCH= 1
RUBY_PATCHLEVEL= 0
RUBY25= "" # PLIST_SUB helpers
. elif ${RUBY_VER} == 2.6
#
# Ruby 2.6
#
RUBY_RELVERSION= 2.6.3
RUBY_PORTREVISION= 0
RUBY_PORTEPOCH= 1
RUBY_PATCHLEVEL= 0
RUBY26= "" # PLIST_SUB helpers
# When adding a version, please keep the comment in
# Mk/bsd.default-versions.mk in sync.
. else
#
# Other versions
#
IGNORE= Only ruby 2.4 and 2.5 are supported
IGNORE= Only ruby 2.4, 2.5 and 2.6 are supported
_INVALID_RUBY_VER= 1
. endif
.endif # defined(RUBY_VER)
@@ -185,6 +195,7 @@ _INVALID_RUBY_VER= 1
RUBY24?= "@comment "
RUBY25?= "@comment "
RUBY26?= "@comment "
.if defined(BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E})
.if ${BROKEN_RUBY${RUBY_VER:R}${RUBY_VER:E}} == "yes"
@@ -300,7 +311,8 @@ PLIST_SUB+= ${PLIST_RUBY_DIRS:C,DIR="(${LOCALBASE}|${PREFIX})/,DIR=",} \
RUBY_NAME="${RUBY_NAME}" \
RUBY_DEFAULT_SUFFIX="${RUBY_DEFAULT_SUFFIX}" \
RUBY24=${RUBY24} \
RUBY25=${RUBY25}
RUBY25=${RUBY25} \
RUBY26=${RUBY26}
.if defined(USE_RUBY_RDOC)
MAKE_ENV+= RUBY_RDOC=${RUBY_RDOC}
+222
View File
@@ -0,0 +1,222 @@
# Created by: Akinori MUSHA aka knu <knu@idaemons.org>
# $FreeBSD$
PORTNAME= ruby
PORTVERSION= ${RUBY_PORTVERSION}
PORTREVISION= ${RUBY_PORTREVISION}
PORTEPOCH= ${RUBY_PORTEPOCH}
CATEGORIES= lang ruby ipv6
MASTER_SITES= RUBY/${MASTER_SITE_SUBDIR_RUBY}
DISTNAME= ${RUBY_DISTNAME}
DIST_SUBDIR= ruby
MAINTAINER= ruby@FreeBSD.org
COMMENT= Object-oriented interpreted scripting language
LICENSE= BSD2CLAUSE RUBY
LICENSE_COMB= dual
LICENSE_FILE_BSD2CLAUSE=${WRKSRC}/BSDL
LICENSE_FILE_RUBY= ${WRKSRC}/COPYING
# Using LIB_DEPENDS finds the libffi from gcc which causes problems
BUILD_DEPENDS= libffi>=0:devel/libffi
LIB_DEPENDS= libyaml.so:textproc/libyaml
RUN_DEPENDS= libffi>=0:devel/libffi
USES= autoreconf cpe ssl tar:xz
CONFIGURE_ARGS= ${RUBY_CONFIGURE_ARGS} \
--disable-rpath \
--enable-pthread \
--enable-shared \
--enable-install-static-library \
--with-ruby-version=minor \
--with-sitedir="${PREFIX}/lib/ruby/site_ruby" \
--with-vendordir="${PREFIX}/lib/ruby/vendor_ruby"
CONFIGURE_ENV= debugflags=
CPPFLAGS+= -I${LOCALBASE}/include
GNU_CONFIGURE= yes
# Keep this, else ruby will fail to load libraries dependent of libpthread.
LIBS+= -lpthread -L${LOCALBASE}/lib
USE_LDCONFIG= yes
WRKSRC= ${RUBY_WRKSRC}
MAKE_JOBS_UNSAFE= yes
RUBY_VER= 2.6
USE_RUBY= yes
RUBY_NO_BUILD_DEPENDS= yes
RUBY_NO_RUN_DEPENDS= yes
OPTIONS_DEFINE= CAPIDOCS DEBUG DOCS EXAMPLES GMP RDOC
OPTIONS_DEFAULT= RDOC LIBEDIT
OPTIONS_SINGLE= EDIT
OPTIONS_SINGLE_EDIT= LIBEDIT READLINE
OPTIONS_SUB= yes
CAPIDOCS_DESC= Build and install C API documents
GMP_DESC= Use GMP to accelerate Bignum operations
RDOC_DESC= Build and install Rdoc indexes
EDIT_DESC= Which line editing lib to use
LIBEDIT_DESC= Use libedit
READLINE_DESC= Use libreadline
CAPIDOCS_BUILD_DEPENDS= doxygen>=1.8.13,2:devel/doxygen \
dot:graphics/graphviz
CAPIDOCS_CONFIGURE_ENABLE= install-capi
GMP_CONFIGURE_WITH= gmp
GMP_LIB_DEPENDS= libgmp.so:math/gmp
LIBEDIT_CONFIGURE_ON= --enable-libedit --with-libedit-dir=${LOCALBASE}
LIBEDIT_USES= libedit
RDOC_CONFIGURE_ENABLE= install-rdoc
READLINE_CONFIGURE_ON= --disable-libedit --with-readline-dir=${LOCALBASE}
READLINE_USES= readline:port
CPE_VENDOR= ruby-lang
CPE_VERSION= ${RUBY_RELVERSION}
CPE_UPDATE= p${RUBY_PATCHLEVEL}
.include <bsd.port.pre.mk>
# PORTREVISION/PORTEPOCH hack
.if ${PORTREVISION} != 0
_SUF1= _${PORTREVISION}
.endif
.if ${PORTEPOCH} != 0
_SUF2= ,${PORTEPOCH}
.endif
.if ${OPSYS} == "FreeBSD"
.if exists(/usr/sbin/dtrace) && (${ARCH} == amd64 || ${ARCH} == i386)
CONFIGURE_ARGS+=--enable-dtrace
.else
CONFIGURE_ARGS+=--disable-dtrace
.endif
.endif
# keep in sync with all platforms where libunwind is available
.if (${ARCH} == amd64 || ${ARCH} == i386)
LIB_DEPENDS+= libunwind.so:devel/libunwind
.endif
.if (${ARCH} == powerpc || ${ARCH} == powerpc64)
USE_GCC= yes
.endif
.if ${ARCH} == armv6 || ${ARCH} == armv7
CONFIGURE_ARGS+=--with-setjmp-type=_setjmp
CONFIGURE_ENV+= ac_cv_func__setjmp=yes
.endif
.if ${PORT_OPTIONS:MCAPIDOCS}
MAKE_JOBS_UNSAFE= yes
.endif
.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
PLIST_SUB+= IF_DEFAULT=""
.else
PKGNAMESUFFIX= ${RUBY_VER:C/\.//}
PLIST_SUB+= IF_DEFAULT="@comment "
.endif
INSTALLED_SCRIPTS= erb irb rdoc ri ruby
INSTALLED_MANUALS= erb irb ri ruby
EXTSAMPLES= bigdecimal/sample/*.rb
EXTDOCS= readline/README \
ripper/README \
stringio/README.md \
syslog/syslog.txt
# Macros to change variables in rbconfig.rb
RB_SET_CONF_VAR=${SH} -c '${REINPLACE_CMD} -E -e "s,(CONFIG\[\"$$0\"\][[:space:]]*=[[:space:]]*)(\(?)(.*)(\)?),\1\2$$1\4," ${WRKSRC}/rbconfig.rb' --
post-patch:
# We get these from other ports
.for d in bin/bundle* lib/bundler* libexec/bundler* man/bundle* bin/gem man/gemfile* \
ext/dbm ext/gdbm ext/win32ole
@${RM} -r ${BUILD_WRKSRC}/${d}
.endfor
post-build:
#
# Hack to allow modules to be installed into separate PREFIX and/or under user
# privileges
#
@${RB_SET_CONF_VAR} "prefix" "ENV['PREFIX'] || \3"
@${RB_SET_CONF_VAR} "INSTALL" "'/usr/bin/install -c'"
@${RB_SET_CONF_VAR} "INSTALL_PROGRAM" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} ${STRIP} -m ${BINMODE}' : '${INSTALL_PROGRAM}'"
@${RB_SET_CONF_VAR} "INSTALL_SCRIPT" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} -m ${BINMODE}' : '${INSTALL_SCRIPT}'"
@${RB_SET_CONF_VAR} "INSTALL_DATA" "ENV['RB_USER_INSTALL'] ? '${INSTALL} ${COPY} -m ${SHAREMODE}' : '${INSTALL_DATA}'"
post-build-CAPIDOCS-on:
@${FIND} ${WRKSRC}/doc -type d -empty -delete
pre-install:
${MKDIR} ${STAGEDIR}${RUBY_SITEARCHLIBDIR}
${MKDIR} ${STAGEDIR}${RUBY_VENDORARCHLIBDIR}
pre-install-DOCS-on:
${MKDIR} ${STAGEDIR}${RUBY_DOCDIR}
pre-install-EXAMPLES-on:
${MKDIR} ${STAGEDIR}${RUBY_EXAMPLESDIR}
pre-install-RDOC-on:
${MKDIR} ${STAGEDIR}${RUBY_RIDIR}
${MKDIR} ${STAGEDIR}${RUBY_SITERIDIR}
post-install:
.if ${RUBY_VER} == ${RUBY_DEFAULT_VER}
#
# Link just installed "ruby" to "ruby26", etc.
#
. for FILE in ${INSTALLED_SCRIPTS}
${LN} -fs ${FILE}${RUBY_SUFFIX} ${STAGEDIR}${PREFIX}/bin/${FILE}
. endfor
#
# Link "ruby.1.gz" to "ruby26.1.gz", etc.
#
. for FILE in ${INSTALLED_MANUALS}
${LN} -fs ${FILE}${RUBY_SUFFIX}.1.gz ${STAGEDIR}${MANPREFIX}/man/man1/${FILE}.1.gz
. endfor
.endif
post-install-DEBUG-off:
#
# XXX: hack to strip ruby binary. Ruby uses its own install script that seems
# bogus to hack.
#
.if defined(STRIP) && ${STRIP} == -s
${STRIP_CMD} ${STAGEDIR}${PREFIX}/bin/${RUBY_NAME}
${STRIP_CMD} ${STAGEDIR}${PREFIX}/lib/libruby${RUBY_SHLIBVER}.so.${RUBY_SHLIBVER}
${FIND} ${STAGEDIR}${RUBY_ARCHLIBDIR} -type f -name '*\.so' -exec ${STRIP_CMD} {} \;
.endif
post-install-DOCS-on:
# Create all dirs required (":u" isn't avaiable in STABLE yet :-()
${MKDIR} ${EXTDOCS:C|^([^/]+)/.*|\1|:S|^|${STAGEDIR}${RUBY_DOCDIR}/|}
.for FILE in ${EXTDOCS}
${INSTALL_DATA} ${WRKSRC}/ext/${FILE} \
${STAGEDIR}${RUBY_DOCDIR}/${FILE:C|^([^/]+)/.*|\1|}/
.endfor
@(cd ${WRKSRC}/doc/ && ${COPYTREE_SHARE} \* ${STAGEDIR}${RUBY_DOCDIR}/)
${INSTALL_DATA} ${WRKSRC}/COPYING* \
${WRKSRC}/ChangeLog \
${WRKSRC}/LEGAL \
${WRKSRC}/README* \
${STAGEDIR}${RUBY_DOCDIR}/
post-install-EXAMPLES-on:
# Create all dirs required (":u" isn't avaiable in STABLE yet :-()
${MKDIR} ${EXTSAMPLES:C|^([^/]+)/.*|\1|:S|^|${STAGEDIR}${RUBY_EXAMPLESDIR}/|}
.for FILE in ${EXTSAMPLES}
${INSTALL_DATA} ${WRKSRC}/ext/${FILE} \
${STAGEDIR}${RUBY_EXAMPLESDIR}/${FILE:C|^([^/]+)/.*|\1|}/
.endfor
(cd ${WRKSRC}/sample/ && ${COPYTREE_SHARE} . ${STAGEDIR}${RUBY_EXAMPLESDIR}/)
do-test:
cd ${WRKSRC} && ${MAKE_CMD} test
.include <bsd.port.post.mk>
+3
View File
@@ -0,0 +1,3 @@
TIMESTAMP = 1555637174
SHA256 (ruby/ruby-2.6.3.tar.xz) = 11a83f85c03d3f0fc9b8a9b6cad1b2674f26c5aaa43ba858d4b0fcc2b54171e1
SIZE (ruby/ruby-2.6.3.tar.xz) = 11904360
+19
View File
@@ -0,0 +1,19 @@
--- configure.ac.orig 2018-12-28 12:03:09 UTC
+++ configure.ac
@@ -2678,7 +2678,7 @@ AS_IF([test "$with_dln_a_out" != yes], [
: ${LDSHARED='$(CC) -shared'}
AS_IF([test "$rb_cv_binary_elf" = yes], [
LDFLAGS="$LDFLAGS -rdynamic"
- DLDFLAGS="$DLDFLAGS "'-Wl,-soname,$@'
+ DLDFLAGS="$DLDFLAGS "'-Wl,-E'
], [
test "$GCC" = yes && test "$rb_cv_prog_gnu_ld" = yes || LDSHARED='$(LD) -Bshareable'
])
@@ -3163,6 +3163,7 @@ AS_CASE("$enable_shared", [yes], [
[freebsd*|dragonfly*], [
LIBRUBY_SO='lib$(RUBY_SO_NAME).$(SOEXT).$(MAJOR)$(MINOR)'
LIBRUBY_SONAME='$(LIBRUBY_SO)'
+ RUBY_APPEND_OPTIONS(LIBRUBY_DLDFLAGS, ['-Wl,-soname,${LIBRUBY_SO}'])
AS_IF([test "$rb_cv_binary_elf" != "yes" ], [
LIBRUBY_SO="$LIBRUBY_SO.\$(TEENY)"
LIBRUBY_ALIASES=''
+11
View File
@@ -0,0 +1,11 @@
--- lib/mkmf.rb.orig 2018-10-09 14:09:35 UTC
+++ lib/mkmf.rb
@@ -234,7 +234,7 @@ module MakeMakefile
end
$extmk ||= false
if not $extmk and File.exist?(($hdrdir = RbConfig::CONFIG["rubyhdrdir"]) + "/ruby/ruby.h")
- $topdir = $hdrdir
+ $topdir = $hdrdir + "/" + "#{CONFIG['arch']}/ruby/"
$top_srcdir = $hdrdir
$arch_hdrdir = RbConfig::CONFIG["rubyarchhdrdir"]
elsif File.exist?(($hdrdir = ($top_srcdir ||= topdir) + "/include") + "/ruby.h")
@@ -0,0 +1,20 @@
--- lib/rdoc/generator/json_index.rb.orig 2017-11-27 10:45:24 UTC
+++ lib/rdoc/generator/json_index.rb
@@ -175,7 +175,7 @@ class RDoc::Generator::JsonIndex
debug_msg "Writing gzipped search index to %s" % outfile
Zlib::GzipWriter.open(outfile) do |gz|
- gz.mtime = File.mtime(search_index_file)
+ gz.mtime = 1
gz.orig_name = search_index_file.basename.to_s
gz.write search_index
gz.close
@@ -193,7 +193,7 @@ class RDoc::Generator::JsonIndex
debug_msg "Writing gzipped file to %s" % outfile
Zlib::GzipWriter.open(outfile) do |gz|
- gz.mtime = File.mtime(dest)
+ gz.mtime = 1
gz.orig_name = dest.basename.to_s
gz.write data
gz.close
+14
View File
@@ -0,0 +1,14 @@
--- tool/mkconfig.rb.orig 2017-05-02 12:45:07 UTC
+++ tool/mkconfig.rb
@@ -157,8 +157,9 @@ def vars.expand(val, config = self)
val.replace(newval) unless newval == val
val
end
-prefix = vars.expand(vars["prefix"] ||= "")
-rubyarchdir = vars.expand(vars["rubyarchdir"] ||= "")
+prefix = vars.expand(vars["rubyarchdir"])
+major, minor, *rest = RUBY_VERSION.split('.')
+rubyarchdir = "/lib/ruby/#{major}.#{minor}/#{arch}"
relative_archdir = rubyarchdir.rindex(prefix, 0) ? rubyarchdir[prefix.size..-1] : rubyarchdir
puts %[\
# encoding: ascii-8bit
+133
View File
@@ -0,0 +1,133 @@
--- tool/rbinstall.rb.orig 2019-04-19 10:54:19.302709000 +0900
+++ tool/rbinstall.rb 2019-04-19 11:00:53.499751000 +0900
@@ -785,130 +785,6 @@
# :startdoc:
-install?(:ext, :comm, :gem, :'default-gems', :'default-gems-comm') do
- install_default_gem('lib', srcdir)
-end
-install?(:ext, :arch, :gem, :'default-gems', :'default-gems-arch') do
- install_default_gem('ext', srcdir)
-end
-
-def load_gemspec(file)
- file = File.realpath(file)
- code = File.read(file, encoding: "utf-8:-")
- code.gsub!(/`git.*?`/m, '""')
- code.gsub!(/%x\[git.*?\]/m, '""')
- spec = eval(code, binding, file)
- unless Gem::Specification === spec
- raise TypeError, "[#{file}] isn't a Gem::Specification (#{spec.class} instead)."
- end
- spec.loaded_from = file
- spec
-end
-
-def install_default_gem(dir, srcdir)
- gem_dir = Gem.default_dir
- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
- prepare "default gems from #{dir}", gem_dir, directories
-
- spec_dir = File.join(gem_dir, directories.grep(/^spec/)[0])
- default_spec_dir = "#{spec_dir}/default"
- makedirs(default_spec_dir)
-
- gems = Dir.glob("#{srcdir}/#{dir}/**/*.gemspec").map {|src|
- spec = load_gemspec(src)
- file_collector = RbInstall::Specs::FileCollector.new(src)
- files = file_collector.collect
- next if files.empty?
- spec.files = files
- spec
- }
- gems.compact.sort_by(&:name).each do |gemspec|
- full_name = "#{gemspec.name}-#{gemspec.version}"
-
- puts "#{INDENT}#{gemspec.name} #{gemspec.version}"
- gemspec_path = File.join(default_spec_dir, "#{full_name}.gemspec")
- open_for_install(gemspec_path, $data_mode) do
- gemspec.to_ruby
- end
-
- unless gemspec.executables.empty? then
- bin_dir = File.join(gem_dir, 'gems', full_name, gemspec.bindir)
- makedirs(bin_dir)
-
- gemspec.executables.map {|exec|
- install File.join(srcdir, 'libexec', exec),
- File.join(bin_dir, exec)
- }
- end
- end
-end
-
-install?(:ext, :comm, :gem, :'bundled-gems') do
- gem_dir = Gem.default_dir
- directories = Gem.ensure_gem_subdirectories(gem_dir, :mode => $dir_mode)
- prepare "bundled gems", gem_dir, directories
- install_dir = with_destdir(gem_dir)
- installed_gems = {}
- options = {
- :install_dir => install_dir,
- :bin_dir => with_destdir(bindir),
- :domain => :local,
- :ignore_dependencies => true,
- :dir_mode => $dir_mode,
- :data_mode => $data_mode,
- :prog_mode => $prog_mode,
- :wrappers => true,
- :format_executable => true,
- }
- gem_ext_dir = "#$extout/gems/#{CONFIG['arch']}"
- extensions_dir = Gem::StubSpecification.gemspec_stub("", gem_dir, gem_dir).extensions_dir
- dirs = Gem::Util.glob_files_in_dir "*/", "#{srcdir}/gems"
- Gem::Specification.each_gemspec(dirs) do |path|
- spec = load_gemspec(path)
- next unless spec.platform == Gem::Platform::RUBY
- next unless spec.full_name == path[srcdir.size..-1][/\A\/gems\/([^\/]+)/, 1]
- spec.extension_dir = "#{extensions_dir}/#{spec.full_name}"
- if File.directory?(ext = "#{gem_ext_dir}/#{spec.full_name}")
- spec.extensions[0] ||= "-"
- end
- ins = RbInstall::UnpackedInstaller.new(spec, options)
- puts "#{INDENT}#{spec.name} #{spec.version}"
- ins.install
- File.chmod($data_mode, File.join(install_dir, "specifications", "#{spec.full_name}.gemspec"))
- unless spec.extensions.empty?
- install_recursive(ext, spec.extension_dir)
- end
- installed_gems[spec.full_name] = true
- end
- installed_gems, gems = Dir.glob(srcdir+'/gems/*.gem').partition {|gem| installed_gems.key?(File.basename(gem, '.gem'))}
- unless installed_gems.empty?
- install installed_gems, gem_dir+"/cache"
- end
- next if gems.empty?
- if defined?(Zlib)
- Gem.instance_variable_set(:@ruby, with_destdir(File.join(bindir, ruby_install_name)))
- silent = Gem::SilentUI.new
- gems.each do |gem|
- inst = Gem::Installer.new(gem, options)
- inst.spec.extension_dir = with_destdir(inst.spec.extension_dir)
- begin
- Gem::DefaultUserInteraction.use_ui(silent) {inst.install}
- rescue Gem::InstallError
- next
- end
- gemname = File.basename(gem)
- puts "#{INDENT}#{gemname}"
- end
- # fix directory permissions
- # TODO: Gem.install should accept :dir_mode option or something
- File.chmod($dir_mode, *Dir.glob(install_dir+"/**/"))
- # fix .gemspec permissions
- File.chmod($data_mode, *Dir.glob(install_dir+"/specifications/*.gemspec"))
- else
- puts "skip installing bundled gems because of lacking zlib"
- end
-end
-
parse_args()
include FileUtils
+19
View 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.)
WWW: https://www.ruby-lang.org/en/
+15
View File
@@ -0,0 +1,15 @@
====
Some of the standard commands are provided as separate ports for ease
of upgrading:
devel/ruby-gems: gem - RubyGems package manager
devel/rubygem-rake: rake - Ruby Make
And some of the standard libraries are provided as separate ports
since they require extra dependencies:
databases/rubygem-dbm: DBM module
databases/rubygem-gdbm: GDBM module
Install them as occasion demands.
====
+21669
View File
File diff suppressed because it is too large Load Diff