From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Thompson Subject: [PATCH 2/2] gnu: Add php. Date: Thu, 29 Jan 2015 16:44:59 -0500 Message-ID: <87sietdzxg.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> References: <87y4ole00d.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:45946) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGwtb-000395-CQ for guix-devel@gnu.org; Thu, 29 Jan 2015 16:45:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YGwtZ-00054G-Ct for guix-devel@gnu.org; Thu, 29 Jan 2015 16:45:03 -0500 Received: from mail.fsf.org ([208.118.235.13]:48877) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YGwtZ-00054C-9V for guix-devel@gnu.org; Thu, 29 Jan 2015 16:45:01 -0500 Received: from 209-6-40-86.c3-0.smr-ubr1.sbo-smr.ma.cable.rcn.com ([209.6.40.86]:52535 helo=izanagi) by mail.fsf.org with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.69) (envelope-from ) id 1YGwtY-0003U1-Kv for guix-devel@gnu.org; Thu, 29 Jan 2015 16:45:01 -0500 In-Reply-To: <87y4ole00d.fsf@izanagi.i-did-not-set--mail-host-address--so-tickle-me> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --=-=-= Content-Type: text/x-diff; charset=utf-8 Content-Disposition: inline; filename=0002-gnu-Add-php.patch Content-Transfer-Encoding: quoted-printable >From 320aedada4de414e83c4c4207717d48a6ca1bbbc Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sun, 16 Nov 2014 13:48:11 -0500 Subject: [PATCH 2/2] gnu: Add php. * gnu/packages/patches/php-fix-configure.patch: New file. * gnu/packages/php.scm: New file. * gnu-system.am (GNU_SYSTEM_MODULES): Add it. --- gnu-system.am | 1 + gnu/packages/patches/php-fix-configure.patch | 68 +++++++++++++ gnu/packages/php.scm | 144 +++++++++++++++++++++++= ++++ 3 files changed, 213 insertions(+) create mode 100644 gnu/packages/patches/php-fix-configure.patch create mode 100644 gnu/packages/php.scm diff --git a/gnu-system.am b/gnu-system.am index f09b5bd..db70fa9 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -219,6 +219,7 @@ GNU_SYSTEM_MODULES =3D \ gnu/packages/pem.scm \ gnu/packages/perl.scm \ gnu/packages/photo.scm \ + gnu/packages/php.scm \ gnu/packages/pkg-config.scm \ gnu/packages/plotutils.scm \ gnu/packages/polkit.scm \ diff --git a/gnu/packages/patches/php-fix-configure.patch b/gnu/packages/pa= tches/php-fix-configure.patch new file mode 100644 index 0000000..e25057f --- /dev/null +++ b/gnu/packages/patches/php-fix-configure.patch @@ -0,0 +1,68 @@ +diff -ru php-5.4.14/configure php-5.4.14-new/configure +--- php-5.4.14/configure 2013-04-10 09:53:26.000000000 +0200 ++++ php-5.4.14-new/configure 2013-04-22 17:13:55.039043622 +0200 +@@ -6513,7 +6513,7 @@ + + case $host_alias in + *aix*) +- APXS_LIBEXECDIR=3D`$APXS -q LIBEXECDIR` ++ APXS_LIBEXECDIR=3D"$prefix/modules" + EXTRA_LDFLAGS=3D"$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/ht= tpd.exp" + PHP_AIX_LDFLAGS=3D"-Wl,-brtl" + build_type=3Dshared +@@ -6706,7 +6706,7 @@ + if test "$?" !=3D "0"; then + APACHE_INSTALL=3D"$APXS -i -a -n php5 $SAPI_SHARED" # Old apxs does n= ot have -S option + else +- APXS_LIBEXECDIR=3D'$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` ++ APXS_LIBEXECDIR=3D"$prefix/modules" + if test -z `$APXS -q SYSCONFDIR`; then + APACHE_INSTALL=3D"\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + $APXS -S LIBEXECDIR=3D'$APXS_LIBEXECDIR' \ +@@ -7909,7 +7909,7 @@ + { (exit 1); exit 1; }; } + fi + +- APXS_LIBEXECDIR=3D'$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` ++ APXS_LIBEXECDIR=3D"$prefix/modules" + if test -z `$APXS -q SYSCONFDIR`; then + INSTALL_IT=3D"\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + $APXS -S LIBEXECDIR=3D'$APXS_LIBEXECDIR' \ +@@ -8779,7 +8779,7 @@ + { (exit 1); exit 1; }; } + fi + +- APXS_LIBEXECDIR=3D'$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` ++ APXS_LIBEXECDIR=3D"$prefix/modules" + if test -z `$APXS -q SYSCONFDIR`; then + INSTALL_IT=3D"\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + $APXS -S LIBEXECDIR=3D'$APXS_LIBEXECDIR' \ +@@ -9634,7 +9634,7 @@ + + case $host_alias in + *aix*) +- APXS_LIBEXECDIR=3D`$APXS -q LIBEXECDIR` ++ APXS_LIBEXECDIR=3D"$prefix/modules" + EXTRA_LDFLAGS=3D"$EXTRA_LDFLAGS -Wl,-brtl -Wl,-bI:$APXS_LIBEXECDIR/ht= tpd.exp" + PHP_AIX_LDFLAGS=3D"-Wl,-brtl" + build_type=3Dshared +@@ -9827,7 +9827,7 @@ + if test "$?" !=3D "0"; then + APACHE_HOOKS_INSTALL=3D"$APXS -i -a -n php5 $SAPI_SHARED" # Old apxs = does not have -S option + else +- APXS_LIBEXECDIR=3D'$(INSTALL_ROOT)'`$APXS -q LIBEXECDIR` ++ APXS_LIBEXECDIR=3D"$prefix/modules" + if test -z `$APXS -q SYSCONFDIR`; then + APACHE_HOOKS_INSTALL=3D"\$(mkinstalldirs) '$APXS_LIBEXECDIR' && \ + $APXS -S LIBEXECDIR=3D'$APXS_LIBEXECDIR' \ +@@ -59657,9 +59657,7 @@ + + + if test "$PHP_GETTEXT" !=3D "no"; then +- for i in $PHP_GETTEXT /usr/local /usr; do +- test -r $i/include/libintl.h && GETTEXT_DIR=3D$i && break +- done ++ GETTEXT_DIR=3D$PHP_GETTEXT + + if test -z "$GETTEXT_DIR"; then + { { $as_echo "$as_me:$LINENO: error: Cannot locate header file libint= l.h" >&5 diff --git a/gnu/packages/php.scm b/gnu/packages/php.scm new file mode 100644 index 0000000..06dbb86 --- /dev/null +++ b/gnu/packages/php.scm @@ -0,0 +1,144 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright =C2=A9 2014 David Thompson +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages php) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix utils) + #:use-module (guix build-system gnu) + #:use-module (gnu packages) + #:use-module (gnu packages bison) + #:use-module (gnu packages compression) + #:use-module (gnu packages curl) + #:use-module (gnu packages cyrus-sasl) + #:use-module (gnu packages databases) + #:use-module (gnu packages fontutils) + #:use-module (gnu packages gd) + #:use-module (gnu packages gettext) + #:use-module (gnu packages icu4c) + #:use-module (gnu packages image) + #:use-module (gnu packages mcrypt) + #:use-module (gnu packages multiprecision) + #:use-module (gnu packages openldap) + #:use-module (gnu packages openssl) + #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages readline) + #:use-module (gnu packages video) + #:use-module (gnu packages web) + #:use-module (gnu packages xml) + #:use-module (gnu packages xorg)) + +(define-public php + (package + (name "php") + (version "5.6.3") + (source (origin + (method url-fetch) + ;; TODO: Use a mirror. + (uri (string-append "http://us1.php.net/distributions/php-" + version ".tar.xz")) + (sha256 + (base32 + "1da44by82grcjfx4yjjlv4b96kwsqfrjk0dsdbjhzwf7di849lps")) + ;; Taken from nixpkgs. Fixes gettext and some module issues. + (patches (list (search-patch "php-fix-configure.patch"))))) + (build-system gnu-build-system) + (arguments + '(#:configure-flags (let ((with (lambda* (name input #:optional (extr= a "")) + (string-append "--with-" name "=3D" + (assoc-ref %build-in= puts + input) + extra)))) + (list (with "libxml-dir" "libxml2") + (with "xsl" "libxslt") + (with "zlib" "zlib") + (with "bz2" "bzip2") + (with "curl" "curl") + (with "pcre-dir" "pcre") + (with "openssl" "openssl") + (with "openssl-dir" "openssl") + (with "gd" "gd") + (with "vpx-dir" "libvpx") + (with "jpeg-dir" "libjpeg") + (with "png-dir" "libpng") + (with "xpm-dir" "libxpm") + (with "freetype-dir" "freetype") + (with "gettext" "gettext") + (with "gmp" "gmp") + (with "ldap" "openldap") + (with "ldap-sasl" "cyrus-sasl") + (with "mcrypt" "libmcrypt") + (with "pdo-mysql" "mysql") + (with "pdo-pgsql" "postgresql") + (with "pdo-sqlite" "sqlite") + (with "readline" "readline") + (with "icu-dir" "icu4c") + ;; FIXME: This breaks the build! + ;; (with "apxs2" "httpd" "/bin/apxs") + "--enable-exif" + "--enable-ftp" + "--enable-calendar" + "--enable-intl" + "--enable-gd-native-ttf" + "--enable-bcmath" + "--enable-soap" + "--enable-sockets" + "--enable-mbtring" + "--enable-zip" + "--enable-fpm" + "--enable-pcntl" + "--enable-opcache")) + ;; FIXME: The tests fail but a status code of 0 is returned. + #:test-target "test")) + (native-inputs + `(("pkg-config" ,pkg-config) + ("perl" ,perl))) + (inputs + `(("gmp" ,gmp) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("readline" ,readline) + ("curl" ,curl) + ("zlib" ,zlib) + ("bzip2" ,bzip2) + ("mysql" ,mysql) + ("postgresql" ,postgresql) + ("sqlite" ,sqlite) + ("gd" ,gd) + ("libvpx" ,libvpx) + ("libjpeg" ,libjpeg) + ("libpng" ,libpng) + ("libxpm" ,libxpm) + ("libx11" ,libx11) + ("freetype" ,freetype) + ("openssl" ,openssl) + ("openldap" ,openldap) + ("cyrus-sasl" ,cyrus-sasl) + ("libmcrypt" ,libmcrypt) + ("pcre" ,pcre) + ("httpd" ,httpd) + ("icu4c" ,icu4c))) + (synopsis "PHP programming language interpreter") + (description "PHP is a general-purpose scripting language that is +especially suited to web development.") + (home-page "http://php.net") + ;; TODO: Add and use the PHP license. + (license license:expat))) --=20 2.1.4 --=-=-= Content-Type: text/plain -- David Thompson Web Developer - Free Software Foundation - http://fsf.org GPG Key: 0FF1D807 Support the FSF: https://fsf.org/donate --=-=-=--