Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 93937 - php-cgi doesn't take care of "fastcgi" USE-flag
Summary: php-cgi doesn't take care of "fastcgi" USE-flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: PHP Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 60438
  Show dependency tree
 
Reported: 2005-05-25 06:40 UTC by Meder Bakirov
Modified: 2005-07-14 01:48 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Meder Bakirov 2005-05-25 06:40:03 UTC
Hello!

I think it would be more Gentoo-way :), if php-cgi ebuild could take care of
"fastcgi" USE-flag. That is, enable FastCGI support only when we have "fastcgi"
USE-flag set.

Now, php-cgi ebuild adds a support for the FastCGI interface directly this way:

src_compile() {
        # CLI needed to build stuff
        myconf="${myconf} \
                --enable-cgi \
                --enable-cli \
                --enable-fastcgi" <<<


Reproducible: Always
Steps to Reproduce:
1.
2.
3.




Here is a diff of what I mean :) :

--- php-cgi-4.3.11-r1.ebuild.orig       2005-05-25 18:33:42.000000000 +0600
+++ php-cgi-4.3.11-r1.ebuild    2005-05-25 18:45:50.000000000 +0600
@@ -7,7 +7,7 @@ inherit php-sapi eutils

 DESCRIPTION="PHP CGI"
 SLOT="0"
-IUSE="${IUSE} force-cgi-redirect"
+IUSE="${IUSE} fastcgi force-cgi-redirect"
 KEYWORDS="x86 sparc alpha hppa ppc ia64 amd64 ~mips"

 # for this revision only
@@ -28,8 +28,11 @@ src_compile() {
        # CLI needed to build stuff
        myconf="${myconf} \
                --enable-cgi \
-               --enable-cli \
-               --enable-fastcgi"
+               --enable-cli"
+
+       if use fastcgi; then
+               myconf="${myconf} --enable-fastcgi"
+       fi

        if use force-cgi-redirect; then
                myconf="${myconf} --enable-force-cgi-redirect"
Comment 1 Stuart Herbert (RETIRED) gentoo-dev 2005-05-31 13:42:20 UTC
Is there a reason why we shouldn't always building php-cgi w/ fastcgi support
enabled?  PHP built w/ fastcgi support runs fine on web servers that only
support the older CGI interface.

Best regards,
Stu
Comment 2 Meder Bakirov 2005-05-31 22:33:47 UTC
It's OK with the current state of php-cgi ebuild, but I just wanted it to be
better - i.e. comply to Gentoo standards, if there is one... 

For example, personally I wanted to build php-cgi with fastcgi support, I know
that there is a USE-flag for fastcgi support, and while looking at USE-flags of
php-cgi I didn't find corresponding one, i.e. 'fastcgi' USE-flag, which forced
me to look at the ebuild itself, i.e. forced me to make one or two steps
further, all just to know if this ebuild has a fastcgi support or not.

Another example is that one may complain about the inclusion of fastcgi-support
without his knowledge into the final bin, even if WE 'know' it is better to have
a fastcgi-support there. But, as you know, user wants control, even a little,
but control, which Gentoo makes possible via one of its greatest inventions -
USE-flags.

So, all I want to say is just to make it more user-friendly, i.e. more
Gentoo-way. I know that your intentions were the best you-know, but it took me
far more steps to invistigate this little issue... while I could just proceed
with USE="fastcgi" emerge php-cgi :) And finally, there is already a ready
USE-flag :)

Thank you, Stu, very much for your response!
Comment 3 evanm 2005-07-10 01:43:15 UTC
For some resason the --enable-fastcgi was removed from the php5 ebuild entirely.
This should either be on by defualt, or enabled by the USE flag but it's neither
with php-cgi-5.0.4.ebuild. (on by default in php4 ebuilds)

36c36
<       my_conf="--disable-cli --enable-cgi"
---
>       my_conf="--disable-cli --enable-cgi --enable-fastcgi"
Comment 4 Giacomo Graziosi 2005-07-11 14:01:40 UTC
Same problem here. I can't no longer use lighttpd.
Comment 5 Sebastian Bergmann (RETIRED) gentoo-dev 2005-07-14 01:48:44 UTC
Implemented in CVS for php-cgi-4.4.0-r1 and php-cgi-5.0.4.