Skip to content

Commit

Permalink
Normalize environment variable name inconsistency between "PHP_BUILD_…
Browse files Browse the repository at this point in the history
…*" and "PHPBUILD_*"
  • Loading branch information
hnw committed Nov 28, 2015
1 parent 3b93d35 commit eff50ef
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ addons:

env:
global:
- PHPBUILD_EXTRA_MAKE_ARGUMENTS="-j2"
- PHP_BUILD_EXTRA_MAKE_ARGUMENTS="-j2"
matrix:
- DEFINITION=5.2.17 PHP_BUILD_CONFIGURE_OPTS="--with-libdir=lib/x86_64-linux-gnu"
- DEFINITION=5.3.3 PHP_BUILD_CONFIGURE_OPTS="--with-libdir=lib/x86_64-linux-gnu"
Expand Down
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Added: uninstaller script #279
* Fixed: installer fails if share directory doesn't exist
* Fixed: Build error when trying to use definition file #285
* Added: environment variable PHPBUILD_KEEP_OBJECT_FILES to "make clean" after installation or not #317
* Added: environment variable PHP_BUILD_KEEP_OBJECT_FILES to "make clean" after installation or not #317
* Added definitions: `5.3.27`, `5.3.28`, `5.3.29`, `5.4.17`, `5.4.18`, `5.4.19`, `5.4.20`, `5.4.21`, `5.4.22`, `5.4.23`, `5.4.24`, `5.4.25`, `5.4.26`, `5.4.27`, `5.4.28`, `5.4.29`, `5.4.30`, `5.4.31`, `5.4.32`, `5.4.33`, `5.4.34`, `5.4.35`, `5.4.36`, `5.4.37`, `5.4.38`, `5.4.39`, `5.4.40`, `5.4.41`, `5.4.42`, `5.4.43`, `5.4.44`, `5.4.45`, `5.5.0`, `5.5.1`, `5.5.2`, `5.5.3`, `5.5.4`, `5.5.5`, `5.5.6`, `5.5.7`, `5.5.8`, `5.5.9`, `5.5.10`, `5.5.11`, `5.5.12`, `5.5.13`, `5.5.14`, `5.5.15`, `5.5.16`, `5.5.17`, `5.5.18`, `5.5.19`, `5.5.20`, `5.5.21`, `5.5.22`, `5.5.23`, `5.5.24`, `5.5.25`, `5.5.26`, `5.5.27`, `5.5.28`, `5.5.29`, `5.5.30`, `5.6.0`, `5.6.1`, `5.6.2`, `5.6.3`, `5.6.4`, `5.6.5`, `5.6.6`, `5.6.7`, `5.6.8`, `5.6.9`, `5.6.10`, `5.6.11`, `5.6.12`, `5.6.13`, `5.6.14`, `5.6.15`, `5.6.16`, `5.6snapshot`, `7.0.0RC1`, `7.0.0RC2`, `7.0.0RC3`, `7.0.0RC4`, `7.0.0RC5`, `7.0.0RC6`, `7.0.0RC7`, `7.0.0RC8`, `7.0snapshot`, `master`
* Removed definitions: `5.3.11RC1`, `5.3.11RC2`, `5.3.19RC1`, `5.3.20RC1`, `5.3.9RC3`, `5.3.9RC4`, `5.3snapshot`, `5.4.0alpha3`, `5.4.0beta1`, `5.4.0beta2`, `5.4.0RC1`, `5.4.0RC2`, `5.4.0RC3`, `5.4.0RC4`, `5.4.0RC5`, `5.4.0RC6`, `5.4.0RC7`, `5.4.0RC8`, `5.4.10RC1`, `5.4.1RC1`, `5.4.1RC2`, `5.4.9RC1`, `5.5.0alpha1`, `5.5.0alpha2`, `5.5.0alpha3`, `5.5.0alpha4`, `5.5.0alpha5`, `5.5.0alpha6`, `5.5.0beta1`, `5.5.0beta2`, `5.5.0beta3`, `5.5.0beta4`, `5.5.0RC1`, `5.5.0RC2`, `5.5.0RC3`

Expand Down
12 changes: 6 additions & 6 deletions bin/php-build
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,11 @@ CONFIGURE_OPTIONS=$(cat "$PHP_BUILD_ROOT/share/php-build/default_configure_optio
PATCH_FILES=""

# Whether do "make clean" after installation or not
[ -z "$PHPBUILD_KEEP_OBJECT_FILES" ] && PHPBUILD_KEEP_OBJECT_FILES=off
[ -z "$PHP_BUILD_KEEP_OBJECT_FILES" ] && PHP_BUILD_KEEP_OBJECT_FILES=off

[ -z "$PHPBUILD_EXTRA_MAKE_ARGUMENTS" ] && PHPBUILD_EXTRA_MAKE_ARGUMENTS=""
[ -z "$PHP_BUILD_EXTRA_MAKE_ARGUMENTS" ] && PHP_BUILD_EXTRA_MAKE_ARGUMENTS=""

[ -z "$PHPBUILD_INSTALL_EXTENSION" ] && PHPBUILD_INSTALL_EXTENSION=""
[ -z "$PHP_BUILD_INSTALL_EXTENSION" ] && PHP_BUILD_INSTALL_EXTENSION=""

if [ -n "$PHP_BUILD_CONFIGURE_OPTS" ]; then
CONFIGURE_OPTIONS="$CONFIGURE_OPTIONS $PHP_BUILD_CONFIGURE_OPTS"
Expand Down Expand Up @@ -326,9 +326,9 @@ function build_package() {

cd "$source_path"
{
make $PHPBUILD_EXTRA_MAKE_ARGUMENTS
make $PHP_BUILD_EXTRA_MAKE_ARGUMENTS
make install
if [ "$PHPBUILD_KEEP_OBJECT_FILES" == "off" ]; then
if [ "$PHP_BUILD_KEEP_OBJECT_FILES" == "off" ]; then
make clean
fi
} > /dev/null
Expand Down Expand Up @@ -376,7 +376,7 @@ function apply_patches() {
function install_extensions() {
# handle extensions that should be installed by defined environment variable
# variable must be in the format: extension_name=version extension_name=version
for extension_def in $PHPBUILD_INSTALL_EXTENSION; do
for extension_def in $PHP_BUILD_INSTALL_EXTENSION; do
local extension=$(echo $extension_def | cut -d"=" -f1)
local version=$(echo $extension_def | cut -d"=" -f2)
local first_char=$(echo $version | cut -c1 )
Expand Down
10 changes: 5 additions & 5 deletions man/php-build.1
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,21 @@ Tells \fBphp\-build\fR to use the \fBphp\.ini\fR\-\fIenv\fR from the PHP source
\fBPHP_BUILD_ZTS_ENABLE=on|off\fR (default: \fBoff\fR), enables Zend Thread Safety for builds
.
.IP "\(bu" 4
\fBPHPBUILD_INSTALL_EXTENSION\fR see \fIEXTENSION\fR section\.
\fBPHP_BUILD_INSTALL_EXTENSION\fR see \fIEXTENSION\fR section\.
.
.IP "" 0
.
.SH "EXTENSION"
To install php extension, you have to define \fBPHPBUILD_INSTALL_EXTENSION\fR before execute php\-build\. The following are example use cases to use this environment variable
To install php extension, you have to define \fBPHP_BUILD_INSTALL_EXTENSION\fR before execute php\-build\. The following are example use cases to use this environment variable
.
.IP "\(bu" 4
\fBPHPBUILD_INSTALL_EXTENSION="apcu=4\.0\.7 imagick=3\.1\.2"\fR install ACPU version 4\.0\.7 and install imagick version 3\.1\.2
\fBPHP_BUILD_INSTALL_EXTENSION="apcu=4\.0\.7 imagick=3\.1\.2"\fR install ACPU version 4\.0\.7 and install imagick version 3\.1\.2
.
.IP "\(bu" 4
\fBPHPBUILD_INSTALL_EXTENSION="uprofiler=@"\fR install uprofiler from source using master branch
\fBPHP_BUILD_INSTALL_EXTENSION="uprofiler=@"\fR install uprofiler from source using master branch
.
.IP "\(bu" 4
\fBPHPBUILD_INSTALL_EXTENSION="uprofiler=@851da15"\fR install uprofiler from source using commit sha1 \'851da15\'
\fBPHP_BUILD_INSTALL_EXTENSION="uprofiler=@851da15"\fR install uprofiler from source using commit sha1 \'851da15\'
.
.IP "" 0
.
Expand Down
10 changes: 5 additions & 5 deletions man/php-build.1.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions man/php-build.1.ronn
Original file line number Diff line number Diff line change
Expand Up @@ -105,15 +105,15 @@ executables to `$PREFIX/bin`.
lines which enable XDebug, in the generated `xdebug.ini`.
* `PHP_BUILD_CONFIGURE_OPTS`, list of additional configure options.
* `PHP_BUILD_ZTS_ENABLE=on|off` (default: `off`), enables Zend Thread Safety for builds
* `PHPBUILD_INSTALL_EXTENSION` see [EXTENSION] section.
* `PHP_BUILD_INSTALL_EXTENSION` see [EXTENSION] section.

## EXTENSION

To install php extension, you have to define `PHPBUILD_INSTALL_EXTENSION` before execute php-build. The following are example use cases to use this environment variable
To install php extension, you have to define `PHP_BUILD_INSTALL_EXTENSION` before execute php-build. The following are example use cases to use this environment variable

* `PHPBUILD_INSTALL_EXTENSION="apcu=4.0.7 imagick=3.1.2"` install ACPU version 4.0.7 and install imagick version 3.1.2
* `PHPBUILD_INSTALL_EXTENSION="uprofiler=@"` install uprofiler from source using master branch
* `PHPBUILD_INSTALL_EXTENSION="uprofiler=@851da15"` install uprofiler from source using commit sha1 '851da15'
* `PHP_BUILD_INSTALL_EXTENSION="apcu=4.0.7 imagick=3.1.2"` install ACPU version 4.0.7 and install imagick version 3.1.2
* `PHP_BUILD_INSTALL_EXTENSION="uprofiler=@"` install uprofiler from source using master branch
* `PHP_BUILD_INSTALL_EXTENSION="uprofiler=@851da15"` install uprofiler from source using commit sha1 '851da15'



Expand Down

0 comments on commit eff50ef

Please sign in to comment.