expose_all_built_and_installed_apis
authorDebian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org>
Sat, 2 May 2015 08:26:56 +0000 (10:26 +0200)
committerOndřej Surý <ondrej@debian.org>
Thu, 11 Apr 2024 20:30:26 +0000 (22:30 +0200)
Gbp-Pq: Name 0020-expose_all_built_and_installed_apis.patch

scripts/man1/php-config.1.in
scripts/php-config.in

index 8ccd171641e14f48c2e10ac74866b1044b658820..04a3290760502ac2f244702ffcba3ef9357aeac2 100644 (file)
@@ -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
index cac95acc478a070e93a4de655e97266fb770b049..45a0759743301c74989340ca7921ab101efe73cb 100644 (file)
@@ -18,11 +18,14 @@ 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@"
 ini_dir="@EXPANDED_PHP_CONFIG_FILE_SCAN_DIR@"
 ini_path="@EXPANDED_PHP_CONFIG_FILE_PATH@"
 
+# Query the dpkg database for available PHP sapis
+php_sapis=$(dpkg-query -W -f='${Package} ' libapache2-mod-php${program_suffix} php${program_suffix}-cgi php${program_suffix}-cli php${program_suffix}-fpm libphp${program_suffix}-embed php${program_suffix}-phpdbg 2>/dev/null | sed -e "s|libapache2-mod-php${program_suffix}|apache2handler|;s|php${program_suffix}-cgi|cgi|;s|php${program_suffix}-cli|cli|;s|php${program_suffix}-fpm|fpm|;s|libphp${program_suffix}-embed|embed|;s|php${program_suffix}-phpdbg|phpdbg|;")
+
 # Set php_cli_binary and php_cgi_binary if available
 for sapi in $php_sapis; do
   case $sapi in