Skip to content

Commit 1de4e4b

Browse files
committed
Simplify .pc.in templates
- variables renamed and synced further to match php-config a bit - Redundant comments removed and refactored - Typos fixed - Extension directory template placeholder replaced with @EXTENSION_DIR@ so it's possible to insert variables directly `$prefix/php/...`
1 parent 782626e commit 1de4e4b

File tree

2 files changed

+12
-30
lines changed

2 files changed

+12
-30
lines changed

sapi/embed/php-embed.pc.in

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
1-
# The .pc file for the pkg-config command-line utility.
2-
# https://en.wikipedia.org/wiki/Pkg-config
3-
#
4-
# Usage:
5-
# pkg-config --cflags php-embed
6-
# pkg-config --cflags-only-I php-embed
7-
# pkg-config --libs php-embed
8-
# pkg-config --mod-version php-embed
9-
# pkg-config --print-variables php-embed
10-
# pkg-config --variable=php_vernum php-embed
1+
# The pkg-config .pc file for PHP Embed SAPI.
112

123
prefix=@prefix@
134
exec_prefix=@exec_prefix@
145
includedir=@includedir@/php
156
libdir=@orig_libdir@
16-
# The extension_dir PHP INI directive absolute path.
17-
extensiondir=@EXPANDED_EXTENSION_DIR@
7+
# PHP extension directory containing dynamically loadable PHP extensions.
8+
php_extension_dir=@EXTENSION_DIR@
189
# PHP version as integer.
19-
php_vernum=@PHP_VERSION_ID@
10+
php_version_id=@PHP_VERSION_ID@
2011
# The path where to scan for additional INI configuration files.
21-
php_inidir=@EXPANDED_PHP_CONFIG_FILE_SCAN_DIR@
12+
php_ini_dir=@EXPANDED_PHP_CONFIG_FILE_SCAN_DIR@
2213
# The path in which to look for php.ini.
23-
php_inipath=@EXPANDED_PHP_CONFIG_FILE_PATH@
14+
php_ini_path=@EXPANDED_PHP_CONFIG_FILE_PATH@
2415
# Whether PHP is built in debug mode (yes) or not (no).
2516
php_debug=@ZEND_DEBUG@
2617
# Whether PHP is built with thread safety (yes) or not (no).

scripts/php.pc.in

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,17 @@
1-
# The .pc file for the pkg-config command-line utility.
2-
# https://en.wikipedia.org/wiki/Pkg-config
3-
#
4-
# Usage:
5-
# pkg-config --cflags php
6-
# pkg-config --cflags-only-I php
7-
# pkg-config --libs php
8-
# pkg-config --mod-version php
9-
# pkg-config --print-variables php
10-
# pkg-config --variable=php_vernum php
1+
# The pkg-config .pc file for PHP.
112

123
prefix=@prefix@
134
exec_prefix=@exec_prefix@
145
includedir=@includedir@/php
156
libdir=@orig_libdir@
16-
# The extension_dir PHP INI directive absolute path.
17-
extensiondir=@EXPANDED_EXTENSION_DIR@
7+
# PHP extension directory containing dynamically loadable PHP extensions.
8+
php_extension_dir=@EXTENSION_DIR@
189
# PHP version as integer.
1910
php_vernum=@PHP_VERSION_ID@
2011
# The path where to scan for additional INI configuration files.
21-
php_inidir=@EXPANDED_PHP_CONFIG_FILE_SCAN_DIR@
12+
php_ini_dir=@EXPANDED_PHP_CONFIG_FILE_SCAN_DIR@
2213
# The path in which to look for php.ini.
23-
php_inipath=@EXPANDED_PHP_CONFIG_FILE_PATH@
14+
php_ini_path=@EXPANDED_PHP_CONFIG_FILE_PATH@
2415
# Whether PHP is built in debug mode (yes) or not (no).
2516
php_debug=@ZEND_DEBUG@
2617
# Whether PHP is built with thread safety (yes) or not (no).
@@ -31,6 +22,6 @@ Description: Build extension for a PHP general-purpose scripting language
3122
URL: https://www.php.net
3223
License: PHP
3324
Version: @PHP_VERSION@
34-
CFlags: -I${includedir} -I${includedir}/main -I${includedir}/TSRM -I${includedir}/Zend -I${includedir}/ext -I${includedir}/ext/date/lib
25+
Cflags: -I${includedir} -I${includedir}/main -I${includedir}/TSRM -I${includedir}/Zend -I${includedir}/ext -I${includedir}/ext/date/lib
3526
Libs.private: @EXTRA_LIBS@ @ZEND_EXTRA_LIBS@
3627
Libs:

0 commit comments

Comments
 (0)