OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /v/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   15-Nov-2006 15:02:33
  Branch: HEAD                             Handle: 2006111514023100

  Modified files:
    openpkg-src/php         php.spec

  Log:
    add optional support for the PHP Suhosin patch & extension from the
    Hardened PHP project

  Summary:
    Revision    Changes     Path
    1.136       +39 -5      openpkg-src/php/php.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/php/php.spec
  ============================================================================
  $ cvs diff -u -r1.135 -r1.136 php.spec
  --- openpkg-src/php/php.spec  8 Nov 2006 08:36:30 -0000       1.135
  +++ openpkg-src/php/php.spec  15 Nov 2006 14:02:31 -0000      1.136
  @@ -24,6 +24,8 @@
   
   #   package versions
   %define       V_php                     5.2.0
  +%define       V_php_suhosin_p           5.2.0-0.9.6.2
  +%define       V_php_suhosin_e           0.9.12
   %define       V_php_hardened            5.1.6-0.4.15
   
   #   package information
  @@ -37,9 +39,11 @@
   Group:        Language
   License:      PHP
   Version:      %{V_php}
  -Release:      20061108
  +Release:      20061115
   
   #   package options
  +%option       with_suhosin              no
  +%option       with_hardened             no
   %option       with_bc                   no
   %option       with_bdb                  no
   %option       with_bzip2                no
  @@ -54,7 +58,6 @@
   %option       with_gd                   no
   %option       with_gdbm                 no
   %option       with_gettext              no
  -%option       with_hardened             no
   %option       with_iconv                no
   %option       with_imap                 no
   %option       with_mbregex              no
  @@ -99,18 +102,27 @@
   %undefine     with_ssl
   %define       with_ssl           yes
   %endif
  +%if "%{with_suhosin}" == "yes" && "%{with_hardened}" == "yes"
  +%undefine     with_hardened
  +%define       with_hardened      no
  +%endif
   
   #   list of sources
   Source0:      
http://static.php.net/www.php.net/distributions/php-%{V_php}.tar.gz
  -Source1:      php.ini
  +Source1:      
http://www.hardened-php.net/suhosin/_media/suhosin-%{V_php_suhosin_e}.tgz
  +Source2:      php.ini
   Patch0:       
http://www.hardened-php.net/hardening-patch-%{V_php_hardened}.patch.gz
  -Patch1:       php.patch
  +Patch1:       
http://www.hardened-php.net/suhosin/_media/suhosin-patch-%{V_php_suhosin_p}.patch.gz
  +Patch2:       php.patch
   
   #   build information
   Prefix:       %{l_prefix}
   BuildRoot:    %{l_buildroot}
   BuildPreReq:  OpenPKG, openpkg >= 20050615, gcc, flex, bison
   PreReq:       OpenPKG, openpkg >= 20050615, MTA
  +%if "%{with_suhosin}" == "yes"
  +BuildPreReq:  autoconf
  +%endif
   %if "%{with_sqlite}" == "yes"
   BuildPreReq:  sqlite
   PreReq:       sqlite
  @@ -248,13 +260,32 @@
           url       = http://www.hardened-php.net/downloads.13.html
           regex     = hardening-patch-(5\.\d+\.\d+-\d+(\.\d+)+)\.patch\.gz
       }
  +    prog php:suhosin-patch = {
  +        version   = %{V_php_suhosin_p}
  +        url       = http://www.hardened-php.net/suhosin/download.html
  +        regex     = suhosin-patch-(5\.\d+\.\d+-\d+(\.\d+)+)\.patch\.gz
  +    }
  +    prog php:suhosin-ext = {
  +        version   = %{V_php_suhosin_e}
  +        url       = http://www.hardened-php.net/suhosin/download.html
  +        regex     = suhosin-(\d+(\.\d+)+)\.tgz
  +    }
   
   %prep
       %setup -q
   %if "%{with_hardened}" == "yes"
       %patch -p1 -P 0
   %endif
  -    %patch -p0 -P 1
  +%if "%{with_suhosin}" == "yes"
  +    %setup -q -T -D -a 1
  +    %patch -p1 -P 1
  +    mv suhosin-%{V_php_suhosin_e} ext/suhosin
  +    rm -f package.xml
  +    export PHP_AUTOCONF=autoconf-213
  +    ./buildconf --copy --force
  +    $PHP_AUTOCONF
  +%endif
  +    %patch -p0 -P 2
       %{l_shtool} subst \
           -e 's;\(/include\)/freetype2;\1;' \
           configure \
  @@ -305,6 +336,9 @@
           --libdir=%{l_prefix}/lib/php \
           --disable-all \
           --enable-pdo \
  +%if "%{with_suhosin}" == "yes"
  +        --enable-suhosin \
  +%endif
   %if "%{with_calendar}" == "yes"
           --enable-calendar \
   %endif
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to