@@ -15,8 +15,8 @@ MEMSIZE_MB=$(free -m | awk '/^Mem:/{print $2}')
15
15
# configurations #
16
16
# ----------------#
17
17
18
- bison_version=" 2.7.1"
19
18
php_version=" latest"
19
+ bison_version=" 2.7.1"
20
20
21
21
# get the exact latest 5.6 version number
22
22
if [ " ${php_version,,} " = ' latest' ]; then
@@ -69,8 +69,8 @@ yum install -y \
69
69
# fix lib linking #
70
70
# -----------------#
71
71
72
- ln -sf /usr/lib64/libldap* /usr/lib/
73
- ln -sf /usr/lib64/liblber* /usr/lib/
72
+ ln -sfn /usr/lib64/libldap* /usr/lib/
73
+ ln -sfn /usr/lib64/liblber* /usr/lib/
74
74
75
75
ldconfig
76
76
113
113
114
114
# prefer using older bison
115
115
if ! bison --version | grep -F -q " ${bison_version} " ; then
116
- echo " * temporarily set bison executable into PATH"
116
+ echo " [*] temporarily set bison executable into PATH"
117
117
PATH=" ${bison_bin_dir} :$PATH "
118
118
fi
119
119
@@ -163,51 +163,54 @@ pushd "${php_src_dir}" || exit
163
163
164
164
./buildconf --force
165
165
166
- ./configure --prefix=" ${php_install_dir} " \
167
- --disable-debug \
168
- --disable-rpath \
169
- --enable-bcmath \
170
- --enable-calendar \
171
- --enable-exif \
172
- --enable-fpm \
173
- --enable-ftp \
174
- --enable-inline-optimization \
175
- --enable-intl \
176
- --enable-mbregex --enable-mbstring \
177
- --enable-pcntl \
178
- --enable-shmop \
179
- --enable-soap \
180
- --enable-sockets \
181
- --enable-sysvmsg --enable-sysvsem --enable-sysvshm \
182
- --enable-wddx \
183
- --enable-xml \
184
- --enable-zip \
185
- --with-bz2 \
186
- --with-config-file-path=" ${php_install_dir} /etc" \
187
- --with-config-file-scan-dir=" ${php_install_dir} /etc/php.d" \
188
- --with-curl=" /usr/local" \
189
- --with-fpm-group=" ${php_run_user} " \
190
- --with-fpm-user=" ${php_run_user} " \
191
- --with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --enable-gd-native-ttf \
192
- --with-gettext \
193
- --with-gmp \
194
- --with-iconv-dir=" /usr/local" \
195
- --with-libxml-dir=" /usr" \
196
- --with-libzip \
197
- --with-mhash \
198
- --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd \
199
- --with-openssl \
200
- --with-pspell \
201
- --with-readline \
202
- --with-xmlrpc \
203
- --with-xsl \
204
- --with-zlib \
205
- ${LOW_MEMORY_FLAGS[*]}
166
+ ./configure \
167
+ --prefix=" ${php_install_dir} " \
168
+ --disable-debug \
169
+ --disable-rpath \
170
+ --enable-bcmath \
171
+ --enable-calendar \
172
+ --enable-exif \
173
+ --enable-fpm \
174
+ --enable-ftp \
175
+ --enable-inline-optimization \
176
+ --enable-intl \
177
+ --enable-mbregex --enable-mbstring \
178
+ --enable-pcntl \
179
+ --enable-shmop \
180
+ --enable-soap \
181
+ --enable-sockets \
182
+ --enable-sysvmsg --enable-sysvsem --enable-sysvshm \
183
+ --enable-wddx \
184
+ --enable-xml \
185
+ --enable-zip \
186
+ --with-bz2 \
187
+ --with-config-file-path=" ${php_install_dir} /etc" \
188
+ --with-config-file-scan-dir=" ${php_install_dir} /etc/php.d" \
189
+ --with-curl=" /usr/local" \
190
+ --with-fpm-group=" ${php_run_user} " \
191
+ --with-fpm-user=" ${php_run_user} " \
192
+ --with-gd --with-freetype-dir --with-jpeg-dir --with-png-dir --enable-gd-native-ttf \
193
+ --with-gettext \
194
+ --with-gmp \
195
+ --with-iconv-dir=" /usr/local" \
196
+ --with-libxml-dir=" /usr" \
197
+ --with-libzip \
198
+ --with-mhash \
199
+ --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --enable-mysqlnd \
200
+ --with-openssl \
201
+ --with-pspell \
202
+ --with-readline \
203
+ --with-xmlrpc \
204
+ --with-xsl \
205
+ --with-zlib \
206
+ ${LOW_MEMORY_FLAGS[*]}
206
207
207
208
# PEAR is no longer maintained, ignore errors about PEAR
208
209
sed -i" " -E " s/^(install-pear):/.IGNORE: \1\n\1:/g" ./Makefile
209
210
210
- make -j" ${THREAD_CNT} " ZEND_EXTRA_LIBS=" ${ZEND_EXTRA_LIBS[*]} " && make install && make clean
211
+ make -j" ${THREAD_CNT} " ZEND_EXTRA_LIBS=" ${ZEND_EXTRA_LIBS[*]} " || exit
212
+ make install || exit
213
+ make clean
211
214
212
215
popd || exit
213
216
@@ -216,4 +219,6 @@ popd || exit
216
219
# end #
217
220
# -----#
218
221
222
+ " ${php_install_dir} /bin/php" -v
223
+
219
224
popd || exit
0 commit comments