components/ruby/ruby-19/Makefile
author April Chin <april.chin@oracle.com>
Thu, 24 Apr 2014 21:55:05 -0700
changeset 1851 2adf57930fd6
parent 1756 3579365335ef
child 1948 2d1537e7942d
permissions -rw-r--r--
18622849 Ruby 1.9.3 doc files should not contain build dir pathnames
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1482
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
     1
#
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
     3
#
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
     7
#
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    12
#
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    18
#
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    20
#
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    21
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    22
#
1672
f8a020ae6d09 17885116 Update ruby 1.9 to 1.9.3-p484
April Chin <april.chin@oracle.com>
parents: 1482
diff changeset
    23
# Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
1482
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    24
#
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    25
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    26
include ../../../make-rules/shared-macros.mk
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    27
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    28
COMPONENT_NAME=		ruby
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    29
COMPONENT_VERSION=	1.9.3
1672
f8a020ae6d09 17885116 Update ruby 1.9 to 1.9.3-p484
April Chin <april.chin@oracle.com>
parents: 1482
diff changeset
    30
COMPONENT_PATCH_VERSION=	484
1482
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    31
COMPONENT_PROJECT_URL=	http://www.ruby-lang.org/
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    32
COMPONENT_SRC=	\
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    33
	$(COMPONENT_NAME)-$(COMPONENT_VERSION)-p$(COMPONENT_PATCH_VERSION)
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    34
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.gz
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    35
COMPONENT_ARCHIVE_HASH=	\
1672
f8a020ae6d09 17885116 Update ruby 1.9 to 1.9.3-p484
April Chin <april.chin@oracle.com>
parents: 1482
diff changeset
    36
    sha256:d684bc3a5ba72cda9ef30039f783c0f8cdc325bae5c8738c7bf05577cbe8f31d
1482
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    37
COMPONENT_ARCHIVE_URL=	\
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    38
	http://ftp.ruby-lang.org/pub/ruby/1.9/$(COMPONENT_ARCHIVE)
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    39
IPS_COMPONENT_VERSION=	$(COMPONENT_VERSION).$(COMPONENT_PATCH_VERSION)
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    40
COMPONENT_BUGDB=	utility/ruby
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    41
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    42
include $(WS_TOP)/make-rules/prep.mk
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    43
include $(WS_TOP)/make-rules/ips.mk
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    44
include $(WS_TOP)/make-rules/configure.mk
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    45
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    46
# COMPONENT_VERSION <major>.<minor>.<teeny>
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    47
# is transformed into <major>.<minor> for RUBY_VER.
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    48
# First change the separator '.' to ' ', so we can use "word" to pull the 
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    49
# first two space-separated words from the string.
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    50
RUBY_VER_WORDS=	$(subst ., ,$(COMPONENT_VERSION))
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    51
RUBY_VER=$(word 1,$(RUBY_VER_WORDS)).$(word 2,$(RUBY_VER_WORDS))
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    52
# the library-compatible version
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    53
RUBY_LIB_VER=1.9.1
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    54
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    55
PROTORUBYDIR=$(PROTO_DIR)/usr/ruby/$(RUBY_VER)
1756
3579365335ef 17591620 ruby 1.9 should not have its *.rb text files under amd64/sparcv9 directories
April Chin <april.chin@oracle.com>
parents: 1701
diff changeset
    56
PROTO_RBCONFIG_FILE=$(PROTORUBYDIR)/lib/ruby/$(RUBY_LIB_VER)/$(MACH64)-solaris$(SOLARIS_VERSION)/rbconfig.rb
1482
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    57
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    58
# these macros are used in the package manifest
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    59
PKG_MACROS+=	RUBY_VER=$(RUBY_VER) RUBY_LIB_VER=$(RUBY_LIB_VER)
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    60
1851
2adf57930fd6 18622849 Ruby 1.9.3 doc files should not contain build dir pathnames
April Chin <april.chin@oracle.com>
parents: 1756
diff changeset
    61
# Apply some of the edits here--including to the sed scripts themselves.
1482
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    62
# These modifications of ruby.1 must occur after ruby
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    63
# is installed, not before.  Although there are some other patches
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    64
# to ruby.1 that occur before, the ruby installation does some 
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    65
# formatting of ruby.1 that won't occur if the below changes
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    66
# are applied.
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    67
# Fix generated rbconfig.rb using /usr/bin/sed; gsed doesn't 
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    68
# work for some of the commands in rbconfig.sedscript.
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    69
COMPONENT_POST_INSTALL_ACTION += \
1851
2adf57930fd6 18622849 Ruby 1.9.3 doc files should not contain build dir pathnames
April Chin <april.chin@oracle.com>
parents: 1756
diff changeset
    70
	$(GSED) -e "s/RUBY_VER/$(RUBY_VER)/" \
1482
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    71
	    -e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" Solaris/gem.1-generic \
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    72
	    > Solaris/gem.1 ; \
1756
3579365335ef 17591620 ruby 1.9 should not have its *.rb text files under amd64/sparcv9 directories
April Chin <april.chin@oracle.com>
parents: 1701
diff changeset
    73
	$(GSED) -e "s/RUBY_VER/$(RUBY_VER)/" \
1482
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    74
	    -e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" Solaris/ruby.1.sedscript \
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    75
	    > Solaris/ruby.1.sedscript.mod ; \
1851
2adf57930fd6 18622849 Ruby 1.9.3 doc files should not contain build dir pathnames
April Chin <april.chin@oracle.com>
parents: 1756
diff changeset
    76
	$(GSED) -e  "s/RUBY_VER/$(RUBY_VER)/" \
1482
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    77
	    -e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" Solaris/rbconfig.sedscript \
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    78
	    > Solaris/rbconfig.sedscript.mod ; \
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    79
	$(GSED) -i -f Solaris/ruby.1.sedscript.mod \
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    80
	    $(PROTORUBYDIR)/share/man/man1/ruby.1 ; \
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    81
	/usr/bin/sed -f Solaris/rbconfig.sedscript.mod \
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    82
	$(PROTO_RBCONFIG_FILE) > rbconfig.rb.mod ; \
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    83
	$(MV) rbconfig.rb.mod $(PROTO_RBCONFIG_FILE)
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    84
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    85
# default LD_OPTION $(LD_B_DIRECT) causes problems--
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    86
# during install of ruby, ruby is executed and will core dump
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    87
# after compiling with this option
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    88
LD_B_DIRECT=
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    89
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    90
# don't use LD_Z_IGNORE: causes ruby linker problems with 
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    91
# unreferenced symbol tgetent in libreadline, similar to bug #15617172
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    92
LD_Z_IGNORE=
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    93
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    94
# i386 build runs into a Solaris ube compiler bug (#16775467) 
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    95
# while compiling load.c; it's having trouble with -xO4, so work around
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    96
# by using -xO3 instead.  16775467 was patched for 12.1 compiler, so
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    97
# the below should not no longer be necessary when we switch to 
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    98
# the 12.3 compiler
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
    99
studio_OPT.i386.64 = -xO3
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   100
1701
279ed2832e3f 18176569 userland should move to studio 12.3
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1672
diff changeset
   101
# sparc build sometimes fails with studio 12.3 because of 17537968.
279ed2832e3f 18176569 userland should move to studio 12.3
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1672
diff changeset
   102
studio_OPT.sparc.64 = -xO3
279ed2832e3f 18176569 userland should move to studio 12.3
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 1672
diff changeset
   103
1482
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   104
# without this define, config fails frequently on i386 when including 
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   105
# /usr/include/sys/isa_defs.h with error: "ISA not supported";
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   106
# many extensions don't get built and at least one error causes 
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   107
# the build to fail
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   108
studio_XBITS.i386.64 += -D__amd64
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   109
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   110
CONFIGURE_PREFIX =	$(USRDIR)/$(COMPONENT_NAME)/$(RUBY_VER)
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   111
# change CONFIGURE_BINDIR.64 because this path will be embedded in
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   112
# the header for ruby scripts; we are only building 64-bit,
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   113
# so the real path for ruby will not have $(MACH64) in it
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   114
CONFIGURE_BINDIR.64 =   $(CONFIGURE_BINDIR.32)
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   115
# not strictly needed, since ruby doesn't use sbin, but
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   116
# change this as well, for consistency with BINDIR
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   117
CONFIGURE_SBINDIR.64 =   $(CONFIGURE_SBINDIR.32)
1756
3579365335ef 17591620 ruby 1.9 should not have its *.rb text files under amd64/sparcv9 directories
April Chin <april.chin@oracle.com>
parents: 1701
diff changeset
   118
3579365335ef 17591620 ruby 1.9 should not have its *.rb text files under amd64/sparcv9 directories
April Chin <april.chin@oracle.com>
parents: 1701
diff changeset
   119
# we are building 64-bit, but most of the ruby libraries (*.rb files)
3579365335ef 17591620 ruby 1.9 should not have its *.rb text files under amd64/sparcv9 directories
April Chin <april.chin@oracle.com>
parents: 1701
diff changeset
   120
# are non-bit-specfic text files, so don't put them under lib/$(MACH64).
3579365335ef 17591620 ruby 1.9 should not have its *.rb text files under amd64/sparcv9 directories
April Chin <april.chin@oracle.com>
parents: 1701
diff changeset
   121
# The 64-bit *.so libraries will be in the $(MACH64)-solaris$(SOLARIS_VERSION)
3579365335ef 17591620 ruby 1.9 should not have its *.rb text files under amd64/sparcv9 directories
April Chin <april.chin@oracle.com>
parents: 1701
diff changeset
   122
# arch directories under lib
3579365335ef 17591620 ruby 1.9 should not have its *.rb text files under amd64/sparcv9 directories
April Chin <april.chin@oracle.com>
parents: 1701
diff changeset
   123
3579365335ef 17591620 ruby 1.9 should not have its *.rb text files under amd64/sparcv9 directories
April Chin <april.chin@oracle.com>
parents: 1701
diff changeset
   124
CONFIGURE_OPTIONS +=	--with-rubylibprefix=$(CONFIGURE_LIBDIR.32)/ruby
1482
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   125
CONFIGURE_OPTIONS +=	--enable-shared
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   126
CONFIGURE_OPTIONS +=	--enable-rpath
1851
2adf57930fd6 18622849 Ruby 1.9.3 doc files should not contain build dir pathnames
April Chin <april.chin@oracle.com>
parents: 1756
diff changeset
   127
# Don't need docs for ruby C source files
2adf57930fd6 18622849 Ruby 1.9.3 doc files should not contain build dir pathnames
April Chin <april.chin@oracle.com>
parents: 1756
diff changeset
   128
CONFIGURE_OPTIONS +=	--disable-install-capi
1482
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   129
CONFIGURE_OPTIONS +=	--disable-option-checking
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   130
CONFIGURE_OPTIONS +=	--with-openssl
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   131
CONFIGURE_OPTIONS +=	CFLAGS="$(CFLAGS)"
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   132
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   133
# fiddle.so (ext/fiddle) links to libffi, which does not define
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   134
# ffi_raw_size(), although its prototype is in libffi's 
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   135
# /usr/lib/libffi-3.0/include/ffi.h header file.  
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   136
# Defining FFI_NO_RAW_API avoids use of ffi_raw_size().
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   137
# This is a workaround to bug
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   138
# 17349280 - libffi is missing ffi_raw_size()
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   139
CFLAGS +=		-DFFI_NO_RAW_API
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   140
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   141
# keep ASLR disabled; 
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   142
# miniruby may core dump on sparc during build
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   143
ASLR_MODE =		$(ASLR_DISABLE)
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   144
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   145
CLEAN_PATHS +=		Solaris/gem.1 Solaris/rbconfig.sedscript.mod \
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   146
			Solaris/ruby.1.sedscript.mod
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   147
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   148
include $(WS_TOP)/make-rules/shared-targets.mk
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   149
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   150
# common targets
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   151
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   152
build:		$(BUILD_64)
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   153
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   154
install:	build $(INSTALL_64)
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   155
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   156
test:	$(TEST_64)
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   157
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   158
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   159
7a1f84fbc2d7 PSARC/2013/269 Add Ruby 1.9.3 and EOF and Remove Ruby 1.8.7
April Chin <april.chin@oracle.com>
parents:
diff changeset
   160
include $(WS_TOP)/make-rules/depend.mk