gnu: hdf-java: Fix build.
[jackhill/guix/guix.git] / gnu / packages / php.scm
index f3f279a..8d96e54 100644 (file)
@@ -2,6 +2,8 @@
 ;;; Copyright © 2016 Julien Lepiller <julien@lepiller.eu>
 ;;; Copyright © 2016 Marius Bakke <mbakke@fastmail.com>
 ;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2019 Oleg Pykhalov <go.wigust@gmail.com>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -28,6 +30,7 @@
   #:use-module (gnu packages curl)
   #:use-module (gnu packages cyrus-sasl)
   #:use-module (gnu packages databases)
+  #:use-module (gnu packages dbm)
   #:use-module (gnu packages fontutils)
   #:use-module (gnu packages gd)
   #:use-module (gnu packages gettext)
@@ -40,6 +43,7 @@
   #:use-module (gnu packages pcre)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages readline)
+  #:use-module (gnu packages sqlite)
   #:use-module (gnu packages textutils)
   #:use-module (gnu packages tls)
   #:use-module (gnu packages web)
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix build-system gnu)
+  #:use-module (guix utils)
   #: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.2.3")
+    (version "7.3.3")
     (home-page "https://secure.php.net/")
     (source (origin
               (method url-fetch)
@@ -70,7 +66,7 @@
                                   name "-" version ".tar.xz"))
               (sha256
                (base32
-                "07v5bq5b97zdqwmig6sxqsdb50vdf04w6jzmjq5kqh9gaqdlzadk"))
+                "1cxrpaz5cvx1qq9klwgvcyvcly865sxpn4bdk82wpl43l5wkxc3b"))
               (modules '((guix build utils)))
               (snippet
                '(with-directory-excursion "ext"
                             ;;"fileinfo/libmagic" ; This is a patched version of libmagic.
                             '("gd/libgd"
                               "mbstring/oniguruma"
-                              "pcre/pcrelib"
+                              "pcre/pcre2lib"
                               "sqlite3/libsqlite"
                               "xmlrpc/libxmlrpc"
-                              "zip/lib"))))))
+                              "zip/lib"))
+                  #t))))
     (build-system gnu-build-system)
     (arguments
      '(#:configure-flags
                "--with-mysqli"          ; Required for, e.g. wordpress
                "--with-pdo-mysql"
                "--with-zlib"
+               "--enable-bcmath"        ; Required for, e.g. Zabbix frontend
                "--enable-calendar"
                "--enable-dba=shared"
                "--enable-exif"
                          ;; This bug should have been fixed in gd 2.2.2.
                          ;; Is it a regression?
                          "ext/gd/tests/bug65148.phpt"
+                         ;; These tests should not be run (disabled because
+                         ;; GD_BUNDLED = 0)
+                         "ext/gd/tests/bug77198_auto.phpt"
+                         "ext/gd/tests/bug77198_threshold.phpt"
+                         "ext/gd/tests/bug77200.phpt"
+                         "ext/gd/tests/bug77269.phpt"
                          ;; TODO: Enable these when libgd is built with xpm support.
                          "ext/gd/tests/xpm2gd.phpt"
                          "ext/gd/tests/xpm2jpg.phpt"
                          "ext/gd/tests/xpm2png.phpt"
+                         ;; Whitespace difference, probably caused by a very
+                         ;; long store path
+                         "ext/gd/tests/bug77479.phpt"
+                         ;; Slightly different result (NULL instead of false),
+                         ;; but the bug report suggests the issue was in
+                         ;; the bundled gd, not upstream.
+                         "ext/gd/tests/bug77272.phpt"
 
                          ;; XXX: These iconv tests have the expected outcome,
                          ;; but with different error messages.
                          ;; Expects "illegal character", instead gets "unknown error (84)".
                          "ext/iconv/tests/bug52211.phpt"
+                         "ext/iconv/tests/bug60494.phpt"
                          ;; Expects "wrong charset", gets unknown error (22).
                          "ext/iconv/tests/iconv_mime_decode_variation3.phpt"
                          "ext/iconv/tests/iconv_strlen_error2.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.
                          "ext/curl/tests/bug61948.phpt"
+                         ;; Fails on recent curl https://bugs.php.net/patch-display.php?bug_id=77493
+                         "ext/curl/tests/curl_basic_009.phpt"
                          ;; Expects a false boolean, gets empty array from glob().
                          "ext/standard/tests/file/bug41655_1.phpt"
                          "ext/standard/tests/file/glob_variation5.phpt"
                          "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"))
+                         "ext/mbstring/tests/bug77367.phpt"
+                         "ext/mbstring/tests/bug77370.phpt"
+                         "ext/mbstring/tests/bug77371.phpt"
+                         "ext/mbstring/tests/bug77381.phpt"
+                         "ext/ldap/tests/ldap_set_option_error.phpt"
+
+                         ;; Sometimes cannot start the LDAP server.
+                         "ext/ldap/tests/bug76248.phpt"
+
+                         ;; Bug #76909 preg_match difference between 7.3 and < 7.3
+                         "ext/pcre/tests/bug76909.phpt"))
 
              ;; Skip tests requiring network access.
              (setenv "SKIP_ONLINE_TESTS" "1")
        ("curl" ,curl)
        ("cyrus-sasl" ,cyrus-sasl)
        ("freetype" ,freetype)
-       ("gd" ,gd-for-php)
+       ("gd" ,gd)
        ("gdbm" ,gdbm)
        ("glibc" ,glibc)
        ("gmp" ,gmp)
        ("libxpm" ,libxpm)
        ("libxslt" ,libxslt)
        ("libx11" ,libx11)
-       ("oniguruma" ,oniguruma)
+       ("oniguruma" ,oniguruma-5)
        ("openldap" ,openldap)
        ("openssl" ,openssl)
-       ("pcre" ,pcre)
+       ("pcre" ,pcre2)
        ("postgresql" ,postgresql)
        ("readline" ,readline)
        ("sqlite" ,sqlite)
@@ -346,3 +373,6 @@ systems, web content management systems and web frameworks." )
               license:lgpl2.1+                              ; ext/bcmath/libbcmath
               license:bsd-2                                 ; ext/fileinfo/libmagic
               license:expat))))                             ; ext/date/lib
+
+(define-public php-with-bcmath
+  (deprecated-package "php-with-bcmath" php))