Skip to content

Commit 39c0f49

Browse files
committed
Added variable php_band_php_extension_dir
1 parent 676c21a commit 39c0f49

File tree

4 files changed

+15
-1
lines changed

4 files changed

+15
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Changelog
22

3+
0.3.0 :
4+
5+
- Added variable `php_band_php_extension_dir`
6+
37
0.2.0 :
48

59
- Added a check of configuration files modification date to rebuild

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ Those variables can be used but should not be modified:
122122
+ *php_version_minor* The php minor version (for example 6)
123123
+ *php_version_patch* The php patch version (for example 3)
124124
+ *php_version_addon* The php version (for example RC2)
125-
+ *php_band_php_install_dir* The directory where php is installed
125+
+ *php_band_php_extension_dir* The directory where php looks extensions for. Available from the post_install_php() function.
126126

127127
## Usefull functions
128128

bin/php-band

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ php_prefered_sites=(
2525
# configurable options
2626
php_band_php_install_dir=
2727
php_band_php_config_options=
28+
php_band_php_extension_dir=
2829

2930
source $PHP_BAND_ROOT_DIR/lib/core.sh
3031
# Commands

lib/core.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,14 @@ php_band_extract_php_source() {
152152
[ $? -ne 0 ] && error_exit "$php_band_archive_filename does not seem to be a valid archive" 3
153153
}
154154

155+
php_band_get_php_extension_dir() {
156+
if [ -x "${php_band_php_install_dir}/bin/php-config" ]; then
157+
php_band_php_extension_dir=$(${php_band_php_install_dir}/bin/php-config --extension-dir)
158+
else
159+
php_band_php_extension_dir=''
160+
fi
161+
}
162+
155163
pre_configure_php() {
156164
# Pre configure can be overriden in specific config files config-php.sh
157165
return
@@ -204,6 +212,7 @@ php_band_compile_php() {
204212
fi
205213
make install
206214
[ $? -eq 0 ] || error_exit "Installation of php failed" 3
215+
php_band_get_php_extension_dir
207216
post_install_php
208217
}
209218

0 commit comments

Comments
 (0)