components/ruby/ruby-18/Makefile
author John Beck <John.Beck@Oracle.COM>
Fri, 13 Jun 2014 12:36:52 -0700
changeset 1948 2d1537e7942d
parent 1933 2d7204747a3f
permissions -rw-r--r--
18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     1
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     2
# CDDL HEADER START
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     3
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     4
# The contents of this file are subject to the terms of the
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     5
# Common Development and Distribution License (the "License").
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     6
# You may not use this file except in compliance with the License.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     7
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     8
# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
     9
# or http://www.opensolaris.org/os/licensing.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    10
# See the License for the specific language governing permissions
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    11
# and limitations under the License.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    12
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    13
# When distributing Covered Code, include this CDDL HEADER in each
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    14
# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    15
# If applicable, add the following below this CDDL HEADER, with the
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    16
# fields enclosed by brackets "[]" replaced with your own identifying
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    17
# information: Portions Copyright [yyyy] [name of copyright owner]
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    18
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    19
# CDDL HEADER END
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    20
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    21
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    22
#
1933
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
    23
# Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    24
#
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    25
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: 1405
diff changeset
    26
include ../../../make-rules/shared-macros.mk
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    27
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    28
COMPONENT_NAME=		ruby
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    29
COMPONENT_VERSION=	1.8.7
1392
812d4bf54f42 17075828 upgrade ruby to 1.8.7-p374
April Chin <april.chin@oracle.com>
parents: 1289
diff changeset
    30
COMPONENT_PATCH_VERSION=	374
609
775168282b2f 7037821 Userland migration of data from Makefile to manifest may have been a little overzealous
Rich Burridge <rich.burridge@oracle.com>
parents: 199
diff changeset
    31
COMPONENT_PROJECT_URL=	http://www.ruby-lang.org/
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    32
COMPONENT_SRC=		$(COMPONENT_NAME)-$(COMPONENT_VERSION)-p$(COMPONENT_PATCH_VERSION)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    33
COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 688
diff changeset
    34
COMPONENT_ARCHIVE_HASH=	\
1392
812d4bf54f42 17075828 upgrade ruby to 1.8.7-p374
April Chin <april.chin@oracle.com>
parents: 1289
diff changeset
    35
    sha256:b4e34703137f7bfb8761c4ea474f7438d6ccf440b3d35f39cc5e4d4e239c07e3
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    36
COMPONENT_ARCHIVE_URL=	http://ftp.ruby-lang.org/pub/ruby/1.8/$(COMPONENT_ARCHIVE)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    37
IPS_COMPONENT_VERSION=	$(COMPONENT_VERSION).$(COMPONENT_PATCH_VERSION)
1058
34d7aaa03423 15886624 Auto-generation of Userland gate list - Phase 3
Rich Burridge <rich.burridge@oracle.com>
parents: 800
diff changeset
    38
COMPONENT_BUGDB=	utility/ruby
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    39
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    40
# rubygems 
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    41
COMPONENT_SRC_1=	rubygems-1.3.5
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    42
COMPONENT_ARCHIVE_1=	$(COMPONENT_SRC_1).tgz
800
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 688
diff changeset
    43
COMPONENT_ARCHIVE_HASH_1=	\
2ad056ed89ec 7163771 sha1 should not be used in userland-fetch and userland component/*/Makefile
Mike Sullivan <Mike.Sullivan@Oracle.COM>
parents: 688
diff changeset
    44
    sha256:c0928cc1ae54dedfb5f57ad3829882c1f90e42bc17bf50491aa6f93a937546ac
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    45
COMPONENT_ARCHIVE_URL_1=	http://production.cf.rubygems.org/rubygems/$(COMPONENT_ARCHIVE_1)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    46
1948
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1933
diff changeset
    47
TPNO=			14356
2d1537e7942d 18978320 Userland components should specify TPNOs in Makefiles instead of pkg manifests
John Beck <John.Beck@Oracle.COM>
parents: 1933
diff changeset
    48
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    49
SOURCE_DIR_1=$(COMPONENT_DIR)/$(COMPONENT_SRC_1)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    50
CLEAN_PATHS += $(SOURCE_DIR_1)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    51
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    52
include $(WS_TOP)/make-rules/prep.mk
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    53
include $(WS_TOP)/make-rules/ips.mk
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    54
include $(WS_TOP)/make-rules/configure.mk
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    55
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    56
# COMPONENT_VERSION <major>.<minor>.<teeny>
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    57
# is transformed into <major>.<minor> for RUBY_VER.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    58
# First change the separator '.' to ' ', so we can use "word" to pull the 
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    59
# first two space-separated words from the string.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    60
RUBY_VER_WORDS=	$(subst ., ,$(COMPONENT_VERSION))
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    61
RUBY_VER=$(word 1,$(RUBY_VER_WORDS)).$(word 2,$(RUBY_VER_WORDS))
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    62
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    63
GEMHOME=/var/ruby/$(RUBY_VER)/gem_home
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    64
PROTORUBYDIR=$(PROTO_DIR)/usr/ruby/$(RUBY_VER)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    65
PROTOGEMHOME=$(PROTO_DIR)$(GEMHOME)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    66
RUBYGEMS_INSTALL_TARGET=$(PROTORUBYDIR)/bin/gem
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    67
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    68
PROTO_RBCONFIG_FILE=$(PROTORUBYDIR)/lib/ruby/$(RUBY_VER)/$(MACH)-solaris$(SOLARIS_VERSION)/rbconfig.rb
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    69
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    70
# these macros are used in the package manifest
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    71
PKG_MACROS+=	RUBY_VER=$(RUBY_VER)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    72
1567
b5493d203180 17650524 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1482
diff changeset
    73
# patches to rubygems are in a separate directory from the ruby patches
b5493d203180 17650524 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1482
diff changeset
    74
PATCH_DIR_1 = rubygems-patches
b5493d203180 17650524 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1482
diff changeset
    75
PATCHES_1 = $(shell find $(PATCH_DIR_1) -type f -name $(PATCH_PATTERN) \
b5493d203180 17650524 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1482
diff changeset
    76
    2>/dev/null | sort)
b5493d203180 17650524 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1482
diff changeset
    77
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    78
# Since configure.in is patched, we need to autoconf after the patch.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    79
# Also, unpack the 2nd archive for rubygems.
1567
b5493d203180 17650524 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1482
diff changeset
    80
# Rubygems has patches, but it does not use configure nor make.
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    81
COMPONENT_PREP_ACTION = (cd $(@D) ; autoconf); \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    82
	$(RM) -r $(SOURCE_DIR_1); \
1567
b5493d203180 17650524 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1482
diff changeset
    83
	$(UNPACK) $(UNPACK_ARGS) $(USERLAND_ARCHIVES)$(COMPONENT_ARCHIVE_1); \
b5493d203180 17650524 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1482
diff changeset
    84
	$(foreach patch,$(PATCHES_1), \
1584
7acd6f4409b8 17884834 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1567
diff changeset
    85
	$(GPATCH) -d $(SOURCE_DIR_1) $(GPATCH_FLAGS) < $(patch); )
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    86
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    87
# These modifications of ruby.1 must occur after ruby
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    88
# is installed, not before.  Although there are some other patches
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    89
# to ruby.1 that occur before, the ruby installation does some 
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    90
# formatting of ruby.1 that won't occur if the below changes
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    91
# are applied.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    92
COMPONENT_POST_INSTALL_ACTION += \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    93
	/bin/sed -f Solaris/ruby.1.sedscript \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    94
	$(PROTORUBYDIR)/share/man/man1/ruby.1 > ruby.1.mod ; \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    95
	$(MV) ruby.1.mod $(PROTORUBYDIR)/share/man/man1/ruby.1
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    96
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    97
# Fix generated rbconfig.rb.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    98
# This should NOT occur until AFTER rubygems installs;
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
    99
# otherwise the GEM_HOME setting added to rbconfig.rb will cause setup.rb
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   100
# to attempt (and fail) to install rubygems docs on the build system,
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   101
# rather than in the proto area.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   102
# Also fix magic line of gem script.
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   103
POST_RUBYGEMS_INSTALL_ACTION += \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   104
	/bin/sed -f Solaris/rbconfig.sedscript $(PROTO_RBCONFIG_FILE) \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   105
	> rbconfig.rb.mod ; \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   106
	$(MV) rbconfig.rb.mod $(PROTO_RBCONFIG_FILE) ; \
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: 1405
diff changeset
   107
	/bin/sed -e '1s;^\#!/.*;\#!/usr/ruby/$(RUBY_VER)/bin/ruby;' $(PROTORUBYDIR)/bin/gem \
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   108
	> gem.mod ; \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   109
	$(MV) gem.mod $(PROTORUBYDIR)/bin/gem
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   110
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   111
# dtrace only available for i386 at this time;
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   112
# on sparc, a compiler bug (CR #6659110) prevents use of dtrace
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   113
DTRACE_FLAG_i386 =	--enable-dtrace
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   114
DTRACE_FLAG =		$(DTRACE_FLAG_$(MACH))
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   115
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   116
# dtrace.d, created in source dir during patch for dtrace,
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   117
# is needed for building
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   118
DTRACE_PRE_BUILD_i386 =	$(CP) $(SOURCE_DIR)/dtrace.d $(BUILD_DIR_32) 
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   119
DTRACE_PRE_BUILD =	$(DTRACE_PRE_BUILD_$(MACH))
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   120
COMPONENT_PRE_BUILD_ACTION =	$(DTRACE_PRE_BUILD)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   121
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   122
# default LD_OPTION $(LD_B_DIRECT) causes problems--
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   123
# during install of ruby, ruby is executed and will core dump
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   124
# after compiling with this option
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   125
LD_B_DIRECT=
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   126
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   127
# don't use LD_Z_IGNORE: causes ruby linker problems with 
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   128
# unreferenced symbol tgetent in libreadline, similar to CR #6919344
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   129
LD_Z_IGNORE=
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   130
1289
e1ceeaee8d00 16763351 disable ASLR for ruby 1.8
April Chin <april.chin@oracle.com>
parents: 1282
diff changeset
   131
# keep ASLR disabled:
e1ceeaee8d00 16763351 disable ASLR for ruby 1.8
April Chin <april.chin@oracle.com>
parents: 1282
diff changeset
   132
# when building ruby, miniruby (used for boot-strapping ruby) may
e1ceeaee8d00 16763351 disable ASLR for ruby 1.8
April Chin <april.chin@oracle.com>
parents: 1282
diff changeset
   133
# core dump on sparc with ASLR enabled
e1ceeaee8d00 16763351 disable ASLR for ruby 1.8
April Chin <april.chin@oracle.com>
parents: 1282
diff changeset
   134
ASLR_MODE = $(ASLR_DISABLE)
1282
16201bef295c 16659836 enable ASLR for cmake, libmemcached, pconsole, pcre, php-5_2, php-5_3, ruby 1.8
April Chin <april.chin@oracle.com>
parents: 1058
diff changeset
   135
1405
2c1293ac112f 17200538 ruby Makefile fix for tests
April Chin <april.chin@oracle.com>
parents: 1392
diff changeset
   136
# Several of the drb tests will leave stray ruby processes behind;
2c1293ac112f 17200538 ruby Makefile fix for tests
April Chin <april.chin@oracle.com>
parents: 1392
diff changeset
   137
# move these tests aside so they won't be run by the test target.
2c1293ac112f 17200538 ruby Makefile fix for tests
April Chin <april.chin@oracle.com>
parents: 1392
diff changeset
   138
# They aren't needed by the build or packages, so we keep them 
2c1293ac112f 17200538 ruby Makefile fix for tests
April Chin <april.chin@oracle.com>
parents: 1392
diff changeset
   139
# renamed.
2c1293ac112f 17200538 ruby Makefile fix for tests
April Chin <april.chin@oracle.com>
parents: 1392
diff changeset
   140
COMPONENT_PRE_TEST_ACTION += \
2c1293ac112f 17200538 ruby Makefile fix for tests
April Chin <april.chin@oracle.com>
parents: 1392
diff changeset
   141
	if [ -e $(SOURCE_DIR)/test/drb/test_drbssl.rb ]; then \
2c1293ac112f 17200538 ruby Makefile fix for tests
April Chin <april.chin@oracle.com>
parents: 1392
diff changeset
   142
		$(MV) $(SOURCE_DIR)/test/drb/test_drbssl.rb $(SOURCE_DIR)/test/drb/test_drbssl.rb-save; \
2c1293ac112f 17200538 ruby Makefile fix for tests
April Chin <april.chin@oracle.com>
parents: 1392
diff changeset
   143
	fi
2c1293ac112f 17200538 ruby Makefile fix for tests
April Chin <april.chin@oracle.com>
parents: 1392
diff changeset
   144
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   145
CONFIGURE_PREFIX =	$(USRDIR)/$(COMPONENT_NAME)/$(RUBY_VER)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   146
CONFIGURE_OPTIONS += $(DTRACE_FLAG)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   147
CONFIGURE_OPTIONS += --enable-shared
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   148
CONFIGURE_OPTIONS += --enable-install-doc
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   149
CONFIGURE_OPTIONS += --disable-option-checking
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   150
CONFIGURE_OPTIONS += --with-openssl
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   151
CONFIGURE_OPTIONS += --with-tk-dir=/usr
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   152
CONFIGURE_OPTIONS += --with-curses-dir=/usr
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   153
CONFIGURE_OPTIONS += CFLAGS="$(CFLAGS)"
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   154
1933
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   155
# Also check rubygems source directory for files, since files in 
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   156
# lib/rubygems/ssl_cert are not installed into the proto area.
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   157
PKG_PROTO_DIRS += $(SOURCE_DIR_1)
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   158
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   159
include $(WS_TOP)/make-rules/shared-targets.mk
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   160
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   161
# common targets
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   162
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   163
build:		$(BUILD_32)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   164
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   165
install:	build $(INSTALL_32) $(RUBYGEMS_INSTALL_TARGET)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   166
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   167
# one expected failure in TestHTTP::HTTPConnectionTest
688
9333dc6e30ba 7127211 Problem with utility/ruby
April Chin <april.chin@oracle.com>
parents: 609
diff changeset
   168
# also possibly test_endblockwarn(TestBeginEndBlock), 
9333dc6e30ba 7127211 Problem with utility/ruby
April Chin <april.chin@oracle.com>
parents: 609
diff changeset
   169
# test_step_ruby_core_35753(TestRange)
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   170
test:	$(TEST_32)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   171
1933
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   172
# Note: testing rubygems requires the ruby 1.8 gems rake (v0.8.7+),
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   173
# hoe (v2.4.0+), and minitest (v1.3.1+), which are not in Solaris,
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   174
# so, as a normal user, first install the ruby 1.8 gems locally 
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   175
# (in your ~/.gem directory):
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   176
# gem18 install --user-install rake -v0.8.7
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   177
# gem18 install --user-install hoe -v2.4.0
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   178
# gem18 install --user-install minitest -v1.3.1
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   179
#
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   180
# Go to the rubygems source directory just below this component directory:
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   181
# cd rubygems-1.3.5
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   182
#
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   183
# And call the locally-installed rake to run the rubygems tests:
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   184
# ~/.gem/ruby/1.8/bin/rake
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   185
#
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   186
# There is one expected Error for the rubygems tests:
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   187
# test_handle_options_port(TestGemCommandsServerCommand):
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   188
# OptionParser::InvalidArgument: invalid argument: -p http: no such named service
2d7204747a3f 18849279 problem in UTILITY/RUBY
April Chin <april.chin@oracle.com>
parents: 1584
diff changeset
   189
199
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   190
# install rubygems using ruby installed in proto area
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   191
$(RUBYGEMS_INSTALL_TARGET):	$(INSTALL_32)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   192
	(cd $(COMPONENT_SRC_1); $(ENV) - \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   193
	"DESTDIR=$(PROTO_DIR)" \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   194
	LD_LIBRARY_PATH=$(PROTORUBYDIR)/lib \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   195
	GEM_HOME=$(PROTOGEMHOME) \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   196
	$(PROTORUBYDIR)/bin/ruby \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   197
	-I$(PROTORUBYDIR)/lib/ruby/1.8 \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   198
	-I$(PROTORUBYDIR)/lib/ruby/1.8/$(MACH)-solaris$(SOLARIS_VERSION) \
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   199
	setup.rb --vendor --destdir=$(PROTO_DIR) )
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   200
	$(POST_RUBYGEMS_INSTALL_ACTION)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   201
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   202
BUILD_PKG_DEPENDENCIES =	$(BUILD_TOOLS)
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   203
b87534be1a76 7023222 move ruby to userland
April Chin <april.chin@oracle.com>
parents:
diff changeset
   204
include $(WS_TOP)/make-rules/depend.mk