Browse Source

Update curl version

lj2007331 8 years ago
parent
commit
596b11c561
6 changed files with 71 additions and 41 deletions
  1. 30 33
      include/php-5.3.sh
  2. 10 2
      include/php-5.4.sh
  3. 10 2
      include/php-5.5.sh
  4. 10 2
      include/php-5.6.sh
  5. 10 2
      include/php-7.sh
  6. 1 0
      versions.txt

+ 30 - 33
include/php-5.3.sh

@@ -11,6 +11,7 @@
 Install_PHP-5-3() {
 cd $oneinstack_dir/src
 src_url=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$libiconv_version.tar.gz && Download_src
+src_url=https://curl.haxx.se/download/curl-$curl_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/$libmcrypt_version/libmcrypt-$libmcrypt_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mhash/mhash/$mhash_version/mhash-$mhash_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mcrypt/MCrypt/$mcrypt_version/mcrypt-$mcrypt_version.tar.gz && Download_src
@@ -28,6 +29,33 @@ make -j ${THREAD} && make install
 cd ..
 rm -rf libiconv-$libiconv_version
 
+# Problem building php-5.3 with openssl
+if [ "$Debian_version" == '8' -o "$Ubuntu_version" == '16' ];then
+    if [ ! -e '/usr/local/openssl/lib/libcrypto.a' ];then
+        src_url=http://mirrors.linuxeye.com/oneinstack/src/openssl-1.0.0s.tar.gz && Download_src
+        tar xzf openssl-1.0.0s.tar.gz
+        cd openssl-1.0.0s
+        ./config --prefix=/usr/local/openssl -fPIC shared zlib
+        make -j ${THREAD} && make install
+        cd ..
+        rm -rf openssl-1.0.0s
+    fi
+    OpenSSL_args='--with-openssl=/usr/local/openssl'
+else
+    OpenSSL_args='--with-openssl'
+fi
+
+tar xzf curl-$curl_version.tar.gz
+cd curl-$curl_version
+if [ "$Debian_version" == '8' -o "$Ubuntu_version" == '16' ];then
+    LDFLAGS="-Wl,-rpath=/usr/local/openssl/lib" ./configure --prefix=/usr/local --with-ssl=/usr/local/openssl
+else
+    ./configure --prefix=/usr/local
+fi
+make -j ${THREAD} && make install
+cd ..
+rm -rf curl-$curl_version
+
 tar xzf libmcrypt-$libmcrypt_version.tar.gz
 cd libmcrypt-$libmcrypt_version
 ./configure
@@ -63,37 +91,6 @@ rm -rf mcrypt-$mcrypt_version
 id -u $run_user >/dev/null 2>&1
 [ $? -ne 0 ] && useradd -M -s /sbin/nologin $run_user
 
-# Problem building php-5.3 with openssl
-if [ "$Debian_version" == '8' -o "$Ubuntu_version" == '16' ];then
-    if [ -e '/usr/local/openssl/lib/libcrypto.a' ];then
-        OpenSSL_args='--with-openssl=/usr/local/openssl'
-    else
-        src_url=http://mirrors.linuxeye.com/oneinstack/src/openssl-1.0.0s.tar.gz && Download_src
-        tar xzf openssl-1.0.0s.tar.gz
-        cd openssl-1.0.0s
-        ./config --prefix=/usr/local/openssl -fPIC shared zlib
-        make -j ${THREAD} && make install
-        cd ..
-        [ -e '/usr/local/openssl/lib/libcrypto.a' ] && { OpenSSL_args='--with-openssl=/usr/local/openssl'; rm -rf openssl-1.0.0s; } || OpenSSL_args='--with-openssl'
-    fi
-    if [ "$Ubuntu_version" == '16' ];then
-        if [ -e '/usr/local/curl/lib/libcurl.a' ];then
-            Curl_args='--with-curl=/usr/local/curl'
-        else
-            src_url=http://mirrors.linuxeye.com/oneinstack/src/curl-7.29.0.tar.gz && Download_src
-            tar xzf curl-7.29.0.tar.gz
-            cd curl-7.29.0
-            LDFLAGS="-Wl,-rpath=/usr/local/openssl/lib" ./configure --prefix=/usr/local/curl --with-ssl=/usr/local/openssl
-            make -j ${THREAD} && make install
-            cd ..
-            [ -e '/usr/local/curl/lib/libcurl.a' ] && { Curl_args='--with-curl=/usr/local/curl'; rm -rf curl-7.29.0; } || Curl_args='--with-curl'
-        fi
-    fi
-else
-    OpenSSL_args='--with-openssl'
-    Curl_args='--with-curl'
-fi
-
 tar xzf php-$php_3_version.tar.gz
 patch -d php-$php_3_version -p0 < fpm-race-condition.patch
 cd php-$php_3_version
@@ -108,7 +105,7 @@ if [[ $Apache_version =~ ^[1-2]$ ]] || [ -e "$apache_install_dir/bin/apxs" ];the
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib \
 --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization $Curl_args --enable-mbregex \
+--enable-sysvsem --enable-inline-optimization --with-curl=/usr/local --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf $OpenSSL_args \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug
@@ -119,7 +116,7 @@ else
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib \
 --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization $Curl_args --enable-mbregex \
+--enable-sysvsem --enable-inline-optimization --with-curl=/usr/local --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf $OpenSSL_args \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug

+ 10 - 2
include/php-5.4.sh

@@ -11,6 +11,7 @@
 Install_PHP-5-4() {
 cd $oneinstack_dir/src
 src_url=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$libiconv_version.tar.gz && Download_src
+src_url=https://curl.haxx.se/download/curl-$curl_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/$libmcrypt_version/libmcrypt-$libmcrypt_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mhash/mhash/$mhash_version/mhash-$mhash_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mcrypt/MCrypt/$mcrypt_version/mcrypt-$mcrypt_version.tar.gz && Download_src
@@ -26,6 +27,13 @@ make -j ${THREAD} && make install
 cd ..
 rm -rf libiconv-$libiconv_version
 
+tar xzf curl-$curl_version.tar.gz
+cd curl-$curl_version
+./configure --prefix=/usr/local
+make -j ${THREAD} && make install
+cd ..
+rm -rf curl-$curl_version
+
 tar xzf libmcrypt-$libmcrypt_version.tar.gz
 cd libmcrypt-$libmcrypt_version
 ./configure
@@ -71,7 +79,7 @@ if [[ $Apache_version =~ ^[1-2]$ ]] || [ -e "$apache_install_dir/bin/apxs" ];the
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib \
 --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
+--enable-sysvsem --enable-inline-optimization --with-curl=/usr/local --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug
@@ -82,7 +90,7 @@ else
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib \
 --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
+--enable-sysvsem --enable-inline-optimization --with-curl=/usr/local --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug

+ 10 - 2
include/php-5.5.sh

@@ -11,6 +11,7 @@
 Install_PHP-5-5() {
 cd $oneinstack_dir/src
 src_url=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$libiconv_version.tar.gz && Download_src
+src_url=https://curl.haxx.se/download/curl-$curl_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/$libmcrypt_version/libmcrypt-$libmcrypt_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mhash/mhash/$mhash_version/mhash-$mhash_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mcrypt/MCrypt/$mcrypt_version/mcrypt-$mcrypt_version.tar.gz && Download_src
@@ -26,6 +27,13 @@ make -j ${THREAD} && make install
 cd ..
 rm -rf libiconv-$libiconv_version
 
+tar xzf curl-$curl_version.tar.gz
+cd curl-$curl_version
+./configure --prefix=/usr/local
+make -j ${THREAD} && make install
+cd ..
+rm -rf curl-$curl_version
+
 tar xzf libmcrypt-$libmcrypt_version.tar.gz
 cd libmcrypt-$libmcrypt_version
 ./configure
@@ -71,7 +79,7 @@ if [[ $Apache_version =~ ^[1-2]$ ]] || [ -e "$apache_install_dir/bin/apxs" ];the
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib \
 --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
+--enable-sysvsem --enable-inline-optimization --with-curl=/usr/local --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug
@@ -82,7 +90,7 @@ else
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib \
 --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
+--enable-sysvsem --enable-inline-optimization --with-curl=/usr/local --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug

+ 10 - 2
include/php-5.6.sh

@@ -11,6 +11,7 @@
 Install_PHP-5-6() {
 cd $oneinstack_dir/src
 src_url=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$libiconv_version.tar.gz && Download_src
+src_url=https://curl.haxx.se/download/curl-$curl_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/$libmcrypt_version/libmcrypt-$libmcrypt_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mhash/mhash/$mhash_version/mhash-$mhash_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mcrypt/MCrypt/$mcrypt_version/mcrypt-$mcrypt_version.tar.gz && Download_src
@@ -25,6 +26,13 @@ make -j ${THREAD} && make install
 cd ..
 rm -rf libiconv-$libiconv_version
 
+tar xzf curl-$curl_version.tar.gz
+cd curl-$curl_version
+./configure --prefix=/usr/local
+make -j ${THREAD} && make install
+cd ..
+rm -rf curl-$curl_version
+
 tar xzf libmcrypt-$libmcrypt_version.tar.gz
 cd libmcrypt-$libmcrypt_version
 ./configure
@@ -70,7 +78,7 @@ if [[ $Apache_version =~ ^[1-2]$ ]] || [ -e "$apache_install_dir/bin/apxs" ];the
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib \
 --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
+--enable-sysvsem --enable-inline-optimization --with-curl=/usr/local --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug
@@ -81,7 +89,7 @@ else
 --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib \
 --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
+--enable-sysvsem --enable-inline-optimization --with-curl=/usr/local --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug

+ 10 - 2
include/php-7.sh

@@ -11,6 +11,7 @@
 Install_PHP-7() {
 cd $oneinstack_dir/src
 src_url=http://ftp.gnu.org/pub/gnu/libiconv/libiconv-$libiconv_version.tar.gz && Download_src
+src_url=https://curl.haxx.se/download/curl-$curl_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mcrypt/Libmcrypt/$libmcrypt_version/libmcrypt-$libmcrypt_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mhash/mhash/$mhash_version/mhash-$mhash_version.tar.gz && Download_src
 src_url=http://downloads.sourceforge.net/project/mcrypt/MCrypt/$mcrypt_version/mcrypt-$mcrypt_version.tar.gz && Download_src
@@ -25,6 +26,13 @@ make -j ${THREAD} && make install
 cd ..
 rm -rf libiconv-$libiconv_version
 
+tar xzf curl-$curl_version.tar.gz
+cd curl-$curl_version
+./configure --prefix=/usr/local
+make -j ${THREAD} && make install
+cd ..
+rm -rf curl-$curl_version
+
 tar xzf libmcrypt-$libmcrypt_version.tar.gz
 cd libmcrypt-$libmcrypt_version
 ./configure
@@ -71,7 +79,7 @@ if [[ $Apache_version =~ ^[1-2]$ ]] || [ -e "$apache_install_dir/bin/apxs" ];the
 --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib \
 --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
+--enable-sysvsem --enable-inline-optimization --with-curl=/usr/local --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug
@@ -82,7 +90,7 @@ else
 --enable-mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd \
 --with-iconv-dir=/usr/local --with-freetype-dir --with-jpeg-dir --with-png-dir --with-zlib \
 --with-libxml-dir=/usr --enable-xml --disable-rpath --enable-bcmath --enable-shmop --enable-exif \
---enable-sysvsem --enable-inline-optimization --with-curl --enable-mbregex \
+--enable-sysvsem --enable-inline-optimization --with-curl=/usr/local --enable-mbregex \
 --enable-mbstring --with-mcrypt --with-gd --enable-gd-native-ttf --with-openssl \
 --with-mhash --enable-pcntl --enable-sockets --with-xmlrpc --enable-ftp --enable-intl --with-xsl \
 --with-gettext --enable-zip --enable-soap --disable-ipv6 --disable-debug

+ 1 - 0
versions.txt

@@ -51,6 +51,7 @@ libiconv_version=1.14
 libmcrypt_version=2.5.8
 mcrypt_version=2.6.8
 mhash_version=0.9.9.9
+curl_version=7.35.0
 
 # Ftp
 pureftpd_version=1.0.42