Changeset 5516569 in dotfiles for guix/.guix-packages/php.scm


Ignore:
Timestamp:
Oct 6, 2022, 12:26:10 PM (2 years ago)
Author:
Mikhail Kirillov <w96k@…>
Branches:
master
Children:
2107e51
Parents:
a48604f
git-author:
Mikhail Kirillov <w96k@…> (10/06/22 12:24:57)
git-committer:
Mikhail Kirillov <w96k@…> (10/06/22 12:26:10)
Message:

Add changes to config

File:
1 edited

Legend:

Unmodified
Added
Removed
  • guix/.guix-packages/php.scm

    ra48604f r5516569  
    3636  #:use-module ((guix licenses) #:prefix license:))
    3737
    38 (define-public php-ampq
    39   (package
    40     (name "php-ampq")
    41     (version "7.4.26")
    42     (home-page "https://secure.php.net/")
    43     (source (origin
    44               (method url-fetch)
    45               (uri (string-append home-page "distributions/"
    46                                   "php-" version ".tar.xz"))
    47               (sha256
    48                (base32
    49                 "1y0f1xgfi8cks6npdhrycg8r9g3q0pikqgf5h4xafpy8znmb61g3"))
    50               (patches
    51                (search-patches "php-bug-74093-test.patch"
    52                                "php-openssl_x509_checkpurpose_basic.patch"))
    53               (modules '((guix build utils)))
    54               (snippet
    55                '(with-directory-excursion "ext"
    56                   (for-each delete-file-recursively
    57                             ;; Some of the bundled libraries have no proper upstream.
    58                             ;; Ideally we'd extract these out as separate packages:
    59                             ;;"mbstring/libmbfl"
    60                             ;;"date/lib"
    61                             ;;"bcmath/libbcmath"
    62                             ;;"fileinfo/libmagic" ; a patched version of libmagic
    63                             '("gd/libgd"
    64                               "pcre/pcre2lib"
    65                               "xmlrpc/libxmlrpc"))))))
    66     (build-system gnu-build-system)
    67     (arguments
    68      `(#:configure-flags
    69        (let-syntax ((with (syntax-rules ()
    70                             ((_ option input)
    71                              (string-append option "="
    72                                             (assoc-ref %build-inputs input))))))
    73          (list (with "--with-bz2" "bzip2")
    74                (with "--with-curl" "curl")
    75                (with "--with-gdbm" "gdbm")
    76                (with "--with-gettext" "libc")  ; libintl.h
    77                (with "--with-gmp" "gmp")
    78                (with "--with-ldap" "openldap")
    79                (with "--with-ldap-sasl" "cyrus-sasl")
    80                (with "--with-pdo-pgsql" "postgresql")
    81                (with "--with-pdo-sqlite" "sqlite")
    82                (with "--with-pgsql" "postgresql")
    83                ;; PHP’s Pspell extension, while retaining its current name,
    84                ;; now uses the Aspell library.
    85                (with "--with-pspell" "aspell")
    86                (with "--with-readline" "readline")
    87                (with "--with-sodium" "libsodium")
    88                (with "--with-sqlite3" "sqlite")
    89                (with "--with-tidy" "tidy")
    90                (with "--with-xsl" "libxslt")
    91                (with "--with-zlib-dir" "zlib")
    92                ;; We could add "--with-snmp", but it requires netsnmp that
    93                ;; we don't have a package for. It is used to build the snmp
    94                ;; extension of php.
    95                "--with-external-pcre"
    96                "--with-external-gd"
    97                "--with-ampq"
    98                "--with-iconv"
    99                "--with-openssl"
    100                "--with-mysqli"          ; Required for, e.g. wordpress
    101                "--with-pdo-mysql"
    102                "--with-zip"
    103                "--with-zlib"
    104                "--enable-bcmath"        ; Required for, e.g. Zabbix frontend
    105                "--enable-calendar"
    106                "--enable-debug"
    107                "--enable-dba=shared"
    108                "--enable-exif"
    109                "--enable-flatfile"
    110                "--enable-fpm"
    111                "--enable-ftp"
    112                "--enable-gd"
    113                "--enable-inifile"
    114                "--enable-intl"
    115                "--enable-mbstring"
    116                "--enable-pcntl"
    117                "--enable-sockets"))
    118        #:phases
    119        (modify-phases %standard-phases
    120          (add-after 'unpack 'do-not-record-build-flags
    121            (lambda _
    122              ;; Prevent configure flags from being stored and causing
    123              ;; unnecessary runtime dependencies.
    124              (substitute* "scripts/php-config.in"
    125                (("@CONFIGURE_OPTIONS@") "")
    126                (("@PHP_LDFLAGS@") ""))
    127              ;; This file has ISO-8859-1 encoding.
    128              (with-fluids ((%default-port-encoding "ISO-8859-1"))
    129                (substitute* "main/build-defs.h.in"
    130                  (("@CONFIGURE_COMMAND@") "(omitted)")))))
    131          (add-before 'build 'patch-/bin/sh
    132            (lambda _
    133              (substitute* '("run-tests.php" "ext/standard/proc_open.c")
    134                (("/bin/sh") (which "sh")))))
    135          (add-before 'check 'prepare-tests
    136            (lambda _
    137              ;; Some of these files have ISO-8859-1 encoding, whereas others
    138              ;; use ASCII, so we can't use a "catch-all" find-files here.
    139              (with-fluids ((%default-port-encoding "ISO-8859-1"))
    140                (substitute* '("ext/mbstring/tests/mb_send_mail02.phpt"
    141                               "ext/mbstring/tests/mb_send_mail04.phpt"
    142                               "ext/mbstring/tests/mb_send_mail05.phpt"
    143                               "ext/mbstring/tests/mb_send_mail06.phpt")
    144                  (("/bin/cat") (which "cat"))))
    145              (substitute* '("ext/mbstring/tests/mb_send_mail01.phpt"
    146                             "ext/mbstring/tests/mb_send_mail03.phpt"
    147                             "ext/mbstring/tests/bug52681.phpt"
    148                             "ext/standard/tests/general_functions/bug34794.phpt"
    149                             "ext/standard/tests/general_functions/bug44667.phpt"
    150                             "ext/standard/tests/general_functions/proc_open.phpt")
    151                (("/bin/cat") (which "cat")))
    152 
    153              ;; The encoding of this file is not recognized, so we simply drop it.
    154              (delete-file "ext/mbstring/tests/mb_send_mail07.phpt")
    155 
    156              (substitute* "ext/standard/tests/streams/bug60602.phpt"
    157                (("'ls'") (string-append "'" (which "ls") "'")))
    158 
    159              ,@(if (string-prefix? "arm" (or (%current-system)
    160                                              (%current-target-system)))
    161                    ;; Drop tests known to fail on armhf.
    162                    '((for-each delete-file
    163                               (list
    164                                 "ext/calendar/tests/unixtojd_error1.phpt"
    165                                 ;; arm can be a lot slower, so a time-related test fails
    166                                 "ext/fileinfo/tests/cve-2014-3538-nojit.phpt"
    167                                 "ext/pcntl/tests/pcntl_unshare_01.phpt"
    168                                 "ext/pcre/tests/bug76514.phpt"
    169                                 "ext/pcre/tests/preg_match_error3.phpt"
    170                                 "ext/pcre/tests/cache_limit.phpt"
    171                                 "ext/sockets/tests/socket_getopt.phpt"
    172                                 "ext/sockets/tests/socket_sendrecvmsg_error.phpt"
    173                                 "ext/standard/tests/general_functions/var_export-locale.phpt"
    174                                 "ext/standard/tests/general_functions/var_export_basic1.phpt"
    175                                 "ext/intl/tests/timezone_getErrorCodeMessage_basic.phpt"
    176                                 "ext/intl/tests/timezone_getOffset_error.phpt"
    177                                 "sapi/cli/tests/cli_process_title_unix.phpt"
    178                                 "sapi/cli/tests/upload_2G.phpt"
    179                                 "Zend/tests/concat_003.phpt")))
    180                    '())
    181 
    182              ,@(if (target-ppc64le?)
    183                    ;; Drop tests known to fail on powerpc64le.
    184                    '((for-each delete-file
    185                                (list
    186                                 ;; phpdbg watchpoints don't work.
    187                                 ;; Bug tracked upstream at:
    188                                 ;; https://bugs.php.net/bug.php?id=81408
    189                                 "sapi/phpdbg/tests/watch_001.phpt"
    190                                 "sapi/phpdbg/tests/watch_003.phpt"
    191                                 "sapi/phpdbg/tests/watch_004.phpt"
    192                                 "sapi/phpdbg/tests/watch_005.phpt"
    193                                 "sapi/phpdbg/tests/watch_006.phpt")))
    194                    '())
    195 
    196              ;; Drop tests that are known to fail.
    197              (for-each delete-file
    198                        '("ext/posix/tests/posix_getgrgid.phpt"    ; Requires /etc/group.
    199                          "ext/posix/tests/posix_getgrnam_basic.phpt" ; Requires /etc/group.
    200                          "ext/sockets/tests/bug63000.phpt"        ; Fails to detect OS.
    201                          "ext/sockets/tests/socket_shutdown.phpt" ; Requires DNS.
    202                          "ext/sockets/tests/socket_send.phpt"     ; Likewise.
    203                          "ext/sockets/tests/mcast_ipv4_recv.phpt" ; Requires multicast.
    204                          ;; These needs /etc/services.
    205                          "ext/standard/tests/general_functions/getservbyname_basic.phpt"
    206                          "ext/standard/tests/general_functions/getservbyport_basic.phpt"
    207                          "ext/standard/tests/general_functions/getservbyport_variation1.phpt"
    208                          ;; And /etc/protocols.
    209                          "ext/standard/tests/network/getprotobyname_basic.phpt"
    210                          "ext/standard/tests/network/getprotobynumber_basic.phpt"
    211                          ;; And exotic locales.
    212                          "ext/standard/tests/strings/setlocale_basic1.phpt"
    213                          "ext/standard/tests/strings/setlocale_basic2.phpt"
    214                          "ext/standard/tests/strings/setlocale_basic3.phpt"
    215                          "ext/standard/tests/strings/setlocale_variation1.phpt"
    216                          ;; This failing test is skipped on PHP's Travis CI as it is
    217                          ;; supposedly inaccurate.
    218                          "ext/standard/tests/file/disk_free_space_basic.phpt"
    219                          ;; The following test erroneously expect the link
    220                          ;; count of a sub-directory to increase compared to
    221                          ;; its parent.
    222                          "ext/standard/tests/file/lstat_stat_variation8.phpt"
    223                          ;; This tests whether microseconds ‘differ enough’ and
    224                          ;; fails inconsistently on ‘fast’ machines.
    225                          "ext/date/tests/bug73837.phpt"
    226 
    227                          ;; XXX: These gd tests fails.  Likely because our version
    228                          ;; is different from the (patched) bundled one.
    229                          ;; Here, gd quits immediately after "fatal libpng error"; while the
    230                          ;; test expects it to additionally return a "setjmp" error and warning.
    231                          "ext/gd/tests/bug39780_extern.phpt"
    232                          "ext/gd/tests/libgd00086_extern.phpt"
    233                          ;; Extra newline in gd-png output.
    234                          "ext/gd/tests/bug45799.phpt"
    235                          ;; Test expects generic "gd warning" but gets the actual function name.
    236                          "ext/gd/tests/createfromwbmp2_extern.phpt"
    237                          ;; This bug should have been fixed in gd 2.2.2.
    238                          ;; Is it a regression?
    239                          "ext/gd/tests/bug65148.phpt"
    240                          ;; This bug should have been fixed in the gd 2.2
    241                          ;; series.  Perhaps a regression introduced by gd
    242                          ;; 2.3.0?
    243                          "ext/gd/tests/bug66590.phpt"
    244                          ;; This bug should have been fixed in the php-5.5
    245                          ;; series.  Perhaps a regression introduced by gd
    246                          ;; 2.3.0?
    247                          "ext/gd/tests/bug70102.phpt"
    248                          ;; This bug should have been fixed in the php-5.6
    249                          ;; series.  Perhaps a regression introduced by gd
    250                          ;; 2.3.0?
    251                          "ext/gd/tests/bug73869.phpt"
    252                          ;; Some WebP related tests fail.
    253                          "ext/gd/tests/webp_basic.phpt"
    254                          "ext/gd/tests/imagecreatefromstring_webp.phpt"
    255                          ;; Expected error message, but from the wrong function
    256                          "ext/gd/tests/bug77269.phpt"
    257                          ;; TODO: Enable these when libgd is built with xpm support.
    258                          "ext/gd/tests/xpm2gd.phpt"
    259                          "ext/gd/tests/xpm2jpg.phpt"
    260                          "ext/gd/tests/xpm2png.phpt"
    261                          ;; Whitespace difference, probably caused by a very
    262                          ;; long store path
    263                          "ext/gd/tests/bug77479.phpt"
    264                          ;; Expected invalid XBM but got EOF before image was
    265                          ;; complete.  It's a warning in both cases and test
    266                          ;; result is the same.
    267                          "ext/gd/tests/bug77973.phpt"
    268                          ;; Test expects uninitialized value to be false, but
    269                          ;; instead gets "resource(5) of type (gd)".
    270                          "ext/gd/tests/bug79067.phpt"
    271                          ;; The following test fails with "The image size
    272                          ;; differs: expected 114x115, got 117x117".
    273                          "ext/gd/tests/bug79068.phpt"
    274 
    275                          ;; XXX: These iconv tests have the expected outcome,
    276                          ;; but with different error messages.
    277                          ;; Expects "illegal character", instead gets "unknown error (84)".
    278                          "ext/iconv/tests/bug52211.phpt"
    279                          "ext/iconv/tests/bug60494.phpt"
    280                          ;; Expects "wrong charset", gets unknown error (22).
    281                          "ext/iconv/tests/iconv_strlen_error2.phpt"
    282                          "ext/iconv/tests/iconv_substr_error2.phpt"
    283                          ;; Expects conversion error, gets "error condition Termsig=11".
    284                          "ext/iconv/tests/iconv_strpos_error2.phpt"
    285                          "ext/iconv/tests/iconv_strrpos_error2.phpt"
    286                          ;; Expects "invalid multibyte sequence" but got
    287                          ;; "unknown error".
    288                          "ext/iconv/tests/bug76249.phpt"
    289 
    290                          ;; XXX: These test failures appear legitimate, needs investigation.
    291                          ;; open_basedir() restriction failure.
    292                          "ext/curl/tests/bug61948-unix.phpt"
    293                          ;; Expects a false boolean, gets empty array from glob().
    294                          "ext/standard/tests/file/bug41655_1.phpt"
    295                          "ext/standard/tests/file/glob_variation5.phpt"
    296                          ;; The test expects an Array, but instead get the contents(?).
    297                          "ext/gd/tests/bug43073.phpt"
    298                          ;; imagettftext() returns wrong coordinates.
    299                          "ext/gd/tests/bug48732-mb.phpt"
    300                          "ext/gd/tests/bug48732.phpt"
    301                          ;; Similarly for imageftbbox().
    302                          "ext/gd/tests/bug48801-mb.phpt"
    303                          "ext/gd/tests/bug48801.phpt"
    304                          ;; Different expected output from imagecolorallocate().
    305                          "ext/gd/tests/bug53504.phpt"
    306                          ;; Wrong image size after scaling an image.
    307                          "ext/gd/tests/bug73272.phpt"
    308                          ;; Expects iconv to detect illegal characters, instead gets
    309                          ;; "unknown error (84)" and heap corruption(!).
    310                          "ext/iconv/tests/bug48147.phpt"
    311                          ;; Expects illegal character ".", gets "=?utf-8?Q?."
    312                          "ext/iconv/tests/bug51250.phpt"
    313                          ;; iconv throws "buffer length exceeded" on some string checks.
    314                          "ext/iconv/tests/iconv_mime_encode.phpt"
    315                          ;; file_get_contents(): iconv stream filter
    316                          ;; ("ISO-8859-1"=>"UTF-8") unknown error.
    317                          "ext/standard/tests/file/bug43008.phpt"
    318                          ;; Table data not created in sqlite(?).
    319                          "ext/pdo_sqlite/tests/bug_42589.phpt"
    320                          ;; Expects an Array with 3 preg_matches; gets 0.
    321                          "ext/pcre/tests/bug79846.phpt"
    322                          ;; Expects an empty Array; gets one with " " in it.
    323                          "ext/pcre/tests/bug80118.phpt"
    324                          ;; Renicing a process fails in the build environment.
    325                          "ext/standard/tests/general_functions/proc_nice_basic.phpt"
    326                          ;; Can fail on fast machines?
    327                          "Zend/tests/bug74093.phpt"))
    328 
    329              ;; Accomodate two extra openssl errors flanking the expected one:
    330              ;; random number generator:RAND_{load,write}_file:Cannot open file
    331              ;; This is due to an invalid $HOME, but changing it in the test
    332              ;; still prints the first one & changing it globally is overkill.
    333              (substitute* "ext/openssl/tests/bug80747.phpt"
    334                ((".*error:%s:key size too small.*" match)
    335                 (string-append "%s\n" match "%s\n")))
    336 
    337              ;; Skip tests requiring network access.
    338              (setenv "SKIP_ONLINE_TESTS" "1")
    339              ;; Without this variable, 'make test' passes regardless of failures.
    340              (setenv "REPORT_EXIT_STATUS" "1")
    341              ;; Skip tests requiring I/O facilities that are unavailable in the
    342              ;; build environment
    343              (setenv "SKIP_IO_CAPTURE_TESTS" "1"))))
    344        #:test-target "test"))
    345     (inputs
    346      `(("aspell" ,aspell)
    347        ("bzip2" ,bzip2)
    348        ("curl" ,curl)
    349        ("cyrus-sasl" ,cyrus-sasl)
    350        ("gd" ,gd)
    351        ("gdbm" ,gdbm)
    352        ("gmp" ,gmp)
    353        ("gnutls" ,gnutls)
    354        ("icu4c" ,icu4c)
    355        ("libgcrypt" ,libgcrypt)
    356        ("libpng" ,libpng)
    357        ("libsodium" ,libsodium)
    358        ("libxml2" ,libxml2)
    359        ("libxslt" ,libxslt)
    360        ("libx11" ,libx11)
    361        ("libzip" ,libzip)
    362        ("oniguruma" ,oniguruma)
    363        ("openldap" ,openldap)
    364        ("openssl" ,openssl)
    365        ("pcre" ,pcre2)
    366        ("postgresql" ,postgresql)
    367        ("readline" ,readline)
    368        ("sqlite" ,sqlite)
    369        ("tidy" ,tidy)
    370        ("zlib" ,zlib)))
    371     (native-inputs
    372      `(("pkg-config" ,pkg-config)
    373        ("bison" ,bison)
    374        ("gettext" ,gettext-minimal)
    375        ("procps" ,procps)))             ; for tests
    376     (synopsis "PHP programming language")
    377     (description
    378       "PHP (PHP Hypertext Processor) is a server-side (CGI) scripting
    379 language designed primarily for web development but is also used as
    380 a general-purpose programming language.  PHP code may be embedded into
    381 HTML code, or it can be used in combination with various web template
    382 systems, web content management systems and web frameworks." )
    383     (license (list
    384               (license:non-copyleft "file://LICENSE")       ; The PHP license.
    385               (license:non-copyleft "file://Zend/LICENSE")  ; The Zend license.
    386               license:lgpl2.1                               ; ext/mbstring/libmbfl
    387               license:lgpl2.1+                              ; ext/bcmath/libbcmath
    388               license:bsd-2                                 ; ext/fileinfo/libmagic
    389               license:expat))))                             ; ext/date/lib
     38;; (define-public php-8
     39;;   (package
     40;;     (name "php-8")
     41;;     (version "8.1.9")
     42;;     (home-page "https://secure.php.net/")
     43;;     (source (origin
     44;;               (method url-fetch)
     45;;               (uri (string-append home-page "distributions/"
     46;;                                   "php-" version ".tar.xz"))
     47;;               (sha256
     48;;                (base32
     49;;                 "1gr79i9dwm7qiqgimxms8rlvzzazh66sa4w9nr1cjk95wrrpwisk"))
     50;;               (modules '((guix build utils)))
     51;;               (snippet
     52;;                '(with-directory-excursion "ext"
     53;;                   (for-each delete-file-recursively
     54;;                             ;; Some of the bundled libraries have no proper upstream.
     55;;                             ;; Ideally we'd extract these out as separate packages:
     56;;                             ;;"mbstring/libmbfl"
     57;;                             ;;"date/lib"
     58;;                             ;;"bcmath/libbcmath"
     59;;                             ;;"fileinfo/libmagic" ; a patched version of libmagic
     60;;                             '("gd/libgd"
     61;;                               "pcre/pcre2lib"
     62;;                               "xmlrpc/libxmlrpc"))))))
     63;;     (build-system gnu-build-system)
     64;;     (arguments
     65;;      `(#:configure-flags
     66;;        (let-syntax ((with (syntax-rules ()
     67;;                             ((_ option input)
     68;;                              (string-append option "="
     69;;                                             (assoc-ref %build-inputs input))))))
     70;;          (list (with "--with-bz2" "bzip2")
     71;;                (with "--with-curl" "curl")
     72;;                (with "--with-gdbm" "gdbm")
     73;;                (with "--with-gettext" "libc")  ; libintl.h
     74;;                (with "--with-gmp" "gmp")
     75;;                (with "--with-ldap" "openldap")
     76;;                (with "--with-ldap-sasl" "cyrus-sasl")
     77;;                (with "--with-pdo-pgsql" "postgresql")
     78;;                (with "--with-pdo-sqlite" "sqlite")
     79;;                (with "--with-pgsql" "postgresql")
     80;;                ;; PHP’s Pspell extension, while retaining its current name,
     81;;                ;; now uses the Aspell library.
     82;;                (with "--with-pspell" "aspell")
     83;;                (with "--with-readline" "readline")
     84;;                (with "--with-sodium" "libsodium")
     85;;                (with "--with-sqlite3" "sqlite")
     86;;                (with "--with-tidy" "tidy")
     87;;                (with "--with-xsl" "libxslt")
     88;;                (with "--with-zlib-dir" "zlib")
     89;;                ;; We could add "--with-snmp", but it requires netsnmp that
     90;;                ;; we don't have a package for. It is used to build the snmp
     91;;                ;; extension of php.
     92;;                "--with-external-pcre"
     93;;                "--with-external-gd"
     94;;                "--with-iconv"
     95;;                "--with-openssl"
     96;;                "--with-mysqli"          ; Required for, e.g. wordpress
     97;;                "--with-pdo-mysql"
     98;;                "--with-zip"
     99;;                "--with-zlib"
     100;;                "--enable-bcmath"        ; Required for, e.g. Zabbix frontend
     101;;                "--enable-calendar"
     102;;                "--enable-dba=shared"
     103;;                "--enable-exif"
     104;;                "--enable-flatfile"
     105;;                "--enable-fpm"
     106;;                "--enable-ftp"
     107;;                "--enable-gd"
     108;;                "--enable-inifile"
     109;;                "--enable-intl"
     110;;                "--enable-mbstring"
     111;;                "--enable-pcntl"
     112;;                "--enable-sockets"))
     113;;        #:phases
     114;;        (modify-phases %standard-phases
     115;;          (add-after 'unpack 'do-not-record-build-flags
     116;;            (lambda _
     117;;              ;; Prevent configure flags from being stored and causing
     118;;              ;; unnecessary runtime dependencies.
     119;;              (substitute* "scripts/php-config.in"
     120;;                (("@CONFIGURE_OPTIONS@") "")
     121;;                (("@PHP_LDFLAGS@") ""))
     122;;              ;; This file has ISO-8859-1 encoding.
     123;;              (with-fluids ((%default-port-encoding "ISO-8859-1"))
     124;;                (substitute* "main/build-defs.h.in"
     125;;                  (("@CONFIGURE_COMMAND@") "(omitted)")))))
     126;;          (add-before 'build 'patch-/bin/sh
     127;;            (lambda _
     128;;              (substitute* '("run-tests.php" "ext/standard/proc_open.c")
     129;;                (("/bin/sh") (which "sh")))))
     130;;          (add-before 'check 'prepare-tests
     131;;            (lambda _
     132;;              ;; Some of these files have ISO-8859-1 encoding, whereas others
     133;;              ;; use ASCII, so we can't use a "catch-all" find-files here.
     134;;              (with-fluids ((%default-port-encoding "ISO-8859-1"))
     135;;                (substitute* '("ext/mbstring/tests/mb_send_mail02.phpt"
     136;;                               "ext/mbstring/tests/mb_send_mail04.phpt"
     137;;                               "ext/mbstring/tests/mb_send_mail05.phpt"
     138;;                               "ext/mbstring/tests/mb_send_mail06.phpt")
     139;;                  (("/bin/cat") (which "cat"))))
     140;;              (substitute* '("ext/mbstring/tests/mb_send_mail01.phpt"
     141;;                             "ext/mbstring/tests/mb_send_mail03.phpt"
     142;;                             "ext/mbstring/tests/bug52681.phpt"
     143;;                             "ext/standard/tests/general_functions/bug34794.phpt"
     144;;                             "ext/standard/tests/general_functions/bug44667.phpt"
     145;;                             "ext/standard/tests/general_functions/proc_open.phpt")
     146;;                (("/bin/cat") (which "cat")))
     147
     148;;              ;; The encoding of this file is not recognized, so we simply drop it.
     149;;              (delete-file "ext/mbstring/tests/mb_send_mail07.phpt")
     150
     151;;              (substitute* "ext/standard/tests/streams/bug60602.phpt"
     152;;                (("'ls'") (string-append "'" (which "ls") "'")))
     153
     154;;              ,@(if (string-prefix? "arm" (or (%current-system)
     155;;                                              (%current-target-system)))
     156;;                    ;; Drop tests known to fail on armhf.
     157;;                    '((for-each delete-file
     158;;                               (list
     159;;                                 "ext/calendar/tests/unixtojd_error1.phpt"
     160;;                                 ;; arm can be a lot slower, so a time-related test fails
     161;;                                 "ext/fileinfo/tests/cve-2014-3538-nojit.phpt"
     162;;                                 "ext/pcntl/tests/pcntl_unshare_01.phpt"
     163;;                                 "ext/pcre/tests/bug76514.phpt"
     164;;                                 "ext/pcre/tests/preg_match_error3.phpt"
     165;;                                 "ext/pcre/tests/cache_limit.phpt"
     166;;                                 "ext/sockets/tests/socket_getopt.phpt"
     167;;                                 "ext/sockets/tests/socket_sendrecvmsg_error.phpt"
     168;;                                 "ext/standard/tests/general_functions/var_export-locale.phpt"
     169;;                                 "ext/standard/tests/general_functions/var_export_basic1.phpt"
     170;;                                 "ext/intl/tests/timezone_getErrorCodeMessage_basic.phpt"
     171;;                                 "ext/intl/tests/timezone_getOffset_error.phpt"
     172;;                                 "sapi/cli/tests/cli_process_title_unix.phpt"
     173;;                                 "sapi/cli/tests/upload_2G.phpt"
     174;;                                 "Zend/tests/concat_003.phpt")))
     175;;                    '())
     176
     177;;              ,@(if (target-ppc64le?)
     178;;                    ;; Drop tests known to fail on powerpc64le.
     179;;                    '((for-each delete-file
     180;;                                (list
     181;;                                 ;; phpdbg watchpoints don't work.
     182;;                                 ;; Bug tracked upstream at:
     183;;                                 ;; https://bugs.php.net/bug.php?id=81408
     184;;                                 "sapi/phpdbg/tests/watch_001.phpt"
     185;;                                 "sapi/phpdbg/tests/watch_003.phpt"
     186;;                                 "sapi/phpdbg/tests/watch_004.phpt"
     187;;                                 "sapi/phpdbg/tests/watch_005.phpt"
     188;;                                 "sapi/phpdbg/tests/watch_006.phpt")))
     189;;                    '())
     190
     191;;              ;; Drop tests that are known to fail.
     192;;              (for-each delete-file
     193;;                        '("ext/posix/tests/posix_getgrgid.phpt"    ; Requires /etc/group.
     194;;                          "ext/posix/tests/posix_getgrnam_basic.phpt" ; Requires /etc/group.
     195;;                          "ext/sockets/tests/bug63000.phpt"        ; Fails to detect OS.
     196;;                          "ext/sockets/tests/socket_shutdown.phpt" ; Requires DNS.
     197;;                          "ext/sockets/tests/socket_send.phpt"     ; Likewise.
     198;;                          "ext/sockets/tests/mcast_ipv4_recv.phpt" ; Requires multicast.
     199;;                          ;; These needs /etc/services.
     200;;                          "ext/standard/tests/general_functions/getservbyname_basic.phpt"
     201;;                          "ext/standard/tests/general_functions/getservbyport_basic.phpt"
     202;;                          "ext/standard/tests/general_functions/getservbyport_variation1.phpt"
     203;;                          ;; And /etc/protocols.
     204;;                          "ext/standard/tests/network/getprotobyname_basic.phpt"
     205;;                          "ext/standard/tests/network/getprotobynumber_basic.phpt"
     206;;                          ;; And exotic locales.
     207;;                          "ext/standard/tests/strings/setlocale_basic1.phpt"
     208;;                          "ext/standard/tests/strings/setlocale_basic2.phpt"
     209;;                          "ext/standard/tests/strings/setlocale_basic3.phpt"
     210;;                          "ext/standard/tests/strings/setlocale_variation1.phpt"
     211;;                          ;; This failing test is skipped on PHP's Travis CI as it is
     212;;                          ;; supposedly inaccurate.
     213;;                          "ext/standard/tests/file/disk_free_space_basic.phpt"
     214;;                          ;; The following test erroneously expect the link
     215;;                          ;; count of a sub-directory to increase compared to
     216;;                          ;; its parent.
     217;;                          "ext/standard/tests/file/lstat_stat_variation8.phpt"
     218;;                          ;; This tests whether microseconds ‘differ enough’ and
     219;;                          ;; fails inconsistently on ‘fast’ machines.
     220;;                          "ext/date/tests/bug73837.phpt"
     221
     222;;                          ;; XXX: These gd tests fails.  Likely because our version
     223;;                          ;; is different from the (patched) bundled one.
     224;;                          ;; Here, gd quits immediately after "fatal libpng error"; while the
     225;;                          ;; test expects it to additionally return a "setjmp" error and warning.
     226;;                          "ext/gd/tests/bug39780_extern.phpt"
     227;;                          "ext/gd/tests/libgd00086_extern.phpt"
     228;;                          ;; Extra newline in gd-png output.
     229;;                          "ext/gd/tests/bug45799.phpt"
     230;;                          ;; Test expects generic "gd warning" but gets the actual function name.
     231;;                          "ext/gd/tests/createfromwbmp2_extern.phpt"
     232;;                          ;; This bug should have been fixed in gd 2.2.2.
     233;;                          ;; Is it a regression?
     234;;                          "ext/gd/tests/bug65148.phpt"
     235;;                          ;; This bug should have been fixed in the gd 2.2
     236;;                          ;; series.  Perhaps a regression introduced by gd
     237;;                          ;; 2.3.0?
     238;;                          "ext/gd/tests/bug66590.phpt"
     239;;                          ;; This bug should have been fixed in the php-5.5
     240;;                          ;; series.  Perhaps a regression introduced by gd
     241;;                          ;; 2.3.0?
     242;;                          "ext/gd/tests/bug70102.phpt"
     243;;                          ;; This bug should have been fixed in the php-5.6
     244;;                          ;; series.  Perhaps a regression introduced by gd
     245;;                          ;; 2.3.0?
     246;;                          "ext/gd/tests/bug73869.phpt"
     247;;                          ;; Some WebP related tests fail.
     248;;                          "ext/gd/tests/webp_basic.phpt"
     249;;                          "ext/gd/tests/imagecreatefromstring_webp.phpt"
     250;;                          ;; Expected error message, but from the wrong function
     251;;                          "ext/gd/tests/bug77269.phpt"
     252;;                          ;; TODO: Enable these when libgd is built with xpm support.
     253;;                          "ext/gd/tests/xpm2gd.phpt"
     254;;                          "ext/gd/tests/xpm2jpg.phpt"
     255;;                          "ext/gd/tests/xpm2png.phpt"
     256;;                          ;; Whitespace difference, probably caused by a very
     257;;                          ;; long store path
     258;;                          "ext/gd/tests/bug77479.phpt"
     259;;                          ;; Expected invalid XBM but got EOF before image was
     260;;                          ;; complete.  It's a warning in both cases and test
     261;;                          ;; result is the same.
     262;;                          "ext/gd/tests/bug77973.phpt"
     263;;                          ;; Test expects uninitialized value to be false, but
     264;;                          ;; instead gets "resource(5) of type (gd)".
     265;;                          "ext/gd/tests/bug79067.phpt"
     266;;                          ;; The following test fails with "The image size
     267;;                          ;; differs: expected 114x115, got 117x117".
     268;;                          "ext/gd/tests/bug79068.phpt"
     269
     270;;                          ;; XXX: These iconv tests have the expected outcome,
     271;;                          ;; but with different error messages.
     272;;                          ;; Expects "illegal character", instead gets "unknown error (84)".
     273;;                          "ext/iconv/tests/bug52211.phpt"
     274;;                          "ext/iconv/tests/bug60494.phpt"
     275;;                          ;; Expects "wrong charset", gets unknown error (22).
     276;;                          "ext/iconv/tests/iconv_strlen_error2.phpt"
     277;;                          "ext/iconv/tests/iconv_substr_error2.phpt"
     278;;                          ;; Expects conversion error, gets "error condition Termsig=11".
     279;;                          "ext/iconv/tests/iconv_strpos_error2.phpt"
     280;;                          "ext/iconv/tests/iconv_strrpos_error2.phpt"
     281;;                          ;; Expects "invalid multibyte sequence" but got
     282;;                          ;; "unknown error".
     283;;                          "ext/iconv/tests/bug76249.phpt"
     284
     285;;                          ;; XXX: These test failures appear legitimate, needs investigation.
     286;;                          ;; open_basedir() restriction failure.
     287;;                          "ext/curl/tests/bug61948-unix.phpt"
     288;;                          ;; Expects a false boolean, gets empty array from glob().
     289;;                          "ext/standard/tests/file/bug41655_1.phpt"
     290;;                          "ext/standard/tests/file/glob_variation5.phpt"
     291;;                          ;; The test expects an Array, but instead get the contents(?).
     292;;                          "ext/gd/tests/bug43073.phpt"
     293;;                          ;; imagettftext() returns wrong coordinates.
     294;;                          "ext/gd/tests/bug48732-mb.phpt"
     295;;                          "ext/gd/tests/bug48732.phpt"
     296;;                          ;; Similarly for imageftbbox().
     297;;                          "ext/gd/tests/bug48801-mb.phpt"
     298;;                          "ext/gd/tests/bug48801.phpt"
     299;;                          ;; Different expected output from imagecolorallocate().
     300;;                          "ext/gd/tests/bug53504.phpt"
     301;;                          ;; Wrong image size after scaling an image.
     302;;                          "ext/gd/tests/bug73272.phpt"
     303;;                          ;; Expects iconv to detect illegal characters, instead gets
     304;;                          ;; "unknown error (84)" and heap corruption(!).
     305;;                          "ext/iconv/tests/bug48147.phpt"
     306;;                          ;; Expects illegal character ".", gets "=?utf-8?Q?."
     307;;                          "ext/iconv/tests/bug51250.phpt"
     308;;                          ;; iconv throws "buffer length exceeded" on some string checks.
     309;;                          "ext/iconv/tests/iconv_mime_encode.phpt"
     310;;                          ;; file_get_contents(): iconv stream filter
     311;;                          ;; ("ISO-8859-1"=>"UTF-8") unknown error.
     312;;                          "ext/standard/tests/file/bug43008.phpt"
     313;;                          ;; Table data not created in sqlite(?).
     314;;                          "ext/pdo_sqlite/tests/bug_42589.phpt"
     315;;                          ;; Expects an Array with 3 preg_matches; gets 0.
     316;;                          "ext/pcre/tests/bug79846.phpt"
     317;;                          ;; Expects an empty Array; gets one with " " in it.
     318;;                          "ext/pcre/tests/bug80118.phpt"
     319;;                          ;; Renicing a process fails in the build environment.
     320;;                          "ext/standard/tests/general_functions/proc_nice_basic.phpt"
     321;;                          ;; Can fail on fast machines?
     322;;                          "Zend/tests/bug74093.phpt"))
     323
     324;;              ;; Accomodate two extra openssl errors flanking the expected one:
     325;;              ;; random number generator:RAND_{load,write}_file:Cannot open file
     326;;              ;; This is due to an invalid $HOME, but changing it in the test
     327;;              ;; still prints the first one & changing it globally is overkill.
     328;;              (substitute* "ext/openssl/tests/bug80747.phpt"
     329;;                ((".*error:%s:key size too small.*" match)
     330;;                 (string-append "%s\n" match "%s\n")))
     331
     332;;              ;; Skip tests requiring network access.
     333;;              (setenv "SKIP_ONLINE_TESTS" "1")
     334;;              ;; Without this variable, 'make test' passes regardless of failures.
     335;;              (setenv "REPORT_EXIT_STATUS" "1")
     336;;              ;; Skip tests requiring I/O facilities that are unavailable in the
     337;;              ;; build environment
     338;;              (setenv "SKIP_IO_CAPTURE_TESTS" "1"))))
     339;;        #:test-target "test"))
     340;;     (inputs
     341;;      `(("aspell" ,aspell)
     342;;        ("bzip2" ,bzip2)
     343;;        ("curl" ,curl)
     344;;        ("cyrus-sasl" ,cyrus-sasl)
     345;;        ("gd" ,gd)
     346;;        ("gdbm" ,gdbm)
     347;;        ("gmp" ,gmp)
     348;;        ("gnutls" ,gnutls)
     349;;        ("icu4c" ,icu4c)
     350;;        ("libgcrypt" ,libgcrypt)
     351;;        ("libpng" ,libpng)
     352;;        ("libsodium" ,libsodium)
     353;;        ("libxml2" ,libxml2)
     354;;        ("libxslt" ,libxslt)
     355;;        ("libx11" ,libx11)
     356;;        ("libzip" ,libzip)
     357;;        ("oniguruma" ,oniguruma)
     358;;        ("openldap" ,openldap)
     359;;        ("openssl" ,openssl)
     360;;        ("pcre" ,pcre2)
     361;;        ("postgresql" ,postgresql)
     362;;        ("readline" ,readline)
     363;;        ("sqlite" ,sqlite)
     364;;        ("tidy" ,tidy)
     365;;        ("zlib" ,zlib)))
     366;;     (native-inputs
     367;;      `(("pkg-config" ,pkg-config)
     368;;        ("bison" ,bison)
     369;;        ("gettext" ,gettext-minimal)
     370;;        ("procps" ,procps)))             ; for tests
     371;;     (synopsis "PHP programming language")
     372;;     (description
     373;;       "PHP (PHP Hypertext Processor) is a server-side (CGI) scripting
     374;; language designed primarily for web development but is also used as
     375;; a general-purpose programming language.  PHP code may be embedded into
     376;; HTML code, or it can be used in combination with various web template
     377;; systems, web content management systems and web frameworks." )
     378;;     (license (list
     379;;               (license:non-copyleft "file://LICENSE")       ; The PHP license.
     380;;               (license:non-copyleft "file://Zend/LICENSE")  ; The Zend license.
     381;;               license:lgpl2.1                               ; ext/mbstring/libmbfl
     382;;               license:lgpl2.1+                              ; ext/bcmath/libbcmath
     383;;               license:bsd-2                                 ; ext/fileinfo/libmagic
     384;;               license:expat))))
Note: See TracChangeset for help on using the changeset viewer.