Commit cdec5c2daf2cdf5f02a4322a45e3d2afe0882413
1 parent
7dda9bf0
Exists in
6-7-stable-ee
and in
1 other branch
Vendor libyaml software definition
Source: ihttps://github.com/opscode/omnibus-software/blob/0dddef2baefd5f62dd38ff2ae6e5491bfb394479/config/software/libyaml.rb
Showing
1 changed file
with
62 additions
and
0 deletions
Show diff stats
| @@ -0,0 +1,62 @@ | @@ -0,0 +1,62 @@ | ||
| 1 | +# | ||
| 2 | +# Copyright:: Copyright (c) 2012-2014 Chef Software, Inc. | ||
| 3 | +# License:: Apache License, Version 2.0 | ||
| 4 | +# | ||
| 5 | +# Licensed under the Apache License, Version 2.0 (the "License"); | ||
| 6 | +# you may not use this file except in compliance with the License. | ||
| 7 | +# You may obtain a copy of the License at | ||
| 8 | +# | ||
| 9 | +# http://www.apache.org/licenses/LICENSE-2.0 | ||
| 10 | +# | ||
| 11 | +# Unless required by applicable law or agreed to in writing, software | ||
| 12 | +# distributed under the License is distributed on an "AS IS" BASIS, | ||
| 13 | +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
| 14 | +# See the License for the specific language governing permissions and | ||
| 15 | +# limitations under the License. | ||
| 16 | +# | ||
| 17 | + | ||
| 18 | +name "libyaml" | ||
| 19 | +default_version '0.1.6' | ||
| 20 | + | ||
| 21 | +source :url => "http://pyyaml.org/download/libyaml/yaml-#{version}.tar.gz", | ||
| 22 | + :md5 => '5fe00cda18ca5daeb43762b80c38e06e' | ||
| 23 | + | ||
| 24 | +relative_path "yaml-#{version}" | ||
| 25 | + | ||
| 26 | +configure_env = | ||
| 27 | + case platform | ||
| 28 | + when "aix" | ||
| 29 | + { | ||
| 30 | + "CC" => "xlc -q64", | ||
| 31 | + "CXX" => "xlC -q64", | ||
| 32 | + "LD" => "ld -b64", | ||
| 33 | + "CFLAGS" => "-q64 -I#{install_dir}/embedded/include -O", | ||
| 34 | + "LDFLAGS" => "-q64 -Wl,-blibpath:/usr/lib:/lib", | ||
| 35 | + "OBJECT_MODE" => "64", | ||
| 36 | + "ARFLAGS" => "-X64 cru", | ||
| 37 | + "LD" => "ld -b64", | ||
| 38 | + "OBJECT_MODE" => "64", | ||
| 39 | + "ARFLAGS" => "-X64 cru " | ||
| 40 | + } | ||
| 41 | + when "mac_os_x" | ||
| 42 | + { | ||
| 43 | + "LDFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include", | ||
| 44 | + "CFLAGS" => "-I#{install_dir}/embedded/include -L#{install_dir}/embedded/lib" | ||
| 45 | + } | ||
| 46 | + when "solaris2" | ||
| 47 | + { | ||
| 48 | + "LDFLAGS" => "-R#{install_dir}/embedded/lib -L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -static-libgcc", | ||
| 49 | + "CFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include -DNO_VIZ" | ||
| 50 | + } | ||
| 51 | + else | ||
| 52 | + { | ||
| 53 | + "LDFLAGS" => "-L#{install_dir}/embedded/lib -I#{install_dir}/embedded/include", | ||
| 54 | + "CFLAGS" => "-I#{install_dir}/embedded/include -L#{install_dir}/embedded/lib" | ||
| 55 | + } | ||
| 56 | + end | ||
| 57 | + | ||
| 58 | +build do | ||
| 59 | + command "./configure --prefix=#{install_dir}/embedded", :env => configure_env | ||
| 60 | + command "make -j #{max_build_jobs}", :env => configure_env | ||
| 61 | + command "make -j #{max_build_jobs} install", :env => configure_env | ||
| 62 | +end |