Skip to content

Commit

Permalink
Adjusted versions for phalcon and psr based on php version deps
Browse files Browse the repository at this point in the history
The nuance is that formula can have an @ 'AT' version defined to allow for some sort of mechanism
to have multiple versions of the same formula. Unfortunately AT is generally used for the version of the lib.

In the case of psr i am just versioning against php version.

I would like to eventually fork this tap by php version.
That way each formula can be created a single time and the end user can specify
which tap they want to employ assuring that updates always apply to the same php version
  • Loading branch information
ninjapanzer committed Dec 27, 2019
1 parent 9b4df86 commit 3491a05
Show file tree
Hide file tree
Showing 8 changed files with 95 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Aliases/phalcon
1 change: 1 addition & 0 deletions Aliases/phalcon73
1 change: 0 additions & 1 deletion Aliases/phalcon@4

This file was deleted.

1 change: 1 addition & 0 deletions Aliases/psr
32 changes: 32 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
require File.expand_path("../../Abstract/abstract-php-extension", __FILE__)

class PhalconAT400 < AbstractPhp74Extension
init
desc "Full-stack PHP framework"
homepage "https://phalconphp.com/"
url "https://github.com/phalcon/cphalcon/archive/4.0.x.tar.gz"
sha256 "b8c8c5c331fed6c216ed5f799aadd3c06dac66e9b814a48c38ec9df4eb4c642c"
head "https://github.com/phalcon/cphalcon.git"

bottle do
cellar :any_skip_relocation
root_url "https://github.com/phalcon/homebrew-tap/releases/download/v4_rc"
sha256 "7c7eb1ec5fa66a15c168fba4eec1bf7f0f2d05acf0e850b6156f53b0c8974ddb" => :high_sierra
sha256 "ef46d66685ba718574c1ade55de2e8efac32c5291d6c4bdb8b6d31d42e1cee69" => :sierra
end

depends_on "pcre"
depends_on "psr"

def install
Dir.chdir "build/php7/64bits"

safe_phpize

system "./configure", "--prefix=#{prefix}", phpconfig, "--enable-phalcon"
system "make"

prefix.install "modules/phalcon.so"
write_config_file if build.with? "config-file"
end
end
29 changes: 29 additions & 0 deletions Formula/phalcon@73_4.0.0.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
require File.expand_path("../../Abstract/abstract-php-extension", __FILE__)

class PhalconAT73400 < AbstractPhp73Extension
init
desc "Full-stack PHP framework"
homepage "https://phalconphp.com/"
url "https://github.com/phalcon/cphalcon/archive/v4.0.0.tar.gz"
sha256 "9d3fbaac4235110e000b8020543d53342aa7d274926dc44207753bc201121d7b"
head "https://github.com/phalcon/cphalcon.git"

bottle do
cellar :any_skip_relocation
end

depends_on "pcre"
depends_on "psr@73"

def install
Dir.chdir "build/php7/64bits"

safe_phpize

system "./configure", "--prefix=#{prefix}", phpconfig, "--enable-phalcon"
system "make"

prefix.install "modules/phalcon.so"
write_config_file if build.with? "config-file"
end
end
2 changes: 1 addition & 1 deletion Formula/psr.rb → Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
require File.expand_path("../../Abstract/abstract-php-extension", __FILE__)

class Psr < AbstractPhp73Extension
class PsrAT73 < AbstractPhp73Extension
init
desc "PHP extension providing the accepted PSR interfaces "
homepage "https://phalconphp.com/"
Expand Down
30 changes: 30 additions & 0 deletions Formula/[email protected]
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
require File.expand_path("../../Abstract/abstract-php-extension", __FILE__)

class PsrAT74 < AbstractPhp74Extension
init
desc "PHP extension providing the accepted PSR interfaces "
homepage "https://phalconphp.com/"
url "https://github.com/jbboehr/php-psr/archive/v0.7.0.tar.gz"
sha256 "648aac07414f8c6e5c80728cf91fa8174bbd18dd41ae1a90168b510a507cf805"
head "https://github.com/jbboehr/php-psr.git"

bottle do
cellar :any_skip_relocation
root_url "https://github.com/phalcon/homebrew-tap/releases/download/v4_rc"
sha256 "06249d93567e517f25dabf0e92e0b9b2c04562d2ad1c28b734973d76e94508cb" => :sierra
end

depends_on "pcre"

def install
safe_phpize

system "./configure", "--prefix=#{prefix}", phpconfig, "--enable-psr"
system "make"

prefix.install "modules/psr.so"
prefix.install "modules/psr.la"

write_config_file if build.with? "config-file"
end
end

0 comments on commit 3491a05

Please sign in to comment.