File: 0036-expose_all_built_and_installed_apis.patch

package info (click to toggle)
php5 5.6.33%2Bdfsg-0%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 157,872 kB
  • sloc: ansic: 756,065; php: 22,030; sh: 12,311; cpp: 8,771; xml: 6,179; yacc: 1,564; exp: 1,514; makefile: 1,467; pascal: 1,147; awk: 538; perl: 315; sql: 22
file content (40 lines) | stat: -rw-r--r-- 1,505 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
From: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Date: Sat, 2 May 2015 10:26:56 +0200
Subject: expose_all_built_and_installed_apis

---
 scripts/man1/php-config.1.in | 2 +-
 scripts/php-config.in        | 5 ++++-
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/man1/php-config.1.in b/scripts/man1/php-config.1.in
index d9fa4b0..6ee4982 100644
--- a/scripts/man1/php-config.1.in
+++ b/scripts/man1/php-config.1.in
@@ -44,7 +44,7 @@ Full path to php CLI or CGI binary
 .TP
 .PD 0
 .B \-\-php-sapis
-Show all SAPI modules available
+Show all SAPI modules installed on the Debian system
 .TP
 .PD 0
 .B \-\-configure-options
diff --git a/scripts/php-config.in b/scripts/php-config.in
index d7faf21..a40e961 100644
--- a/scripts/php-config.in
+++ b/scripts/php-config.in
@@ -18,9 +18,12 @@ exe_extension="@EXEEXT@"
 php_cli_binary=NONE
 php_cgi_binary=NONE
 configure_options="@CONFIGURE_OPTIONS@"
-php_sapis="@PHP_INSTALLED_SAPIS@"
+#php_sapis="@PHP_INSTALLED_SAPIS@"
 phpapi="@DEBIAN_PHP_API@"
 
+# Query the dpkg database for available PHP5 sapis
+php_sapis=$(dpkg-query -W -f='${binary:Package} ' libapache2-mod-php5 libapache2-mod-php5filter php5-cgi php5-cli php5-fpm libphp5-embed 2>/dev/null | sed -e 's|libapache2-mod-php5|apache2handler|;s|libapache2-mod-php5filter|apache2filter|;s|php5-cgi|cgi|;s|php5-cli|cli|;s|php5-fpm|fpm|;s|libphp5-embed|embed|;')
+
 # Set php_cli_binary and php_cgi_binary if available
 for sapi in $php_sapis; do
   case $sapi in