commit | author | age
|
de0880
|
1 |
# |
SA |
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. |
|
24 |
# |
|
25 |
|
|
26 |
include ../../../make-rules/shared-macros.mk |
|
27 |
|
|
28 |
COMPONENT_NAME= ruby |
69e943
|
29 |
COMPONENT_VERSION= 2.3.6 |
03845d
|
30 |
COMPONENT_REVISION= 1 |
de0880
|
31 |
COMPONENT_PROJECT_URL= http://www.ruby-lang.org/ |
SA |
32 |
COMPONENT_SRC= \ |
|
33 |
$(COMPONENT_NAME)-$(COMPONENT_VERSION) |
|
34 |
COMPONENT_ARCHIVE= $(COMPONENT_SRC).tar.xz |
|
35 |
COMPONENT_ARCHIVE_HASH= \ |
69e943
|
36 |
sha256:e0d969ac22d4a403c1204868bb9c0d068aa35045bb3934cf50b17b7f66059f56 |
de0880
|
37 |
|
SA |
38 |
COMPONENT_ARCHIVE_URL= \ |
ee0b88
|
39 |
https://cache.ruby-lang.org/pub/ruby/2.3/$(COMPONENT_ARCHIVE) |
de0880
|
40 |
COMPONENT_BUGDB= utility/ruby |
SA |
41 |
|
ee0b88
|
42 |
include $(WS_MAKE_RULES)/prep.mk |
SA |
43 |
include $(WS_MAKE_RULES)/ips.mk |
|
44 |
include $(WS_MAKE_RULES)/configure.mk |
de0880
|
45 |
|
SA |
46 |
# COMPONENT_VERSION <major>.<minor>.<teeny> |
|
47 |
# is transformed into <major>.<minor> for RUBY_VER. |
|
48 |
# First change the separator '.' to ' ', so we can use "word" to pull the |
|
49 |
# first two space-separated words from the string. |
|
50 |
RUBY_VER_WORDS= $(subst ., ,$(COMPONENT_VERSION)) |
|
51 |
RUBY_VER=$(word 1,$(RUBY_VER_WORDS)).$(word 2,$(RUBY_VER_WORDS)) |
|
52 |
# the library-compatible version |
|
53 |
RUBY_LIB_VER=2.3.0 |
|
54 |
|
|
55 |
PROTORUBYDIR=$(PROTO_DIR)/usr/ruby/$(RUBY_VER) |
|
56 |
PROTO_RBCONFIG_FILE=$(PROTORUBYDIR)/lib/ruby/$(RUBY_LIB_VER)/i386-solaris$(SOLARIS_VERSION)/rbconfig.rb |
|
57 |
|
|
58 |
# these macros are used in the package manifest |
|
59 |
PKG_MACROS+= RUBY_VER=$(RUBY_VER) RUBY_LIB_VER=$(RUBY_LIB_VER) |
|
60 |
|
|
61 |
# Apply some of the edits here--including to the sed scripts themselves. |
|
62 |
# These modifications of ruby.1 must occur after ruby |
|
63 |
# is installed, not before. Although there are some other patches |
|
64 |
# to ruby.1 that occur before, the ruby installation does some |
|
65 |
# formatting of ruby.1 that won't occur if the below changes |
|
66 |
# are applied. |
|
67 |
# Fix generated rbconfig.rb using /usr/bin/sed; gsed doesn't |
|
68 |
# work for some of the commands in rbconfig.sedscript. |
|
69 |
COMPONENT_POST_INSTALL_ACTION += \ |
|
70 |
$(GSED) -e "s/RUBY_VER/$(RUBY_VER)/" \ |
|
71 |
-e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" Solaris/gem.1-generic \ |
|
72 |
> Solaris/gem.1 ; \ |
|
73 |
$(GSED) -e "s/RUBY_VER/$(RUBY_VER)/" \ |
|
74 |
-e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" Solaris/ruby.1.sedscript \ |
|
75 |
> Solaris/ruby.1.sedscript.mod ; \ |
|
76 |
$(GSED) -e "s/RUBY_VER/$(RUBY_VER)/" \ |
03845d
|
77 |
-e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" \ |
AL |
78 |
-e "s,%%CC%%,$(CC)," \ |
|
79 |
-e "s,%%CXX%%,$(CXX)," \ |
|
80 |
Solaris/rbconfig.sedscript \ |
de0880
|
81 |
> Solaris/rbconfig.sedscript.mod ; \ |
SA |
82 |
$(GSED) -i -f Solaris/ruby.1.sedscript.mod \ |
|
83 |
$(PROTORUBYDIR)/share/man/man1/ruby.1 ; \ |
|
84 |
/usr/bin/sed -f Solaris/rbconfig.sedscript.mod \ |
|
85 |
$(PROTO_RBCONFIG_FILE) > rbconfig.rb.mod ; \ |
|
86 |
$(MV) rbconfig.rb.mod $(PROTO_RBCONFIG_FILE) |
|
87 |
|
|
88 |
# default LD_OPTION $(LD_B_DIRECT) causes problems-- |
|
89 |
# during install of ruby, ruby is executed and will core dump |
|
90 |
# after compiling with this option |
|
91 |
LD_B_DIRECT= |
|
92 |
|
|
93 |
# don't use LD_Z_IGNORE: causes ruby linker problems with |
|
94 |
# unreferenced symbol tgetent in libreadline, similar to bug #15617172 |
|
95 |
LD_Z_IGNORE= |
03845d
|
96 |
|
AL |
97 |
# Set the locale to generate documentation correctly |
|
98 |
COMPONENT_BUILD_ENV += LC_ALL=en_US.UTF-8 |
|
99 |
COMPONENT_INSTALL_ENV += LC_ALL=en_US.UTF-8 |
de0880
|
100 |
|
SA |
101 |
CONFIGURE_PREFIX = $(USRDIR)/$(COMPONENT_NAME)/$(RUBY_VER) |
|
102 |
|
|
103 |
CONFIGURE_OPTIONS += --with-rubylibprefix=$(CONFIGURE_LIBDIR.32)/ruby |
|
104 |
CONFIGURE_OPTIONS += --enable-shared |
|
105 |
CONFIGURE_OPTIONS += --enable-rpath |
|
106 |
CONFIGURE_OPTIONS += --enable-dtrace |
|
107 |
# Don't need docs for ruby C source files |
|
108 |
CONFIGURE_OPTIONS += --disable-install-capi |
|
109 |
CONFIGURE_OPTIONS += --disable-option-checking |
|
110 |
CONFIGURE_OPTIONS += --with-openssl |
|
111 |
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)" |
|
112 |
|
|
113 |
# fiddle.so (ext/fiddle) links to libffi, which does not define |
|
114 |
# ffi_raw_size(), although its prototype is in libffi's |
|
115 |
# /usr/lib/libffi-3.0/include/ffi.h header file. |
|
116 |
# Defining FFI_NO_RAW_API avoids use of ffi_raw_size(). |
|
117 |
# This is a workaround to bug |
|
118 |
# 17349280 - libffi is missing ffi_raw_size() |
|
119 |
CFLAGS += -DFFI_NO_RAW_API |
|
120 |
|
|
121 |
CLEAN_PATHS += Solaris/gem.1 Solaris/rbconfig.sedscript.mod \ |
|
122 |
Solaris/ruby.1.sedscript.mod |
|
123 |
|
ee0b88
|
124 |
include $(WS_MAKE_RULES)/shared-targets.mk |
de0880
|
125 |
|
SA |
126 |
# common targets |
|
127 |
|
|
128 |
build: $(BUILD_32) |
|
129 |
|
ee0b88
|
130 |
install: $(INSTALL_32) |
de0880
|
131 |
|
69e943
|
132 |
# 16026 tests, 2239031 assertions, 0 failures, 1 errors, 47 skips |
5c591c
|
133 |
# RuntimeError: Error in TestGem#test_self_install_in_rescue |
de0880
|
134 |
test: $(TEST_32) |
SA |
135 |
|
03845d
|
136 |
# Auto-generated dependencies |
AL |
137 |
REQUIRED_PACKAGES += SUNWcs |
5c591c
|
138 |
REQUIRED_PACKAGES += library/database/gdbm |
AP |
139 |
REQUIRED_PACKAGES += library/libffi |
|
140 |
REQUIRED_PACKAGES += library/libyaml |
|
141 |
REQUIRED_PACKAGES += library/ncurses |
|
142 |
REQUIRED_PACKAGES += library/readline |
|
143 |
REQUIRED_PACKAGES += library/security/openssl |
|
144 |
REQUIRED_PACKAGES += library/zlib |
|
145 |
REQUIRED_PACKAGES += runtime/ruby-23 |
|
146 |
REQUIRED_PACKAGES += runtime/ruby-23/ruby-tk |
|
147 |
REQUIRED_PACKAGES += runtime/tcl-8 |
|
148 |
REQUIRED_PACKAGES += runtime/tk-8 |
|
149 |
REQUIRED_PACKAGES += shell/bash |
|
150 |
REQUIRED_PACKAGES += system/library |
6e938f
|
151 |
REQUIRED_PACKAGES += system/library/g++-6-runtime |
5c591c
|
152 |
REQUIRED_PACKAGES += system/library/math |
AP |
153 |
REQUIRED_PACKAGES += x11/library/libx11 |