Skip to content

Commit

Permalink
Merge pull request #6 from Skillshare/argon2
Browse files Browse the repository at this point in the history
feat: include argon2, if it is installed
  • Loading branch information
ahawkins authored Aug 25, 2023
2 parents 1013a72 + 1bd2984 commit 4c9dccd
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ jobs:
brew install
autoconf
automake
argon2
bison
freetype
gd
Expand Down
13 changes: 13 additions & 0 deletions bin/install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand All @@ -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
Expand Down

0 comments on commit 4c9dccd

Please sign in to comment.