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.
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.
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]
23 # Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
25 # sed script to fix the rbconfig.rb file after
26 # the configure and install of ruby
28 # use gcc/g++ instead of build-system-specific paths to cc or CC
30 # Note that for the first two command lines below,
31 # /usr/bin/sed correctly substitutes; /usr/bin/gsed does not.
32 # Use /usr/bin/sed for this script.
33 s|\'CC=.*/cc\'|\'CC=%%CC%%\'|
34 s|\'CXX=.*/CC\'|\'CXX=%%CXX%%\'|
35 s|CONFIG\[\"CC\"\].*$|CONFIG\[\"CC\"\] = \"%%CC%%\"|
36 s|CONFIG\[\"CXX\"\].*$|CONFIG\[\"CXX\"\] = \"%%CXX%%\"|
37 s/CONFIG\[\"CFLAGS\"\].*$/CONFIG\[\"CFLAGS\"\] = \"-g -O3 -fPIC\"/
38 s/CONFIG\[\"CCDLFLAGS\"\].*$/CONFIG\[\"CCDLFLAGS\"\] = \"-fPIC\"/
39 s/"$(CC) -G"/"$(CC) -shared"/
40 s/"$(CXX) -G"/"$(CXX) -shared"/
42 # These paths to GNU commands are symlinks which are only available when
43 # the pkg facet.gnu-links is true, so use the non-faceted paths
44 s/\/usr\/bin\/ginstall/\/usr\/gnu\/bin\/install/
45 s/\/usr\/bin\/gmkdir/\/usr\/gnu\/bin\/mkdir/
46 s/\/usr\/bin\/gsed/\/usr\/gnu\/bin\/sed/
48 # add this line to the end of the file
50 ENV["GEM_HOME"] = "/usr/ruby/RUBY_VER/lib/ruby/gems/RUBY_LIB_VER"