forked from asdf-community/asdf-php
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #6 from Skillshare/argon2
feat: include argon2, if it is installed
- Loading branch information
Showing
2 changed files
with
14 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,6 +27,7 @@ jobs: | |
brew install | ||
autoconf | ||
automake | ||
argon2 | ||
bison | ||
freetype | ||
gd | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,13 +23,19 @@ install_php() { | |
if [[ $operating_system =~ "Darwin" ]]; then | ||
exit_if_homebrew_not_installed | ||
|
||
local argon2_path=$(homebrew_package_path argon2) | ||
local bison_path=$(homebrew_package_path bison) | ||
local icu4c_path=$(homebrew_package_path icu4c) | ||
local krb5_path=$(homebrew_package_path krb5) | ||
local libedit_path=$(homebrew_package_path libedit) | ||
local libxml2_path=$(homebrew_package_path libxml2) | ||
local openssl_path=$(homebrew_package_path [email protected]) | ||
|
||
# argon2 is optional | ||
if [ -n "$argon2_path" ]; then | ||
export "PKG_CONFIG_PATH=${argon2_path}/lib/pkgconfig:${PKG_CONFIG_PATH}" | ||
fi | ||
|
||
if [ -n "$bison_path" ]; then | ||
export "PATH=${bison_path}/bin:${PATH}" | ||
else | ||
|
@@ -213,6 +219,7 @@ os_based_configure_options() { | |
|
||
# optional | ||
# if these packages exist they are included in the php compilation | ||
local argon2_path=$(homebrew_package_path argon2) | ||
local gmp_path=$(homebrew_package_path gmp) | ||
local sodium_path=$(homebrew_package_path libsodium) | ||
|
||
|
@@ -228,6 +235,12 @@ os_based_configure_options() { | |
echo "sodium not found, not including in installation" | ||
fi | ||
|
||
if [ -n "$argon2_path" ]; then | ||
configure_options="$configure_options --with-password-argon2" | ||
else | ||
echo "argon2 not found, not including in installation" | ||
fi | ||
|
||
if [ -n "$freetype_path" ]; then | ||
configure_options="$configure_options --with-freetype-dir=$freetype_path" | ||
else | ||
|