This repository was archived by the owner on Dec 2, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +16
-9
lines changed
lib/puppet/provider/php_version Expand file tree Collapse file tree 4 files changed +16
-9
lines changed Original file line number Diff line number Diff line change 22
33class Bisonphp26 < Formula
44 homepage 'http://www.gnu.org/software/bison/'
5- url 'http://ftpmirror.gnu.org/bison/bison-2.6.5 .tar.gz'
6- mirror 'http://ftp.gnu.org/gnu/bison/bison-2.6.5 .tar.gz'
7- sha1 '2cea0ea4a41dcfc05332613060026de0af1458cc '
5+ url 'http://ftpmirror.gnu.org/bison/bison-2.6.4 .tar.gz'
6+ mirror 'http://ftp.gnu.org/gnu/bison/bison-2.6.4 .tar.gz'
7+ sha1 '38adec0d7d0f556ec52e21ccbb87edd78327dd9b '
88
9- version '2.6.5 -boxen1'
9+ version '2.6.4 -boxen1'
1010
1111 keg_only :provided_by_osx , 'Some formulae require a newer version of bison.'
1212
@@ -15,4 +15,4 @@ def install
1515 "--prefix=#{ prefix } "
1616 system "make install"
1717 end
18- end
18+ end
Original file line number Diff line number Diff line change @@ -169,7 +169,9 @@ def configure(version)
169169 env = "export ac_cv_exeext=''"
170170
171171 # PHP 5.5+ requires a later version of Bison than OSX provides (2.6 vs 2.3)
172- env << " && export PATH=/opt/boxen/homebrew/opt/bisonphp26/bin:$PATH" unless @resource [ :version ] . match ( /\A 5\. [34]/ )
172+ if Gem ::Version . new ( @resource [ :version ] ) > Gem ::Version . new ( '5.4.17' )
173+ env << " && export PATH=/opt/boxen/homebrew/opt/bisonphp26/bin:$PATH"
174+ end
173175
174176 # Construct and run configure command
175177 configure_command = "cd #{ @resource [ :phpenv_root ] } /php-src/ && #{ env } && ./configure #{ args } "
@@ -188,7 +190,12 @@ def configure(version)
188190 end
189191
190192 def make
191- puts %x( cd #{ @resource [ :phpenv_root ] } /php-src/ && make )
193+ # PHP > 5.4.17 requires a later version of Bison than OSX provides (2.6 vs 2.3)
194+ if Gem ::Version . new ( @resource [ :version ] ) > Gem ::Version . new ( '5.4.17' )
195+ env = " && export PATH=/opt/boxen/homebrew/opt/bisonphp26/bin:$PATH"
196+ end
197+
198+ puts %x( cd #{ @resource [ :phpenv_root ] } /php-src/ #{ env } && make 2>&1 )
192199 raise "Could not compile PHP @resource[:version]" unless $? == 0
193200 end
194201
Original file line number Diff line number Diff line change 9494 }
9595
9696 package { 'boxen/brews/bisonphp26' :
97- ensure => ' 2.6.5 -boxen1' ,
97+ ensure => ' 2.6.4 -boxen1' ,
9898 }
9999
100100 # Install dupe version of zlib as tapping homebrew dupes appears to have
Original file line number Diff line number Diff line change 9797 } )
9898
9999 should contain_package ( "boxen/brews/bisonphp26" ) . with ( {
100- :ensure => "2.6.5 -boxen1"
100+ :ensure => "2.6.4 -boxen1"
101101 } )
102102
103103 should contain_exec ( "phpenv-setup-root-repo" ) . with ( {
You can’t perform that action at this time.
0 commit comments