|
| 1 | + |
| 2 | +# |
| 3 | +# Copyright:: Chef Software Inc. |
| 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 "libxml2" |
| 19 | +default_version "2.11.7" |
| 20 | + |
| 21 | +license "MIT" |
| 22 | +license_file "COPYING" |
| 23 | +skip_transitive_dependency_licensing true |
| 24 | + |
| 25 | +dependency "zlib" |
| 26 | +dependency "liblzma" |
| 27 | +dependency "config_guess" |
| 28 | + |
| 29 | +# version_list: url=https://download.gnome.org/sources/libxml2/ filter=*.tar.xz |
| 30 | +version("2.13.5") { source sha256: "74fc163217a3964257d3be39af943e08861263c4231f9ef5b496b6f6d4c7b2b6" } |
| 31 | +version("2.12.7") { source sha256: "24ae78ff1363a973e6d8beba941a7945da2ac056e19b53956aeb6927fd6cfb56" } |
| 32 | +version("2.12.5") { source sha256: "a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21" } |
| 33 | +version("2.11.7") { source sha256: "fb27720e25eaf457f94fd3d7189bcf2626c6dccf4201553bc8874d50e3560162" } |
| 34 | +version("2.10.4") { source sha256: "ed0c91c5845008f1936739e4eee2035531c1c94742c6541f44ee66d885948d45" } |
| 35 | +version("2.9.14") { source sha256: "60d74a257d1ccec0475e749cba2f21559e48139efba6ff28224357c7c798dfee" } |
| 36 | +version("2.9.13") { source sha256: "276130602d12fe484ecc03447ee5e759d0465558fbc9d6bd144e3745306ebf0e" } |
| 37 | +version("2.9.12") { source sha256: "28a92f6ab1f311acf5e478564c49088ef0ac77090d9c719bbc5d518f1fe62eb9" } |
| 38 | +version("2.9.10") { source sha256: "593b7b751dd18c2d6abcd0c4bcb29efc203d0b4373a6df98e3a455ea74ae2813" } |
| 39 | +version("2.9.9") { source sha256: "58a5c05a2951f8b47656b676ce1017921a29f6b1419c45e3baed0d6435ba03f5" } |
| 40 | + |
| 41 | +minor_version = version.gsub(/\.\d+\z/, "") |
| 42 | +source url: "https://download.gnome.org/sources/libxml2/#{minor_version}/libxml2-#{version}.tar.xz" |
| 43 | +#internal_source url: "#{ENV["ARTIFACTORY_REPO_URL"]}/#{name}/#{name}-#{version}.tar.xz", |
| 44 | + #authorization: "X-JFrog-Art-Api:#{ENV["ARTIFACTORY_TOKEN"]}" |
| 45 | + |
| 46 | +relative_path "libxml2-#{version}" |
| 47 | + |
| 48 | +build do |
| 49 | + env = with_standard_compiler_flags(with_embedded_path) |
| 50 | + |
| 51 | + configure_command = [ |
| 52 | + "--with-zlib=#{install_dir}/embedded", |
| 53 | + "--with-lzma=#{install_dir}/embedded", |
| 54 | + "--with-sax1", # required for nokogiri to compile |
| 55 | + "--without-iconv", |
| 56 | + "--without-python", |
| 57 | + "--without-icu", |
| 58 | + "--without-debug", |
| 59 | + "--without-mem-debug", |
| 60 | + "--without-run-debug", |
| 61 | + "--without-legacy", # we don't need legacy interfaces |
| 62 | + "--without-catalog", |
| 63 | + "--without-docbook", |
| 64 | + ] |
| 65 | + |
| 66 | + update_config_guess |
| 67 | + |
| 68 | + configure(*configure_command, env: env) |
| 69 | + puts "------DEBUG-------" |
| 70 | + puts "------Executing the script-----" |
| 71 | + puts Dir["#{project_dir}/*/**"] |
| 72 | + |
| 73 | + # Check if the tar file exists |
| 74 | + tar_file = "#{project_dir}/xz-#{version}.tar.xz" |
| 75 | + |
| 76 | + if File.exists?(tar_file) |
| 77 | + puts "Tar file exists: #{tar_file}" |
| 78 | + puts "Current directory: #{Dir.pwd}" |
| 79 | + puts "ls -l of tar file:" |
| 80 | + puts shellout!("ls -l #{tar_file}").stdout |
| 81 | + else |
| 82 | + puts "Tar file not found: #{tar_file}" |
| 83 | + end |
| 84 | + |
| 85 | + make "-j #{workers}", env: env |
| 86 | + make "install", env: env |
| 87 | +end |
0 commit comments