Commit b729c45dc4b1bd6c3d7721bbdab0ca5641175157

Authored by Jacob Vosmaer
1 parent 7e268572

Vendor libffi.rb from omnibus-software

Source:
https://github.com/opscode/omnibus-software/blob/7ac92daa6892e0898eb868679e578df530e38ee8/config/software/libffi.rb
Showing 1 changed file with 47 additions and 0 deletions   Show diff stats
config/software/libffi.rb 0 → 100644
@@ -0,0 +1,47 @@ @@ -0,0 +1,47 @@
  1 +#
  2 +# Copyright 2012-2014 Chef Software, Inc.
  3 +#
  4 +# Licensed under the Apache License, Version 2.0 (the "License");
  5 +# you may not use this file except in compliance with the License.
  6 +# You may obtain a copy of the License at
  7 +#
  8 +# http://www.apache.org/licenses/LICENSE-2.0
  9 +#
  10 +# Unless required by applicable law or agreed to in writing, software
  11 +# distributed under the License is distributed on an "AS IS" BASIS,
  12 +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13 +# See the License for the specific language governing permissions and
  14 +# limitations under the License.
  15 +#
  16 +
  17 +name "libffi"
  18 +default_version "3.0.13"
  19 +
  20 +dependency "libgcc"
  21 +dependency "libtool"
  22 +
  23 +source url: "ftp://sourceware.org/pub/libffi/libffi-3.0.13.tar.gz",
  24 + md5: '45f3b6dbc9ee7c7dfbbbc5feba571529'
  25 +
  26 +relative_path "libffi-3.0.13"
  27 +
  28 +build do
  29 + env = with_standard_compiler_flags(with_embedded_path)
  30 +
  31 + command "./configure" \
  32 + " --prefix=#{install_dir}/embedded", env: env
  33 +
  34 + command "make -j #{max_build_jobs}", env: env
  35 + command "make -j #{max_build_jobs} install", env: env
  36 +
  37 + # libffi's default install location of header files is awful...
  38 + copy "#{install_dir}/embedded/lib/libffi-#{version}/include/*", "#{install_dir}/embedded/include"
  39 +
  40 + # On 64-bit centos, libffi libraries are places under /embedded/lib64
  41 + # move them over to lib
  42 + if rhel? && _64_bit?
  43 + move "#{install_dir}/embedded/lib64/*", "#{install_dir}/embedded/lib/"
  44 + delete "#{install_dir}/embedded/lib64"
  45 + end
  46 +end
  47 +