Commit 1cd90053 authored by satmandu's avatar satmandu Committed by GitHub

Update php73 to php7.3.27, php74 to php7.4.15 (#5034)

* php73 to 7.3.27

* Add php 7.4.15

* Use FileUtils.rm_rf
parent 6386c1f0
......@@ -3,39 +3,39 @@ require 'package'
class Php73 < Package
description 'PHP is a popular general-purpose scripting language that is especially suited to web development.'
homepage 'http://www.php.net/'
version '7.3.24'
@_ver = '7.3.27'
version @_ver
compatibility 'all'
source_url 'https://www.php.net/distributions/php-7.3.24.tar.xz'
source_sha256 '78b0b417a147ab7572c874334d11654e3c61ec5b3f2170098e5db02fb0c89888'
source_url "https://www.php.net/distributions/php-#{@_ver}.tar.xz"
source_sha256 '65f616e2d5b6faacedf62830fa047951b0136d5da34ae59e6744cbaf5dca148d'
binary_url ({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/php73-7.3.24-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/php73-7.3.24-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/php73-7.3.24-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/php73-7.3.24-chromeos-x86_64.tar.xz',
binary_url({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/php73-7.3.27-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/php73-7.3.27-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/php73-7.3.27-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/php73-7.3.27-chromeos-x86_64.tar.xz'
})
binary_sha256 ({
aarch64: 'ae2b5cd918dd02524c6b333ad227a51c5475e7c36de1cf13436c9fe8c0b7df28',
armv7l: 'ae2b5cd918dd02524c6b333ad227a51c5475e7c36de1cf13436c9fe8c0b7df28',
i686: '7584c8eab9ffb66894b513b09d94aa2bb679d6095e6f5f6dc7dc4b86a84b2c0e',
x86_64: 'b0482f91cd558175f1509ee6e8a12313fb5665640682d9776715307d89378641',
binary_sha256({
aarch64: '7bd308b90ec61c6d1f03bfa97cc5883a9e963fab9d63d9922493d6ca5dceefcc',
armv7l: '7bd308b90ec61c6d1f03bfa97cc5883a9e963fab9d63d9922493d6ca5dceefcc',
i686: 'd3b0be456454fd98673477769c31b240c8fff997740239d1465d14434fde47ca',
x86_64: 'fc2d093bc2ba1ab0169c6d0f644649d952b4cb32286a2aa82331dfa5d5cc05ed'
})
depends_on 'libgcrypt'
depends_on 'libjpeg_turbo'
depends_on 'libxslt'
depends_on 'libzip'
depends_on 'curl'
depends_on 'exif'
depends_on 'freetype'
depends_on 'pcre'
depends_on 're2c'
depends_on 'tidy'
depends_on 'unixodbc'
depends_on 'pygments'
def self.preinstall
phpver = `php -v 2> /dev/null | head -1 | cut -d' ' -f2`.chomp
abort "PHP version #{phpver} already installed.".lightred unless "#{phpver}" == ""
abort "PHP version #{phpver} already installed.".lightred unless phpver.to_s == ''
end
def self.patch
......@@ -53,90 +53,92 @@ class Php73 < Package
system "sed -i 's,upload_max_filesize = 2M,upload_max_filesize = 128M,' php.ini-development"
system "sed -i 's,;opcache.enable=0,opcache.enable=1,' php.ini-development"
# Fix cc: error: ext/standard/.libs/type.o: No such file or directory
#system "sed -i '98303d' configure"
#system "sed -i '98295,98296d' configure"
# system "sed -i '98303d' configure"
# system "sed -i '98295,98296d' configure"
# Fix /usr/bin/file: No such file or directory
system 'filefix'
end
def self.build
ENV['TMPDIR'] = "#{CREW_PREFIX}/tmp"
ENV['CFLAGS'] = ' -liconv'
system './configure',
"--prefix=#{CREW_PREFIX}",
"--docdir=#{CREW_PREFIX}/doc",
"--infodir=#{CREW_PREFIX}/info",
"--libdir=#{CREW_LIB_PREFIX}",
"--localstatedir=#{CREW_PREFIX}/tmp",
"--mandir=#{CREW_PREFIX}/share/man",
"--sbindir=#{CREW_PREFIX}/bin",
"--with-config-file-path=#{CREW_PREFIX}/etc",
"--with-libdir=#{ARCH_LIB}",
"--with-kerberos=#{CREW_LIB_PREFIX}",
'--enable-exif',
'--enable-fpm',
'--enable-ftp',
'--enable-mbstring',
'--enable-opcache',
'--enable-pcntl',
'--enable-shared',
'--enable-shmop',
'--enable-sockets',
'--enable-zip',
'--with-bz2',
'--with-curl',
'--with-gd',
'--with-gettext',
'--with-gmp',
'--with-libzip',
'--with-mysqli',
'--with-openssl',
'--with-pcre-regex',
'--with-pdo-mysql',
'--with-pear',
'--with-readline',
'--with-tidy',
'--with-unixODBC',
'--with-xsl',
'--with-zlib'
system "env TMPDIR='#{CREW_PREFIX}/tmp' CFLAGS='-pipe -ltinfo' \
./configure \
--prefix=#{CREW_PREFIX} \
--docdir=#{CREW_PREFIX}/doc \
--infodir=#{CREW_PREFIX}/info \
--libdir=#{CREW_LIB_PREFIX} \
--localstatedir=#{CREW_PREFIX}/tmp \
--mandir=#{CREW_MAN_PREFIX} \
--sbindir=#{CREW_PREFIX}/bin \
--with-config-file-path=#{CREW_PREFIX}/etc \
--with-libdir=#{ARCH_LIB} \
--with-kerberos=#{CREW_LIB_PREFIX} \
--enable-exif \
--enable-fpm \
--enable-ftp \
--enable-mbstring \
--enable-opcache \
--enable-pcntl \
--enable-shared \
--enable-shmop \
--enable-sockets \
--enable-zip \
--with-bz2 \
--with-curl \
--with-gd \
--with-gettext \
--with-gmp \
--with-libzip \
--with-mysqli \
--with-openssl \
--with-pcre-regex \
--with-pdo-mysql \
--with-pear \
--with-readline \
--with-tidy \
--with-unixODBC \
--with-xsl \
--with-zlib"
system 'make'
end
def self.check
#system 'make', 'test'
# system 'make', 'test'
end
def self.install
system "mkdir -p #{CREW_DEST_PREFIX}/log"
system "mkdir -p #{CREW_DEST_PREFIX}/tmp/run"
system "make", "INSTALL_ROOT=#{CREW_DEST_DIR}", "install"
system "install -Dm644 php.ini-development #{CREW_DEST_PREFIX}/etc/php.ini"
system "install -Dm755 sapi/fpm/init.d.php-fpm.in #{CREW_DEST_PREFIX}/etc/init.d/php-fpm"
system "install -Dm644 sapi/fpm/php-fpm.conf.in #{CREW_DEST_PREFIX}/etc/php-fpm.conf"
system "install -Dm644 sapi/fpm/www.conf.in #{CREW_DEST_PREFIX}/etc/php-fpm.d/www.conf"
system "ln -s #{CREW_PREFIX}/etc/init.d/php-fpm #{CREW_DEST_PREFIX}/bin/php7-fpm"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/log"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/tmp/run"
system 'make', "INSTALL_ROOT=#{CREW_DEST_DIR}", 'install'
FileUtils.install 'php.ini-development', "#{CREW_DEST_PREFIX}/etc/php.ini", mode: 0644
FileUtils.install 'sapi/fpm/init.d.php-fpm.in', "#{CREW_DEST_PREFIX}/etc/init.d/php-fpm", mode: 0755
FileUtils.install 'sapi/fpm/php-fpm.conf.in', "#{CREW_DEST_PREFIX}/etc/php-fpm.conf", mode: 0644
FileUtils.install 'sapi/fpm/www.conf.in', "#{CREW_DEST_PREFIX}/etc/php-fpm.d/www.conf", mode: 0644
Fileutils.ln_s "#{CREW_PREFIX}/etc/init.d/php-fpm", "#{CREW_DEST_PREFIX}/bin/php7-fpm"
# clean up some files created under #{CREW_DEST_DIR}. check http://pear.php.net/bugs/bug.php?id=20383 for more details
system "mv", "#{CREW_DEST_DIR}/.depdb", "#{CREW_DEST_LIB_PREFIX}/php"
system "mv", "#{CREW_DEST_DIR}/.depdblock", "#{CREW_DEST_LIB_PREFIX}/php"
system "rm", "-rf", "#{CREW_DEST_DIR}/.channels", "#{CREW_DEST_DIR}/.filemap", "#{CREW_DEST_DIR}/.lock", "#{CREW_DEST_DIR}/.registry"
FileUtils.mv "#{CREW_DEST_DIR}/.depdb", "#{CREW_DEST_LIB_PREFIX}/php"
FileUtils.mv "#{CREW_DEST_DIR}/.depdblock", "#{CREW_DEST_LIB_PREFIX}/php"
FileUtils.rm_rf "#{CREW_DEST_DIR}/.channels"
FileUtils.rm_rf "#{CREW_DEST_DIR}/.filemap"
FileUtils.rm_rf "#{CREW_DEST_DIR}/.lock"
FileUtils.rm_rf "#{CREW_DEST_DIR}/.registry"
end
def self.postinstall
puts
puts "To start the php-fpm service, execute:".lightblue
puts "php7-fpm start".lightblue
puts 'To start the php-fpm service, execute:'.lightblue
puts 'php7-fpm start'.lightblue
puts
puts "To stop the php-fpm service, execute:".lightblue
puts "php7-fpm stop".lightblue
puts 'To stop the php-fpm service, execute:'.lightblue
puts 'php7-fpm stop'.lightblue
puts
puts "To restart the php-fpm service, execute:".lightblue
puts "php7-fpm restart".lightblue
puts 'To restart the php-fpm service, execute:'.lightblue
puts 'php7-fpm restart'.lightblue
puts
puts "To start php-fpm on login, execute the following:".lightblue
puts 'To start php-fpm on login, execute the following:'.lightblue
puts "echo 'if [ -f #{CREW_PREFIX}/bin/php7-fpm ]; then' >> ~/.bashrc".lightblue
puts "echo ' #{CREW_PREFIX}/bin/php7-fpm start' >> ~/.bashrc".lightblue
puts "echo 'fi' >> ~/.bashrc".lightblue
puts "source ~/.bashrc".lightblue
puts 'source ~/.bashrc'.lightblue
end
end
......@@ -3,44 +3,44 @@ require 'package'
class Php74 < Package
description 'PHP is a popular general-purpose scripting language that is especially suited to web development.'
homepage 'http://www.php.net/'
version '7.4.12'
@_ver = '7.4.15'
version @_ver
compatibility 'all'
source_url 'https://www.php.net/distributions/php-7.4.12.tar.xz'
source_sha256 'e82d2bcead05255f6b7d2ff4e2561bc334204955820cabc2457b5239fde96b76'
source_url "https://www.php.net/distributions/php-#{@_ver}.tar.xz"
source_sha256 '9b859c65f0cf7b3eff9d4a28cfab719fb3d36a1db3c20d874a79b5ec44d43cb8'
binary_url ({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/php74-7.4.12-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/php74-7.4.12-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/php74-7.4.12-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/php74-7.4.12-chromeos-x86_64.tar.xz',
binary_url({
aarch64: 'https://dl.bintray.com/chromebrew/chromebrew/php74-7.4.15-chromeos-armv7l.tar.xz',
armv7l: 'https://dl.bintray.com/chromebrew/chromebrew/php74-7.4.15-chromeos-armv7l.tar.xz',
i686: 'https://dl.bintray.com/chromebrew/chromebrew/php74-7.4.15-chromeos-i686.tar.xz',
x86_64: 'https://dl.bintray.com/chromebrew/chromebrew/php74-7.4.15-chromeos-x86_64.tar.xz'
})
binary_sha256 ({
aarch64: 'fbafcf2adc82e5626dfc3d31b4c0dcb6d2cfc042d6759bbe1ef7fcee168f44a7',
armv7l: 'fbafcf2adc82e5626dfc3d31b4c0dcb6d2cfc042d6759bbe1ef7fcee168f44a7',
i686: '9b5a094fa6b4b49ac19a962ebb8a626e9d38e556d7e2804c405c12b0d1a86960',
x86_64: '3bc7820a3c7a8d337128983ff37eecfdaa54b65e6c9bfdb15c46b68e9c015da3',
binary_sha256({
aarch64: '98ec0e0a86572c2f07c046acb04ea43d554c8fc5bf7e93b6aef8df02e53f4115',
armv7l: '98ec0e0a86572c2f07c046acb04ea43d554c8fc5bf7e93b6aef8df02e53f4115',
i686: 'b97210411f421122416fdfebac7698c115a5b94fbfd270b1fcf0719fc7bce14f',
x86_64: '70e8e26da1c6c30381ddfc6e0a119eb66d3ad4ee18c7982df51637810d03acc0'
})
depends_on 'aspell_en'
depends_on 'libedit'
depends_on 'libgcrypt'
depends_on 'libjpeg_turbo'
depends_on 'libsodium'
depends_on 'libxslt'
depends_on 'libzip'
depends_on 'curl'
depends_on 'exif'
depends_on 'freetds'
depends_on 'freetype'
depends_on 'pcre'
depends_on 'graphite'
depends_on 're2c'
depends_on 'tidy'
depends_on 'unixodbc'
depends_on 'oniguruma'
depends_on 'pygments'
def self.preinstall
phpver = `php -v 2> /dev/null | head -1 | cut -d' ' -f2`.chomp
abort "PHP version #{phpver} already installed.".lightred unless "#{phpver}" == ""
abort "PHP version #{phpver} already installed.".lightred unless phpver.to_s == ''
end
def self.patch
......@@ -58,107 +58,113 @@ class Php74 < Package
system "sed -i 's,upload_max_filesize = 2M,upload_max_filesize = 128M,' php.ini-development"
system "sed -i 's,;opcache.enable=0,opcache.enable=1,' php.ini-development"
# Fix cc: error: ext/standard/.libs/type.o: No such file or directory
#system "sed -i '98303d' configure"
#system "sed -i '98295,98296d' configure"
# system "sed -i '98303d' configure"
# system "sed -i '98295,98296d' configure"
# Fix /usr/bin/file: No such file or directory
system 'filefix'
end
def self.build
ENV['TMPDIR'] = "#{CREW_PREFIX}/tmp"
ENV['CFLAGS'] = ' -liconv'
system './configure',
"--prefix=#{CREW_PREFIX}",
"--docdir=#{CREW_PREFIX}/doc",
"--infodir=#{CREW_PREFIX}/info",
"--libdir=#{CREW_LIB_PREFIX}",
"--localstatedir=#{CREW_PREFIX}/tmp",
"--mandir=#{CREW_PREFIX}/share/man",
"--sbindir=#{CREW_PREFIX}/bin",
"--with-config-file-path=#{CREW_PREFIX}/etc",
"--with-libdir=#{ARCH_LIB}",
"--with-kerberos=#{CREW_LIB_PREFIX}",
'--enable-bcmath',
'--enable-calendar',
'--enable-dba=shared',
'--enable-exif',
'--enable-fpm',
'--enable-ftp',
'--enable-gd',
'--enable-intl',
'--enable-mbstring',
'--enable-mysqlnd',
'--enable-opcache',
'--enable-pcntl',
'--enable-shared',
'--enable-shmop',
'--enable-soap',
'--enable-sockets',
'--enable-sysvmsg',
'--with-bz2',
'--with-curl',
'--with-ffi',
'--with-freetype',
'--with-gdbm',
'--with-gettext',
'--with-gmp',
'--with-jpeg',
'--with-kerberos',
'--with-ldap',
'--with-ldap-sasl',
'--with-libedit',
'--with-mysqli',
'--with-openssl',
'--with-pdo-dblib',
'--with-pdo-mysql',
'--with-pear',
'--with-pspell',
'--with-readline',
'--with-sodium',
'--with-tidy',
'--with-unixODBC',
'--with-xmlrpc',
'--with-xsl',
'--with-zip',
'--with-zlib'
system "env LD_LIBRARY_PATH=#{CREW_LIB_PREFIX} TMPDIR='#{CREW_PREFIX}/tmp' CFLAGS='-pipe' \
./configure \
--prefix=#{CREW_PREFIX} \
--docdir=#{CREW_PREFIX}/doc \
--infodir=#{CREW_PREFIX}/info \
--libdir=#{CREW_LIB_PREFIX} \
--localstatedir=#{CREW_PREFIX}/tmp \
--mandir=#{CREW_MAN_PREFIX} \
--sbindir=#{CREW_PREFIX}/bin \
--with-config-file-path=#{CREW_PREFIX}/etc \
--with-libdir=#{ARCH_LIB} \
--with-kerberos=#{CREW_LIB_PREFIX} \
--enable-exif \
--enable-fpm \
--enable-ftp \
--enable-mbstring \
--enable-opcache \
--enable-pcntl \
--enable-shared \
--enable-shmop \
--enable-sockets \
--enable-bcmath \
--enable-calendar \
--enable-dba=shared \
--enable-intl \
--enable-mysqlnd \
--enable-opcache \
--enable-soap \
--enable-sysvmsg \
--enable-zip \
--with-gd \
--with-libzip \
--with-pcre-regex \
--with-zip \
--with-bz2 \
--with-curl \
--with-gettext \
--with-gmp \
--with-mysqli \
--with-openssl \
--with-pdo-mysql \
--with-pear \
--with-readline \
--with-tidy \
--with-unixODBC \
--with-xsl \
--with-zlib \
--with-freetype \
--with-gdbm \
--with-jpeg \
--with-ldap \
--with-ldap-sasl \
--with-pspell \
--with-sodium \
--with-xmlrpc \
--with-zip \
--with-ffi \
--with-libedit"
#--with-pdo-dblib"
system 'make'
end
def self.check
#system 'make', 'test'
# system 'make', 'test'
end
def self.install
system "mkdir -p #{CREW_DEST_PREFIX}/log"
system "mkdir -p #{CREW_DEST_PREFIX}/tmp/run"
system "make", "INSTALL_ROOT=#{CREW_DEST_DIR}", "install"
system "install -Dm644 php.ini-development #{CREW_DEST_PREFIX}/etc/php.ini"
system "install -Dm755 sapi/fpm/init.d.php-fpm.in #{CREW_DEST_PREFIX}/etc/init.d/php-fpm"
system "install -Dm644 sapi/fpm/php-fpm.conf.in #{CREW_DEST_PREFIX}/etc/php-fpm.conf"
system "install -Dm644 sapi/fpm/www.conf.in #{CREW_DEST_PREFIX}/etc/php-fpm.d/www.conf"
system "ln -s #{CREW_PREFIX}/etc/init.d/php-fpm #{CREW_DEST_PREFIX}/bin/php7-fpm"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/log"
FileUtils.mkdir_p "#{CREW_DEST_PREFIX}/tmp/run"
system 'make', "INSTALL_ROOT=#{CREW_DEST_DIR}", 'install'
FileUtils.install 'php.ini-development', "#{CREW_DEST_PREFIX}/etc/php.ini", mode: 0644
FileUtils.install 'sapi/fpm/init.d.php-fpm.in', "#{CREW_DEST_PREFIX}/etc/init.d/php-fpm", mode: 0755
FileUtils.install 'sapi/fpm/php-fpm.conf.in', "#{CREW_DEST_PREFIX}/etc/php-fpm.conf", mode: 0755
FileUtils.install 'sapi/fpm/www.conf.in', "#{CREW_DEST_PREFIX}/etc/php-fpm.d/www.conf", mode:0644
FileUtils.ln_s "#{CREW_PREFIX}/etc/init.d/php-fpm", "#{CREW_DEST_PREFIX}/bin/php7-fpm"
# clean up some files created under #{CREW_DEST_DIR}. check http://pear.php.net/bugs/bug.php?id=20383 for more details
system "mv", "#{CREW_DEST_DIR}/.depdb", "#{CREW_DEST_LIB_PREFIX}/php"
system "mv", "#{CREW_DEST_DIR}/.depdblock", "#{CREW_DEST_LIB_PREFIX}/php"
system "rm", "-rf", "#{CREW_DEST_DIR}/.channels", "#{CREW_DEST_DIR}/.filemap", "#{CREW_DEST_DIR}/.lock", "#{CREW_DEST_DIR}/.registry"
FileUtils.mv "#{CREW_DEST_DIR}/.depdb", "#{CREW_DEST_LIB_PREFIX}/php"
FileUtils.mv "#{CREW_DEST_DIR}/.depdblock", "#{CREW_DEST_LIB_PREFIX}/php"
FileUtils.rm_rf "#{CREW_DEST_DIR}/.channels"
FileUtils.rm_rf "#{CREW_DEST_DIR}/.filemap"
FileUtils.rm_rf "#{CREW_DEST_DIR}/.lock"
FileUtils.rm_rf "#{CREW_DEST_DIR}/.registry"
end
def self.postinstall
puts
puts "To start the php-fpm service, execute:".lightblue
puts "php7-fpm start".lightblue
puts 'To start the php-fpm service, execute:'.lightblue
puts 'php7-fpm start'.lightblue
puts
puts "To stop the php-fpm service, execute:".lightblue
puts "php7-fpm stop".lightblue
puts 'To stop the php-fpm service, execute:'.lightblue
puts 'php7-fpm stop'.lightblue
puts
puts "To restart the php-fpm service, execute:".lightblue
puts "php7-fpm restart".lightblue
puts 'To restart the php-fpm service, execute:'.lightblue
puts 'php7-fpm restart'.lightblue
puts
puts "To start php-fpm on login, execute the following:".lightblue
puts 'To start php-fpm on login, execute the following:'.lightblue
puts "echo 'if [ -f #{CREW_PREFIX}/bin/php7-fpm ]; then' >> ~/.bashrc".lightblue
puts "echo ' #{CREW_PREFIX}/bin/php7-fpm start' >> ~/.bashrc".lightblue
puts "echo 'fi' >> ~/.bashrc".lightblue
puts "source ~/.bashrc".lightblue
puts 'source ~/.bashrc'.lightblue
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment