mirror of
https://github.com/shivammathur/setup-php.git
synced 2024-11-26 13:23:05 +07:00
Use tap shivammathur/homebrew-phalcon on darwin
This commit is contained in:
parent
3f42b7d5fb
commit
58fbc33c3a
@ -80,10 +80,10 @@ describe('Extension tests', () => {
|
|||||||
expect(darwin).toContain('sudo pecl install pcov');
|
expect(darwin).toContain('sudo pecl install pcov');
|
||||||
|
|
||||||
darwin = await extensions.addExtension('phalcon3', '7.0', 'darwin');
|
darwin = await extensions.addExtension('phalcon3', '7.0', 'darwin');
|
||||||
expect(darwin).toContain('phalcon_darwin.sh phalcon3');
|
expect(darwin).toContain('phalcon_darwin.sh phalcon3 7.0');
|
||||||
|
|
||||||
darwin = await extensions.addExtension('phalcon4', '7.3', 'darwin');
|
darwin = await extensions.addExtension('phalcon4', '7.3', 'darwin');
|
||||||
expect(darwin).toContain('phalcon_darwin.sh phalcon4');
|
expect(darwin).toContain('phalcon_darwin.sh phalcon4 7.3');
|
||||||
|
|
||||||
darwin = await extensions.addExtension('pcov', '5.6', 'darwin');
|
darwin = await extensions.addExtension('pcov', '5.6', 'darwin');
|
||||||
expect(darwin).toContain('sudo pecl install pcov');
|
expect(darwin).toContain('sudo pecl install pcov');
|
||||||
|
2
dist/index.js
vendored
2
dist/index.js
vendored
@ -2362,6 +2362,8 @@ function addExtensionDarwin(extension_csv, version, pipe) {
|
|||||||
path.join(__dirname, '../src/scripts/ext/phalcon_darwin.sh') +
|
path.join(__dirname, '../src/scripts/ext/phalcon_darwin.sh') +
|
||||||
' ' +
|
' ' +
|
||||||
extension +
|
extension +
|
||||||
|
' ' +
|
||||||
|
version +
|
||||||
pipe;
|
pipe;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -33,6 +33,8 @@ export async function addExtensionDarwin(
|
|||||||
path.join(__dirname, '../src/scripts/ext/phalcon_darwin.sh') +
|
path.join(__dirname, '../src/scripts/ext/phalcon_darwin.sh') +
|
||||||
' ' +
|
' ' +
|
||||||
extension +
|
extension +
|
||||||
|
' ' +
|
||||||
|
version +
|
||||||
pipe;
|
pipe;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
@ -1,16 +1,5 @@
|
|||||||
extension=$1
|
extension=$1
|
||||||
ini_file=$(php -d "date.timezone=UTC" --ini | grep "Loaded Configuration" | sed -e "s|.*:s*||" | sed "s/ //g")
|
extension_major=${extension: -1}
|
||||||
sudo pecl install psr
|
php_version=$2
|
||||||
brew install autoconf automake libtool
|
brew tap shivammathur/homebrew-phalcon
|
||||||
git clone https://github.com/phalcon/cphalcon.git
|
brew install phalcon@"$php_version"_"$extension_major"
|
||||||
cd cphalcon || echo "could not cd"
|
|
||||||
git checkout "$(git branch -r | grep -E "origin/${extension: -1}\.\d\.x" | sort -r | head -n 1 | sed "s/ //g")"
|
|
||||||
sed -i '' 's/zend_ulong/ulong/' build/php7/64bits/phalcon.zep.c
|
|
||||||
sed -i '' 's/ulong/zend_ulong/' build/php7/64bits/phalcon.zep.c
|
|
||||||
cd build/php7/64bits && sudo phpize
|
|
||||||
sudo ./configure --with-php-config=/usr/local/bin/php-config --enable-phalcon
|
|
||||||
sudo glibtoolize --force
|
|
||||||
sudo autoreconf
|
|
||||||
sudo make -i -j6
|
|
||||||
sudo make install
|
|
||||||
echo "extension=phalcon.so" >>"$ini_file"
|
|
Loading…
Reference in New Issue
Block a user