;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (gnu packages web)
#:use-module (gnu packages xml)
#:use-module (gnu packages xorg)
- #:use-module (gnu packages zip)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:prefix license:))
+(define gd-for-php
+ (package
+ (inherit gd)
+ (source (origin
+ (inherit (package-source gd))
+ (patches (search-patches "gd-fix-tests-on-i686.patch"
+ "gd-freetype-test-failure.patch"
+ "gd-CVE-2018-5711.patch"))))))
+
(define-public php
(package
(name "php")
- (version "7.1.2")
+ (version "7.2.7")
(home-page "https://secure.php.net/")
(source (origin
(method url-fetch)
name "-" version ".tar.xz"))
(sha256
(base32
- "0wg9ng230w724rpwsrhcg4pw41xm1xhz0zx76haanyymkz1s05fq"))
+ "1w1iix3hkwlgkr83zpr2wbnjzd8lwhy02i5hp1j1zbrv7caw00gb"))
(modules '((guix build utils)))
(snippet
'(with-directory-excursion "ext"
"pcre/pcrelib"
"sqlite3/libsqlite"
"xmlrpc/libxmlrpc"
- "zip/lib"))))))
+ "zip/lib"))
+ #t))))
(build-system gnu-build-system)
(arguments
'(#:configure-flags
;; extension of php.
"--with-iconv"
"--with-openssl"
+ "--with-mysqli" ; Required for, e.g. wordpress
"--with-pdo-mysql"
"--with-zlib"
"--enable-calendar"
"--enable-inifile"
"--enable-mbstring"
"--enable-pcntl"
- "--enable-sockets"
- "--enable-threads"))
+ "--enable-sockets"))
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'do-not-record-build-flags
"ext/standard/tests/general_functions/proc_open.phpt")
(("/bin/cat") (which "cat")))
- ;; These tests fail because they include a file whose modification
- ;; time is 0. Touch them to make the test pass. The issue is reported
- ;; upstream as #74137.
- (utime "sapi/phpdbg/tests/include.inc" 1 1)
- (utime "sapi/phpdbg/tests/phpdbg_get_executable_stream_wrapper.inc" 1 1)
-
;; The encoding of this file is not recognized, so we simply drop it.
(delete-file "ext/mbstring/tests/mb_send_mail07.phpt")
"ext/gd/tests/bug73213.phpt"
;; Test expects generic "gd warning" but gets the actual function name.
"ext/gd/tests/createfromwbmp2_extern.phpt"
+ ;; This bug should have been fixed in gd 2.2.2.
+ ;; Is it a regression?
+ "ext/gd/tests/bug65148.phpt"
;; TODO: Enable these when libgd is built with xpm support.
"ext/gd/tests/xpm2gd.phpt"
"ext/gd/tests/xpm2jpg.phpt"
;; iconv breaks the loop after the first error with Termsig=11.
"ext/iconv/tests/iconv_strpos_variation4.phpt"
"ext/iconv/tests/iconv_strrpos_variation3.phpt"
+ ;; Expects "invalid multibyte sequence" but got
+ ;; "unknown error".
+ "ext/iconv/tests/bug76249.phpt"
;; XXX: These test failures appear legitimate, needs investigation.
;; open_basedir() restriction failure.
;; ("ISO-8859-1"=>"UTF-8") unknown error.
"ext/standard/tests/file/bug43008.phpt"
;; Table data not created in sqlite(?).
- "ext/pdo_sqlite/tests/bug_42589.phpt"))
+ "ext/pdo_sqlite/tests/bug_42589.phpt"
+
+ ;; Small variation in output.
+ "ext/mbstring/tests/mb_ereg_variation3.phpt"
+ "ext/mbstring/tests/mb_ereg_replace_variation1.phpt"
+ "ext/mbstring/tests/bug72994.phpt"
+ "ext/ldap/tests/ldap_set_option_error.phpt"
+
+ ;; Sometimes cannot start the LDAP server.
+ "ext/ldap/tests/bug76248.phpt"))
;; Skip tests requiring network access.
(setenv "SKIP_ONLINE_TESTS" "1")
;; Without this variable, 'make test' passes regardless of failures.
(setenv "REPORT_EXIT_STATUS" "1")
+ ;; Skip tests requiring I/O facilities that are unavailable in the
+ ;; build environment
+ (setenv "SKIP_IO_CAPTURE_TESTS" "1")
#t)))
#:test-target "test"))
(inputs
("curl" ,curl)
("cyrus-sasl" ,cyrus-sasl)
("freetype" ,freetype)
- ("gd" ,gd)
+ ("gd" ,gd-for-php)
("gdbm" ,gdbm)
("glibc" ,glibc)
("gmp" ,gmp)
("libxpm" ,libxpm)
("libxslt" ,libxslt)
("libx11" ,libx11)
- ("oniguruma" ,oniguruma)
+ ("oniguruma" ,oniguruma-5)
("openldap" ,openldap)
("openssl" ,openssl)
("pcre" ,pcre)