Makefile revision 4577
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# CDDL HEADER START
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# The contents of this file are subject to the terms of the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# Common Development and Distribution License (the "License").
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# You may not use this file except in compliance with the License.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# See the License for the specific language governing permissions
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# and limitations under the License.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# When distributing Covered Code, include this CDDL HEADER in each
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# file and include the License file at usr/src/OPENSOLARIS.LICENSE.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# If applicable, add the following below this CDDL HEADER, with the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# fields enclosed by brackets "[]" replaced with your own identifying
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# information: Portions Copyright [yyyy] [name of copyright owner]
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# CDDL HEADER END
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# Copyright (c) 2013, 2015, Oracle and/or its affiliates. All rights reserved.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync $(COMPONENT_NAME)-$(COMPONENT_VERSION)-p$(COMPONENT_PATCH_VERSION)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync sha256:bb5be55cd1f49c95bb05b6f587701376b53d310eb1bb7c76fbd445a1c75b51e8
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync http://ftp.ruby-lang.org/pub/ruby/1.9/$(COMPONENT_ARCHIVE)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncIPS_COMPONENT_VERSION= $(COMPONENT_VERSION).$(COMPONENT_PATCH_VERSION)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# COMPONENT_VERSION <major>.<minor>.<teeny>
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# is transformed into <major>.<minor> for RUBY_VER.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# First change the separator '.' to ' ', so we can use "word" to pull the
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# first two space-separated words from the string.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncRUBY_VER=$(word 1,$(RUBY_VER_WORDS)).$(word 2,$(RUBY_VER_WORDS))
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# the library-compatible version
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncPROTO_RBCONFIG_FILE=$(PROTORUBYDIR)/lib/ruby/$(RUBY_LIB_VER)/$(MACH64)-solaris$(SOLARIS_VERSION)/rbconfig.rb
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# these macros are used in the package manifest
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncPKG_MACROS+= RUBY_VER=$(RUBY_VER) RUBY_LIB_VER=$(RUBY_LIB_VER)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# Apply some of the edits here--including to the sed scripts themselves.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# These modifications of ruby.1 must occur after ruby
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# is installed, not before. Although there are some other patches
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# to ruby.1 that occur before, the ruby installation does some
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# formatting of ruby.1 that won't occur if the below changes
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# are applied.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# Fix generated rbconfig.rb using /usr/bin/sed; gsed doesn't
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# work for some of the commands in rbconfig.sedscript.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync -e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" Solaris/gem.1-generic \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync -e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" Solaris/ruby.1.sedscript \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync -e "s/RUBY_LIB_VER/$(RUBY_LIB_VER)/" Solaris/rbconfig.sedscript \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# default LD_OPTION $(LD_B_DIRECT) causes problems--
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# during install of ruby, ruby is executed and will core dump
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# after compiling with this option
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# don't use LD_Z_IGNORE: causes ruby linker problems with
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# unreferenced symbol tgetent in libreadline, similar to bug #15617172
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# i386 build runs into a Solaris ube compiler bug (#16775467)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# while compiling load.c; it's having trouble with -xO4, so work around
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# by using -xO3 instead. 16775467 was patched for 12.1 compiler, so
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# the below should not no longer be necessary when we switch to
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# the 12.3 compiler
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# without this define, config fails frequently on i386 when including
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# /usr/include/sys/isa_defs.h with error: "ISA not supported";
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# many extensions don't get built and at least one error causes
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# the build to fail
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCONFIGURE_PREFIX = $(USRDIR)/$(COMPONENT_NAME)/$(RUBY_VER)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# change CONFIGURE_BINDIR.64 because this path will be embedded in
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# the header for ruby scripts; we are only building 64-bit,
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# so the real path for ruby will not have $(MACH64) in it
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# not strictly needed, since ruby doesn't use sbin, but
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# change this as well, for consistency with BINDIR
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# we are building 64-bit, but most of the ruby libraries (*.rb files)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# are non-bit-specfic text files, so don't put them under lib/$(MACH64).
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# The 64-bit *.so libraries will be in the $(MACH64)-solaris$(SOLARIS_VERSION)
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# arch directories under lib
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCONFIGURE_OPTIONS += --with-rubylibprefix=$(CONFIGURE_LIBDIR.32)/ruby
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# Don't need docs for ruby C source files
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# If Ruby is configured with __builtin_setjmp, may cause
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# problems with gems compiled with gcc. Studio compiler doesn't
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# report an error for __builtin_setjmp, but gcc would.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# fiddle.so (ext/fiddle) links to libffi, which does not define
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# ffi_raw_size(), although its prototype is in libffi's
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# /usr/lib/libffi-3.0/include/ffi.h header file.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# Defining FFI_NO_RAW_API avoids use of ffi_raw_size().
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# This is a workaround to bug
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# 17349280 - libffi is missing ffi_raw_size()
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# keep ASLR disabled;
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# miniruby may core dump on sparc during build
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsyncCLEAN_PATHS += Solaris/gem.1 Solaris/rbconfig.sedscript.mod \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# This set of tests goes through thousands of entries in the passwd
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# and group table, taking hours to run; move it aside so we skip it.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# There may also be spurious errors if group memberships are modified
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# during testing.
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync ( if test -e $(SOURCE_DIR)/test/etc/test_etc.rb ; then \
e0e0c19eefceaf5d4ec40f9466b58a771f50e799vboxsync# common targets