<commit_before>include_recipe "apt"
include_recipe "mysql::client"
include_recipe "postgresql::client"

case node[:platform]
  when "ubuntu", "debian"
    %w{libbz2-dev libc-client2007e-dev libcurl4-gnutls-dev libfreetype6-dev libgmp3-dev libjpeg8-dev libkrb5-dev libmcrypt-dev libpng12-dev libssl-dev libt1-dev libmhash-dev libexpat1-dev libxml2-dev libicu-dev libtidy-dev libxslt-dev language-pack-fr re2c}.each do |pkg|
      package(pkg) { action :install }
    end

    link "/usr/lib/libpng.so" do
      to "/usr/lib/i386-linux-gnu/libpng.so"
    end
end

phpbuild_path = "#{node[:phpbuild][:home]}/.php-build"

git phpbuild_path do
  user       node[:phpbuild][:user]
  group      node[:phpbuild][:group]
  repository node[:phpbuild][:git][:repository]
  revision   node[:phpbuild][:git][:revision]
  action     :checkout
end

git "/tmp/php-build-plugin-phpunit" do
  user       node[:phpbuild][:user]
  group      node[:phpbuild][:group]
  repository node[:phpbuild][:phpunit_plugin][:git][:repository]
  revision   node[:phpbuild][:phpunit_plugin][:git][:revision]
  action     :checkout
end

directory "#{phpbuild_path}/versions" do
  owner  node[:phpbuild][:user]
  group  node[:phpbuild][:group]
  mode   "0755"<commit_msg>Make phpbuild depend on libssl and libxml cookbooks. Symlink libjpeg for 11.10 compatibility.<commit_after>include_recipe "apt"
include_recipe "mysql::client"
include_recipe "postgresql::client"

include_recipe "libxml"
include_recipe "libssl"

case node[:platform]
  when "ubuntu", "debian"
    %w{libbz2-dev libc-client2007e-dev libcurl4-gnutls-dev libfreetype6-dev libgmp3-dev libjpeg8-dev libkrb5-dev libmcrypt-dev libpng12-dev libt1-dev libmhash-dev libexpat1-dev libicu-dev libtidy-dev language-pack-fr re2c}.each do |pkg|
      package(pkg) { action :install }
    end

  %w(libpng libjpeg).each do |lib|
    link "/usr/lib/#{lib}.so" do
      to "/usr/lib/i386-linux-gnu/#{lib}.so"
    end
  end
end

phpbuild_path = "#{node[:phpbuild][:home]}/.php-build"

git phpbuild_path do
  user       node[:phpbuild][:user]
  group      node[:phpbuild][:group]
  repository node[:phpbuild][:git][:repository]
  revision   node[:phpbuild][:git][:revision]
  action     :checkout
end

git "/tmp/php-build-plugin-phpunit" do
  user       node[:phpbuild][:user]
  group      node[:phpbuild][:group]
  repository node[:phpbuild][:phpunit_plugin][:git][:repository]
  revision   node[:phpbuild][:phpunit_plugin][:git][:revision]
  action     :checkout
end

directory "#{phpbuild_path}/versions" do
  owner  node[:phpbuild][:user]
  group  node[:phpbuild][:group]
  mode   "0755"
{'fraction_non_alphanumeric': 0.14280230326295584, 'fraction_numerical': 0.018809980806142036, 'mean_word_length': 4.463312368972747, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 3}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5438032', 'n_tokens_mistral': 986, 'n_tokens_neox': 948, 'n_words': 181}