X-Git-Url: http://git.pld-linux.org/?p=packages%2Frpm.git;a=blobdiff_plain;f=rpm-php-deps.patch;h=a6b90ade63046aa04b62f367672d03523ee326ec;hp=14b73c5fa4cfde48aed881d59938c58d79c54ce8;hb=b2796c9de330b86a333d0131427322443c1c15db;hpb=df271ccbb7047656dff3f50e68cb48a6d9955220 diff --git a/rpm-php-deps.patch b/rpm-php-deps.patch index 14b73c5..a6b90ad 100644 --- a/rpm-php-deps.patch +++ b/rpm-php-deps.patch @@ -1,67 +1,12 @@ ---- rpm-4.4.2/build/rpmfc.c.orig 2005-07-21 03:04:55.000000000 +0200 -+++ rpm-4.4.2/build/rpmfc.c 2005-07-23 13:48:23.419129800 +0200 -@@ -451,6 +451,8 @@ - - { "perl script text", RPMFC_PERL|RPMFC_INCLUDE }, - { "Perl5 module source text", RPMFC_PERL|RPMFC_MODULE|RPMFC_INCLUDE }, -+ -+ { "PHP script text", RPMFC_PHP|RPMFC_INCLUDE }, - - { " /usr/bin/python", RPMFC_PYTHON|RPMFC_INCLUDE }, - -@@ -624,6 +626,7 @@ - - fc->sb_java = freeStringBuf(fc->sb_java); - fc->sb_perl = freeStringBuf(fc->sb_perl); -+ fc->sb_php = freeStringBuf(fc->sb_php); - fc->sb_python = freeStringBuf(fc->sb_python); - +--- rpm-4.4.8/lib/rpmfc.c.orig 2007-02-14 07:31:50.000000000 +0100 ++++ rpm-4.4.8/lib/rpmfc.c 2007-04-08 16:48:00.273560592 +0200 +@@ -773,7 +773,7 @@ + } else + if (fc->fcolor->vals[fc->ix] & RPMFC_PHP) { + xx = rpmfcHelper(fc, 'P', "php"); +- if (is_executable) ++ /* not only executable, files run by httpd usually are not */ + xx = rpmfcHelper(fc, 'R', "php"); } -@@ -711,6 +714,8 @@ - fc->fcolor->vals[fc->ix] |= RPMFC_PERL; - else if (!strncmp(bn, "python", sizeof("python")-1)) - fc->fcolor->vals[fc->ix] |= RPMFC_PYTHON; -+ else if (!strcmp(bn, "php")) -+ fc->fcolor->vals[fc->ix] |= RPMFC_PHP; - - break; - } -@@ -731,6 +736,10 @@ - #endif - xx = rpmfcHelper(fc, 'R', "python"); - } -+ if (fc->fcolor->vals[fc->ix] & RPMFC_PHP) { -+ xx = rpmfcHelper(fc, 'P', "php"); -+ xx = rpmfcHelper(fc, 'R', "php"); -+ } - - return 0; - } -@@ -1059,6 +1068,7 @@ - { rpmfcELF, RPMFC_ELF }, - { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PERL) }, - { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PYTHON) }, -+ { rpmfcSCRIPT, (RPMFC_SCRIPT|RPMFC_PHP) }, - { NULL, 0 } - }; - -@@ -1228,6 +1238,9 @@ - /*@-branchstate@*/ - if (slen >= sizeof(".pm") && !strcmp(s+slen-(sizeof(".pm")-1), ".pm")) - ftype = "Perl5 module source text"; -+ /* XXX all files with extension ".php" are PHP modules for now. */ -+ else if (slen >= sizeof(".php") && !strcmp(s+slen-(sizeof(".php")-1), ".php")) -+ ftype = "PHP script text"; - /* XXX skip all files in /dev/ which are (or should be) %dev dummies. */ - else if (slen >= fc->brlen+sizeof("/dev/") && !strncmp(s+fc->brlen, "/dev/", sizeof("/dev/")-1)) - ftype = ""; ---- rpm-4.2/build/rpmfc.h.wiget Tue Apr 1 10:00:23 2003 -+++ rpm-4.2/build/rpmfc.h Tue Apr 1 10:01:22 2003 -@@ -40,6 +40,7 @@ - StringBuf sb_java; /*!< concatenated list of java colored files. */ - StringBuf sb_perl; /*!< concatenated list of perl colored files. */ - StringBuf sb_python;/*!< concatenated list of python colored files. */ -+ StringBuf sb_php; /*!< concatenated list of php colored files. */ - - }; +