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:   26-Jun-2007 21:38:59
  Branch: HEAD                             Handle: 2007062620385900

  Modified files:
    openpkg-src/apache      apache.spec

  Log:
    fix RDF indexing and 'openpkg build': non-boolean %options are allowed
    in OpenPKG packages, but never when used for conditional prerequisites

  Summary:
    Revision    Changes     Path
    1.417       +32 -37     openpkg-src/apache/apache.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/apache/apache.spec
  ============================================================================
  $ cvs diff -u -r1.416 -r1.417 apache.spec
  --- openpkg-src/apache/apache.spec    25 Jun 2007 20:21:44 -0000      1.416
  +++ openpkg-src/apache/apache.spec    26 Jun 2007 19:38:59 -0000      1.417
  @@ -33,17 +33,15 @@
   Group:        Web
   License:      ASF
   Version:      2.2.4
  -Release:      20070625
  +Release:      20070626
   
  -#   package options (generic)
  -%option       with_mpm                  prefork
  -
  -#   package options (suexec related)
  +#   package options
  +%option       with_mpm_prefork          yes
  +%option       with_mpm_worker           no
  +%option       with_mpm_event            no
   %option       with_suexec               yes
   %option       with_suexec_caller        %{l_nusr}
   %option       with_suexec_userdir       public_html
  -
  -#   package options (additionally used Apache modules)
   %option       with_mod_deflate          no
   %option       with_mod_ssl              no
   %option       with_mod_dav              no
  @@ -55,6 +53,18 @@
   %option       with_mod_filecache        no
   
   #   fixing implicit inter-module dependencies and correlations
  +%if "%{with_mpm_prefork}" == "yes"
  +%undefine     with_mpm_worker
  +%undefine     with_mpm_event
  +%endif
  +%if "%{with_mpm_worker}" == "yes"
  +%undefine     with_mpm_prefork
  +%undefine     with_mpm_event
  +%endif
  +%if "%{with_mpm_event}" == "yes"
  +%undefine     with_mpm_prefork
  +%undefine     with_mpm_worker
  +%endif
   %if "%{with_mod_memcache}" == "yes" || "%{with_mod_diskcache}" == "yes"
   %undefine     with_mod_cache
   %define       with_mod_cache            yes
  @@ -75,7 +85,7 @@
   PreReq:       OpenPKG, openpkg >= 20060823, perl
   BuildPreReq:  apr, pcre
   PreReq:       apr, pcre
  -%if "%{with_mpm}" == "worker" || "%{with_mpm}" == "event" || 
"%{with_mod_memcache}" == "yes"
  +%if "%{with_mpm_worker}" == "yes" || "%{with_mpm_event}" == "yes" || 
"%{with_mod_memcache}" == "yes"
   BuildPreReq:  apr::with_threads = yes
   PreReq:       apr::with_threads = yes
   %endif
  @@ -114,17 +124,6 @@
       }
   
   %prep
  -    #   some pre-flight checks on options specified
  -%if "%{with_mpm}" != "prefork" && "%{with_mpm}" != "worker" && "%{with_mpm}" 
!= "event"
  -    ( echo "Invalid value specified for option 'with_mpm'. Currently the"
  -      echo "only supported Multi-Processing Modules (MPMs) are ..."
  -      echo "- 'prefork' -- non-threaded, pre-forking web server (default)"
  -      echo "- 'worker'  -- hybrid multi-threaded multi-process web server"
  -      echo "- 'event'   -- event-based I/O multiplexing web server"
  -    ) | %{l_rpmtool} msg -b -t error
  -    exit 1
  -%endif
  -
       #   unpack Apache distribution
       %setup -q -n httpd-%{version}
       %patch -p0
  @@ -144,11 +143,6 @@
       case "%{l_platform -t}" in
           *-sunos* ) LIBS="$LIBS -lrt" ;;
       esac
  -%if "%{with_mpm}" == "worker" || "%{with_mpm}" == "event" || 
"%{with_mod_memcache}" == "yes"
  -    THREADS="--enable-threads"
  -%else
  -    THREADS="--disable-threads"
  -%endif
   %if "%{with_mod_ldap}" == "yes"
       LIBS="$LIBS -lssl -lcrypto"
   %endif
  @@ -162,11 +156,23 @@
           --includedir=%{l_prefix}/include/apache \
           --datadir=%{l_prefix}/share/apache \
           --localstatedir=%{l_prefix}/var/apache \
  -        --with-mpm=%{with_mpm} \
           --with-apr=%{l_prefix}/bin/apr-1-config \
           --with-apr-util=%{l_prefix}/bin/apu-1-config \
           --with-pcre=%{l_prefix} \
  -        $THREADS \
  +%if "%{with_mpm_prefork}" == "yes"
  +        --with-mpm="prefork" \
  +%endif
  +%if "%{with_mpm_worker}" == "yes"
  +        --with-mpm="worker" \
  +%endif
  +%if "%{with_mpm_event}" == "yes"
  +        --with-mpm="event" \
  +%endif
  +%if "%{with_mpm_worker}" == "yes" || "%{with_mpm_event}" == "yes" || 
"%{with_mod_memcache}" == "yes"
  +        --enable-threads \
  +%else
  +        --disable-threads \
  +%endif
   %if "%{with_suexec}" == "yes"
           --enable-suexec \
           --with-suexec-bin=%{l_prefix}/sbin/suexec \
  @@ -221,17 +227,6 @@
           --enable-unique-id \
           --disable-shared
   
  -    #   check whether requested MPM '%{with_mpm}' has been actually selected
  -    #   setting might affect package dependencies, therefore fallbacks
  -    #   are not acceptable
  -    if ! grep '^MPM_NAME = %{with_mpm}$' build/config_vars.mk >/dev/null 
2>&1; then
  -        ( echo "The Multi-Processing Module (MPM) '%{with_mpm}' requested 
using the"
  -          echo "'with_mpm' option doesn't seem to be available on this 
particular"
  -          echo "platform. Please check corresponding 'config.log' for 
details."
  -        ) | %{l_rpmtool} msg -b -t error
  -        exit 1
  -    fi
  -
       #   build package
       %{l_make} %{l_mflags}
   
  @@ .
______________________________________________________________________
OpenPKG                                             http://openpkg.org
CVS Repository Commit List                     [email protected]

Reply via email to