Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
Merge pull request #27 from eebs/bundle-freetype-2.4.11
Browse files Browse the repository at this point in the history
Bundle freetype 2.4.11 to fix GD conflict
  • Loading branch information
mattheath committed Mar 12, 2014
2 parents b592ef9 + 00ccb74 commit faed966
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 5 deletions.
27 changes: 27 additions & 0 deletions files/brews/freetype.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
require 'formula'

class Freetypephp < Formula
homepage 'http://www.freetype.org'
url 'http://downloads.sf.net/project/freetype/freetype2/2.4.11/freetype-2.4.11.tar.gz'
sha1 'a8373512281f74a53713904050e0d71c026bf5cf'

keg_only :provided_pre_mountain_lion

option :universal

bottle do
# Included with X11 so no bottle needed before Mountain Lion.
sha1 '7dc4747810e51beb99fd36c8f5baade6e65d19b7' => :mountain_lion
end

def install
ENV.universal_binary if build.universal?
system "./configure", "--prefix=#{prefix}"
system "make install"
end

test do
system "#{bin}/freetype-config", '--cflags', '--libs', '--ftversion',
'--exec-prefix', '--prefix'
end
end
2 changes: 1 addition & 1 deletion lib/puppet/provider/php_version/php_source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ def get_configure_args(version, install_path, config_path)
"--with-xsl=/usr",
"--with-gd",
"--enable-gd-native-ttf",
"--with-freetype-dir=#{@resource[:homebrew_path]}/opt/freetype",
"--with-freetype-dir=#{@resource[:homebrew_path]}/opt/freetypephp",
"--with-jpeg-dir=#{@resource[:homebrew_path]}/opt/jpeg",
"--with-png-dir=#{@resource[:homebrew_path]}/opt/libpng",
"--with-gettext=#{@resource[:homebrew_path]}/opt/gettext",
Expand Down
13 changes: 12 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@
# Resolve dependencies

package { [
'freetype',
'gmp',
'icu4c',
'jpeg',
Expand All @@ -72,6 +71,18 @@
provider => homebrew,
}

# Install freetype version 2.4.11 due to conflict with GD
# See https://github.com/boxen/puppet-php/issues/25

homebrew::formula { 'freetypephp':
source => 'puppet:///modules/php/brews/freetype.rb',
before => Package['boxen/brews/freetypephp'],
}

package { 'boxen/brews/freetypephp':
ensure => '2.4.11',
}

# Need autoconf version less than 2.59 for php 5.3 (ewwwww)

homebrew::formula { 'autoconf213':
Expand Down
2 changes: 1 addition & 1 deletion manifests/version.pp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
require => [
Repository["${php::config::root}/php-src"],
Package['gettext'],
Package['freetype'],
Package['boxen/brews/freetypephp'],
Package['gmp'],
Package['icu4c'],
Package['jpeg'],
Expand Down
10 changes: 9 additions & 1 deletion spec/classes/php_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@
should contain_file("/test/boxen/env.d/phpenv.sh").with_source("puppet:///modules/php/phpenv.sh")

[
"freetype",
"gmp",
"icu4c",
"jpeg",
Expand All @@ -73,6 +72,15 @@

should contain_package("boxen/brews/autoconf213").with_ensure("2.13-boxen1")

should contain_homebrew__formula("freetypephp").with({
:source => "puppet:///modules/php/brews/freetype.rb",
:before => "Package[boxen/brews/freetypephp]"
})

should contain_package("boxen/brews/freetypephp").with({
:ensure => "2.4.11"
})

should contain_homebrew__formula("zlibphp").with({
:source => "puppet:///modules/php/brews/zlib.rb",
:before => "Package[boxen/brews/zlibphp]"
Expand Down
2 changes: 1 addition & 1 deletion spec/defines/php_version_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
:require => [
"Repository[/test/boxen/phpenv/php-src]",
"Package[gettext]",
"Package[freetype]",
"Package[boxen/brews/freetypephp]",
"Package[gmp]",
"Package[icu4c]",
"Package[jpeg]",
Expand Down

0 comments on commit faed966

Please sign in to comment.