Skip to content
This repository was archived by the owner on Dec 23, 2018. It is now read-only.

Commit f45cfe3

Browse files
authored
Merge pull request #3 from phpenv-dev/compile-5.3
Compile definition for PHP 5.3
2 parents 2f8b566 + 888cddb commit f45cfe3

File tree

1 file changed

+11
-13
lines changed

1 file changed

+11
-13
lines changed

bin/php-build

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -136,19 +136,8 @@ build_package() {
136136

137137
build_package_standard() {
138138
local package_name="$1"
139-
local argv
140-
141-
# Add `--libexecdir`,` --with-config-file-path`, `--with-config-file-scan-dir`
142-
# as well as the prefix configure options
143-
#
144-
# This is set as the default configure options
145-
argv="--prefix=$PREFIX_PATH \
146-
--libexecdir=$PREFIX_PATH/libexec \
147-
--with-config-file-path=$PREFIX_PATH/etc \
148-
--with-config-file-scan-dir=$PREFIX_PATH/etc/conf.d \
149-
$CONFIGURE_OPTS"
150139

151-
{ ./configure "$argv"
140+
{ ./configure --prefix="$PREFIX_PATH" $CONFIGURE_OPTS
152141
make -j 2
153142
make install
154143
} >&4 2>&1
@@ -209,7 +198,9 @@ list_definitions() {
209198
}
210199

211200
# Set the default php.ini to use
212-
PHP_BUILD_DEFAULT_INI="php.ini-recommended"
201+
if [ -z "$PHP_BUILD_DEFAULT_INI" ]; then
202+
PHP_BUILD_DEFAULT_INI="php.ini-production"
203+
fi
213204

214205

215206

@@ -264,6 +255,13 @@ if [ ! -d "$PREFIX_PATH/libexec" ] || [ ! -d "$PREFIX_PATH/etc/conf.d" ]; then
264255
mkdir -p "$PREFIX_PATH/"{libexec,etc/conf.d}
265256
fi
266257

258+
# Add `--libexecdir`, `--with-config-file-path`, `--with-config-file-scan-dir`
259+
# aswell as the prefix to the configure options.
260+
CONFIGURE_OPTS="--libexecdir=$PREFIX_PATH/libexec \
261+
--with-config-file-path=$PREFIX_PATH/etc \
262+
--with-config-file-scan-dir=$PREFIX_PATH/etc/conf.d \
263+
$CONFIGURE_OPTS"
264+
267265
if [ -z "$TMPDIR" ]; then
268266
TMP="/tmp"
269267
else

0 commit comments

Comments
 (0)