components/ruby/ruby-19/Solaris/rbconfig.sedscript
changeset 5477 5eabbdf042bc
parent 5476 f1df93f6aff1
child 5478 2b166911e3bb
equal deleted inserted replaced
5476:f1df93f6aff1 5477:5eabbdf042bc
     1 #
       
     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 # sed script to fix the rbconfig.rb file after 
       
    26 # the configure and install of ruby
       
    27 
       
    28 # use gcc/g++ instead of build-system-specific  paths to cc or CC
       
    29 
       
    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=\/usr\/bin\/gcc\'/
       
    34 s/\'CXX=.*\/CC\'/\'CXX=\/usr\/bin\/g++\'/
       
    35 s/CONFIG\[\"CC\"\].*$/CONFIG\[\"CC\"\] = \"\/usr\/bin\/gcc\"/
       
    36 s/CONFIG\[\"CXX\"\].*$/CONFIG\[\"CXX\"\] = \"\/usr\/bin\/g++\"/
       
    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"/
       
    41 
       
    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/
       
    47 
       
    48 # add this line to the end of the file
       
    49 $a\
       
    50 ENV["GEM_HOME"] = "/usr/ruby/RUBY_VER/lib/ruby/gems/RUBY_LIB_VER"