commit | author | age
|
554801
|
1 |
# |
AP |
2 |
# CDDL HEADER START |
|
3 |
# |
|
4 |
# The contents of this file are subject to the terms of the |
|
5 |
# Common Development and Distribution License (the "License"). |
|
6 |
# You may not use this file except in compliance with the License. |
|
7 |
# |
|
8 |
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE |
|
9 |
# or http://www.opensolaris.org/os/licensing. |
|
10 |
# See the License for the specific language governing permissions |
|
11 |
# and limitations under the License. |
|
12 |
# |
|
13 |
# When distributing Covered Code, include this CDDL HEADER in each |
|
14 |
# file and include the License file at usr/src/OPENSOLARIS.LICENSE. |
|
15 |
# If applicable, add the following below this CDDL HEADER, with the |
|
16 |
# fields enclosed by brackets "[]" replaced with your own identifying |
|
17 |
# information: Portions Copyright [yyyy] [name of copyright owner] |
|
18 |
# |
|
19 |
# CDDL HEADER END |
|
20 |
# |
|
21 |
|
|
22 |
# |
|
23 |
# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved. |
1780eb
|
24 |
# Copyright 2020, Michal Nowak |
554801
|
25 |
# |
AP |
26 |
|
1780eb
|
27 |
BUILD_BITS= 64 |
554801
|
28 |
|
AP |
29 |
include ../../../make-rules/shared-macros.mk |
|
30 |
|
|
31 |
COMPONENT_NAME= ruby |
d2ca77
|
32 |
COMPONENT_VERSION= 2.6.8 |
554801
|
33 |
COMPONENT_SUMMARY= Ruby, RubyGems, and Rake |
AP |
34 |
COMPONENT_PROJECT_URL= http://www.ruby-lang.org/ |
1780eb
|
35 |
COMPONENT_SRC= $(COMPONENT_NAME)-$(COMPONENT_VERSION) |
554801
|
36 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz |
1780eb
|
37 |
COMPONENT_ARCHIVE_URL= https://cache.ruby-lang.org/pub/ruby/2.6/$(COMPONENT_ARCHIVE) |
554801
|
38 |
COMPONENT_ARCHIVE_HASH= \ |
d2ca77
|
39 |
sha256:8262e4663169c85787fdc9bfbd04d9eb86eb2a4b56d7f98373a8fcaa18e593eb |
1780eb
|
40 |
COMPONENT_FMRI= runtime/ruby-26 |
554801
|
41 |
COMPONENT_CLASSIFICATION= Development/Ruby |
1780eb
|
42 |
COMPONENT_LICENSE= Ruby License |
MN |
43 |
COMPONENT_LICENSE_FILE= COPYING |
554801
|
44 |
|
1780eb
|
45 |
include $(WS_MAKE_RULES)/common.mk |
554801
|
46 |
|
AP |
47 |
# COMPONENT_VERSION <major>.<minor>.<teeny> |
|
48 |
# is transformed into <major>.<minor> for RUBY_VER. |
|
49 |
# First change the separator '.' to ' ', so we can use "word" to pull the |
|
50 |
# first two space-separated words from the string. |
|
51 |
RUBY_VER_WORDS= $(subst ., ,$(COMPONENT_VERSION)) |
|
52 |
RUBY_VER=$(word 1,$(RUBY_VER_WORDS)).$(word 2,$(RUBY_VER_WORDS)) |
|
53 |
# the library-compatible version |
|
54 |
RUBY_LIB_VER=2.6.0 |
|
55 |
|
|
56 |
PROTORUBYDIR=$(PROTO_DIR)/usr/ruby/$(RUBY_VER) |
|
57 |
PROTO_RBCONFIG_FILE=$(PROTORUBYDIR)/lib/ruby/$(RUBY_LIB_VER)/$(MACH64)-solaris$(SOLARIS_VERSION)/rbconfig.rb |
|
58 |
|
|
59 |
# these macros are used in the package manifest |
|
60 |
PKG_MACROS+= RUBY_VER=$(RUBY_VER) RUBY_LIB_VER=$(RUBY_LIB_VER) |
|
61 |
|
|
62 |
# Apply some of the edits here--including to the sed scripts themselves. |
|
63 |
# These modifications of ruby.1 must occur after ruby |
|
64 |
# is installed, not before. Although there are some other patches |
|
65 |
# to ruby.1 that occur before, the ruby installation does some |
|
66 |
# formatting of ruby.1 that won't occur if the below changes |
|
67 |
# are applied. |
|
68 |
# Fix generated rbconfig.rb using /usr/bin/sed; gsed doesn't |
|
69 |
# work for some of the commands in rbconfig.sedscript. |
|
70 |
COMPONENT_POST_INSTALL_ACTION += \ |
|
71 |
$(GSED) -e "s/RUBY_VER/$(RUBY_VER)/" \ |
|
72 |
-e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" Solaris/gem.1-generic \ |
|
73 |
> Solaris/gem.1 ; \ |
|
74 |
$(GSED) -e "s/RUBY_VER/$(RUBY_VER)/" \ |
|
75 |
-e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" Solaris/ruby.1.sedscript \ |
|
76 |
> Solaris/ruby.1.sedscript.mod ; \ |
|
77 |
$(GSED) -e "s/RUBY_VER/$(RUBY_VER)/" \ |
|
78 |
-e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" \ |
|
79 |
-e "s,%%CC%%,$(CC)," \ |
|
80 |
-e "s,%%CXX%%,$(CXX)," \ |
|
81 |
Solaris/rbconfig.sedscript \ |
|
82 |
> Solaris/rbconfig.sedscript.mod ; \ |
|
83 |
$(GSED) -i -f Solaris/ruby.1.sedscript.mod \ |
|
84 |
$(PROTORUBYDIR)/share/man/man1/ruby.1 ; \ |
|
85 |
/usr/bin/sed -f Solaris/rbconfig.sedscript.mod \ |
|
86 |
$(PROTO_RBCONFIG_FILE) > rbconfig.rb.mod ; \ |
|
87 |
$(MV) rbconfig.rb.mod $(PROTO_RBCONFIG_FILE) |
|
88 |
|
|
89 |
# default LD_OPTION $(LD_B_DIRECT) causes problems-- |
|
90 |
# during install of ruby, ruby is executed and will core dump |
|
91 |
# after compiling with this option |
|
92 |
LD_B_DIRECT= |
|
93 |
|
|
94 |
# don't use LD_Z_IGNORE: causes ruby linker problems with |
|
95 |
# unreferenced symbol tgetent in libreadline, similar to bug #15617172 |
|
96 |
LD_Z_IGNORE= |
|
97 |
|
|
98 |
# Set the locale to generate documentation correctly |
|
99 |
COMPONENT_BUILD_ENV += LC_ALL=en_US.UTF-8 |
|
100 |
COMPONENT_INSTALL_ENV += LC_ALL=en_US.UTF-8 |
|
101 |
|
|
102 |
CONFIGURE_PREFIX = $(USRDIR)/$(COMPONENT_NAME)/$(RUBY_VER) |
|
103 |
|
|
104 |
CONFIGURE_OPTIONS += --with-rubylibprefix=$(CONFIGURE_LIBDIR.32)/ruby |
|
105 |
CONFIGURE_OPTIONS += --enable-shared |
|
106 |
CONFIGURE_OPTIONS += --enable-rpath |
|
107 |
CONFIGURE_OPTIONS += --enable-dtrace |
|
108 |
# Don't need docs for ruby C source files |
|
109 |
CONFIGURE_OPTIONS += --disable-install-capi |
|
110 |
CONFIGURE_OPTIONS += --disable-option-checking |
|
111 |
CONFIGURE_OPTIONS += --with-openssl |
|
112 |
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
|
113 |
|
|
114 |
# fiddle.so (ext/fiddle) links to libffi, which does not define |
|
115 |
# ffi_raw_size(), although its prototype is in libffi's |
|
116 |
# /usr/lib/libffi-3.0/include/ffi.h header file. |
|
117 |
# Defining FFI_NO_RAW_API avoids use of ffi_raw_size(). |
|
118 |
# This is a workaround to bug |
|
119 |
# 17349280 - libffi is missing ffi_raw_size() |
|
120 |
CFLAGS += -DFFI_NO_RAW_API |
|
121 |
|
|
122 |
CLEAN_PATHS += Solaris/gem.1 Solaris/rbconfig.sedscript.mod \ |
|
123 |
Solaris/ruby.1.sedscript.mod |
|
124 |
|
|
125 |
COMPONENT_TEST_TRANSFORMS += \ |
|
126 |
'-n' \ |
|
127 |
'-e "s/Finished tests in .*s, .* tests\/s, .* assertions/Finished tests in Xs, X tests\/s, X assertions/"' \ |
|
128 |
'-e "s/\(.*\) tests, .* assertions, \(.*\) failures, \(.*\) errors, .* skips/\1 tests, X assertions, \2 failures, \3 errors, X skips/"' \ |
|
129 |
'-e "/^make/d"' \ |
|
130 |
'-e "/fatal/Ip"' \ |
|
131 |
'-e "/test succeeded/p"' \ |
|
132 |
'-e "/Running tests/p"' \ |
|
133 |
'-e "/Finished tests in Xs, X tests\/s, X assertions/p"' \ |
|
134 |
'-e "/.* tests, X assertions, .* failures, .* errors, X skips/p"' |
|
135 |
|
|
136 |
# Auto-generated dependencies |
|
137 |
REQUIRED_PACKAGES += library/database/gdbm |
|
138 |
REQUIRED_PACKAGES += library/libffi |
|
139 |
REQUIRED_PACKAGES += library/libyaml |
|
140 |
REQUIRED_PACKAGES += library/ncurses |
|
141 |
REQUIRED_PACKAGES += library/readline |
|
142 |
REQUIRED_PACKAGES += library/security/openssl |
|
143 |
REQUIRED_PACKAGES += library/zlib |
|
144 |
REQUIRED_PACKAGES += shell/bash |
|
145 |
REQUIRED_PACKAGES += SUNWcs |
|
146 |
REQUIRED_PACKAGES += system/library |
946077
|
147 |
REQUIRED_PACKAGES += $(GCC_RUNTIME_PKG) |
554801
|
148 |
REQUIRED_PACKAGES += system/library/math |
946077
|
149 |
# Bogus dependency due to libssp |
AL |
150 |
REQUIRED_PACKAGES += $(GXX_RUNTIME_PKG) |