diff --git a/NEWS b/NEWS index 61912827f3dc0..561f395880090 100644 --- a/NEWS +++ b/NEWS @@ -6,6 +6,8 @@ PHP NEWS . Sync all boost.context files with release 1.86.0. (mvorisek) . Fixed bug GH-20435 (SensitiveParameter doesn't work for named argument passing to variadic parameter). (ndossche) + . Fixed bug GH-20506 (Build/installation interface for using ext/lexbor + and ext/uri headers). (Peter Kokot) - DOM: . Fix memory leak when edge case is hit when registering xpath callback. diff --git a/ext/dom/config.w32 b/ext/dom/config.w32 index 2d8f3f3519c4a..3fd62e89f81e3 100644 --- a/ext/dom/config.w32 +++ b/ext/dom/config.w32 @@ -16,7 +16,7 @@ if (PHP_DOM == "yes") { entityreference.c \ token_list.c \ notation.c obj_map.c xpath.c dom_iterators.c \ - namednodemap.c xpath_callbacks.c", null, "/I ext/lexbor"); + namednodemap.c xpath_callbacks.c", null); ADD_EXTENSION_DEP('dom', 'lexbor'); diff --git a/ext/lexbor/config.m4 b/ext/lexbor/config.m4 index 3e67c10fdfc32..36f73edfd6d60 100644 --- a/ext/lexbor/config.m4 +++ b/ext/lexbor/config.m4 @@ -1,4 +1,3 @@ -PHP_LEXBOR_CFLAGS="-I@ext_srcdir@/" LEXBOR_DIR="lexbor" AC_DEFINE([HAVE_LEXBOR], [1], [Define to 1 if the PHP extension 'lexbor' is available.]) @@ -182,14 +181,13 @@ PHP_NEW_EXTENSION([lexbor], m4_normalize([ $LEXBOR_DIR/url/url.c ]), [no],, - [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1 $PHP_LEXBOR_CFLAGS]) + [-DZEND_ENABLE_STATIC_TSRMLS_CACHE=1]) PHP_ADD_BUILD_DIR([ $ext_builddir/ $ext_builddir/$LEXBOR_DIR/core $ext_builddir/$LEXBOR_DIR/css/selectors $ext_builddir/$LEXBOR_DIR/css/syntax/tokenizer - $ext_builddir/$LEXBOR_DIR/css/tokenizer $ext_builddir/$LEXBOR_DIR/dom/interfaces $ext_builddir/$LEXBOR_DIR/encoding $ext_builddir/$LEXBOR_DIR/html @@ -205,6 +203,36 @@ PHP_ADD_BUILD_DIR([ ]) PHP_ADD_INCLUDE([$ext_srcdir]) PHP_INSTALL_HEADERS([ext/lexbor], m4_normalize([ + lexbor/core/ + lexbor/css/ + lexbor/css/at_rule/ + lexbor/css/property/ + lexbor/css/selectors/ + lexbor/css/syntax/ + lexbor/css/syntax/tokenizer/ + lexbor/css/unit/ + lexbor/css/value/ + lexbor/dom/ + lexbor/dom/interfaces/ + lexbor/encoding/ + lexbor/html/ + lexbor/html/interfaces/ + lexbor/html/tokenizer/ + lexbor/html/tree/ + lexbor/html/tree/insertion_mode/ + lexbor/ns/ + lexbor/ports/ + lexbor/ports/posix/ + lexbor/ports/posix/lexbor/ + lexbor/ports/posix/lexbor/core/ + lexbor/ports/windows_nt/ + lexbor/ports/windows_nt/lexbor/ + lexbor/ports/windows_nt/lexbor/core/ + lexbor/punycode/ + lexbor/selectors/ + lexbor/tag/ + lexbor/unicode/ + lexbor/url/ php_lexbor.h ])) diff --git a/ext/lexbor/config.w32 b/ext/lexbor/config.w32 index bd1f3b383a7e2..35d41edd14173 100644 --- a/ext/lexbor/config.w32 +++ b/ext/lexbor/config.w32 @@ -26,4 +26,36 @@ ADD_FLAG("CFLAGS_LEXBOR", "/D LEXBOR_BUILDING /utf-8"); AC_DEFINE("HAVE_LEXBOR", 1, "Define to 1 if the PHP extension 'lexbor' is available."); AC_DEFINE("LEXBOR_VERSION", "2.5.0", "Define the main Lexbor version") -PHP_INSTALL_HEADERS("ext/lexbor", "php_lexbor.h lexbor/"); +PHP_INSTALL_HEADERS("ext/lexbor", + "lexbor/core/ " + + "lexbor/css/ " + + "lexbor/css/at_rule/ " + + "lexbor/css/property/ " + + "lexbor/css/selectors/ " + + "lexbor/css/syntax/ " + + "lexbor/css/syntax/tokenizer/ " + + "lexbor/css/unit/ " + + "lexbor/css/value/ " + + "lexbor/dom/ " + + "lexbor/dom/interfaces/ " + + "lexbor/encoding/ " + + "lexbor/html/ " + + "lexbor/html/interfaces/ " + + "lexbor/html/tokenizer/ " + + "lexbor/html/tree/ " + + "lexbor/html/tree/insertion_mode/ " + + "lexbor/ns/ " + + "lexbor/ports/ " + + "lexbor/ports/posix/ " + + "lexbor/ports/posix/lexbor/ " + + "lexbor/ports/posix/lexbor/core/ " + + "lexbor/ports/windows_nt/ " + + "lexbor/ports/windows_nt/lexbor/ " + + "lexbor/ports/windows_nt/lexbor/core/ " + + "lexbor/punycode/ " + + "lexbor/selectors/ " + + "lexbor/tag/ " + + "lexbor/unicode/ " + + "lexbor/url/ " + + "php_lexbor.h" +); diff --git a/ext/uri/config.m4 b/ext/uri/config.m4 index 99e0d6b476779..3178d95e73af2 100644 --- a/ext/uri/config.m4 +++ b/ext/uri/config.m4 @@ -16,7 +16,6 @@ PHP_INSTALL_HEADERS([ext/uri], m4_normalize([ uri_parser_php_parse_url.h ])) - AC_DEFINE([URI_ENABLE_ANSI], [1], [Define to 1 for enabling ANSI support of uriparser.]) AC_DEFINE([URI_NO_UNICODE], [1], [Define to 1 for disabling unicode support of uriparser.]) @@ -31,7 +30,7 @@ if test "$PHP_EXTERNAL_URIPARSER" = "no"; then $URIPARSER_DIR/src/UriSetHostIp6.c $URIPARSER_DIR/src/UriSetHostIpFuture.c $URIPARSER_DIR/src/UriSetHostRegName.c \ $URIPARSER_DIR/src/UriSetPath.c $URIPARSER_DIR/src/UriSetPort.c $URIPARSER_DIR/src/UriSetQuery.c \ $URIPARSER_DIR/src/UriSetScheme.c $URIPARSER_DIR/src/UriSetUserInfo.c $URIPARSER_DIR/src/UriShorten.c $URIPARSER_DIR/src/UriVersion.c" - URI_CFLAGS="-DURI_STATIC_BUILD" + URI_CFLAGS="-DURI_STATIC_BUILD -I@ext_srcdir@/$URIPARSER_DIR/include" else PKG_CHECK_MODULES([LIBURIPARSER], [liburiparser >= 0.9.10]) PHP_EVAL_LIBLINE([$LIBURIPARSER_LIBS], [URI_SHARED_LIBADD]) @@ -43,5 +42,4 @@ PHP_ADD_EXTENSION_DEP(uri, lexbor) if test "$PHP_EXTERNAL_URIPARSER" = "no"; then PHP_ADD_BUILD_DIR($ext_builddir/$URIPARSER_DIR/src $ext_builddir/$URIPARSER_DIR/include) - PHP_ADD_INCLUDE([$ext_srcdir/$URIPARSER_DIR/include]) fi diff --git a/ext/uri/config.w32 b/ext/uri/config.w32 index 97c10caf098f6..e7da463d50799 100644 --- a/ext/uri/config.w32 +++ b/ext/uri/config.w32 @@ -1,4 +1,4 @@ -EXTENSION("uri", "php_uri.c php_uri_common.c uri_parser_rfc3986.c uri_parser_whatwg.c uri_parser_php_parse_url.c", false /* never shared */, "/I ext/lexbor /I ext/uri/uriparser/include /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); +EXTENSION("uri", "php_uri.c php_uri_common.c uri_parser_rfc3986.c uri_parser_whatwg.c uri_parser_php_parse_url.c", false /* never shared */, "/I ext/uri/uriparser/include /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"); AC_DEFINE("URI_ENABLE_ANSI", 1, "Define to 1 for enabling ANSI support of uriparser.") AC_DEFINE("URI_NO_UNICODE", 1, "Define to 1 for disabling unicode support of uriparser.") @@ -9,4 +9,4 @@ ADD_SOURCES("ext/uri/uriparser/src", "UriCommon.c UriCompare.c UriCopy.c UriEsca UriMemory.c UriNormalize.c UriNormalizeBase.c UriParse.c UriParseBase.c UriQuery.c UriRecompose.c UriResolve.c \ UriSetFragment.c UriSetHostAuto.c UriSetHostCommon.c UriSetHostIp4.c UriSetHostIp6.c UriSetHostIpFuture.c UriSetHostRegName.c \ UriSetPath.c UriSetPort.c UriSetQuery.c UriSetScheme.c UriSetUserInfo.c UriShorten.c UriVersion.c", "uri"); -PHP_INSTALL_HEADERS("ext/uri", "php_uri.h php_uri_common.h uri_parser_rfc3986.h uri_parser_whatwg.h uri_parser_php_parse_url.h uriparser/src uriparser/include"); +PHP_INSTALL_HEADERS("ext/uri", "php_uri.h php_uri_common.h uri_parser_rfc3986.h uri_parser_whatwg.h uri_parser_php_parse_url.h"); diff --git a/ext/uri/php_uri.c b/ext/uri/php_uri.c index 4a1207de89942..b407aff39a7bd 100644 --- a/ext/uri/php_uri.c +++ b/ext/uri/php_uri.c @@ -30,7 +30,7 @@ #include "uri_parser_rfc3986.h" #include "uri_parser_php_parse_url.h" #include "php_uri_arginfo.h" -#include "uriparser/UriBase.h" +#include zend_class_entry *php_uri_ce_rfc3986_uri; zend_class_entry *php_uri_ce_whatwg_url; diff --git a/scripts/php-config.in b/scripts/php-config.in index 87c20089bb7f5..88ef497f1dde7 100644 --- a/scripts/php-config.in +++ b/scripts/php-config.in @@ -8,7 +8,7 @@ version="@PHP_VERSION@" vernum="@PHP_VERSION_ID@" include_dir="@includedir@/php" lib_dir="@orig_libdir@" -includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM -I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib" +includes="-I$include_dir -I$include_dir/main -I$include_dir/TSRM -I$include_dir/Zend -I$include_dir/ext -I$include_dir/ext/date/lib -I$include_dir/ext/lexbor" ldflags="@PHP_LDFLAGS@" libs="@EXTRA_LIBS@" extension_dir="@EXTENSION_DIR@" diff --git a/win32/build/config.w32 b/win32/build/config.w32 index 403f0aa6efbfe..4862fecb8a136 100644 --- a/win32/build/config.w32 +++ b/win32/build/config.w32 @@ -60,7 +60,7 @@ if (PHP_PREFIX == '') { } DEFINE('PHP_PREFIX', PHP_PREFIX); -DEFINE("BASE_INCLUDES", "/I . /I main /I Zend /I TSRM /I ext "); +DEFINE("BASE_INCLUDES", "/I . /I main /I Zend /I TSRM /I ext /I ext/lexbor"); toolset_setup_common_cflags(); diff --git a/win32/build/config.w32.phpize.in b/win32/build/config.w32.phpize.in index d15696bea54e3..fd1f74ec331b7 100644 --- a/win32/build/config.w32.phpize.in +++ b/win32/build/config.w32.phpize.in @@ -40,7 +40,7 @@ if (PHP_PREFIX == '') { } DEFINE('PHP_PREFIX', PHP_PREFIX); -DEFINE("BASE_INCLUDES", "/I " + PHP_DIR + "/include /I " + PHP_DIR + "/include/main /I " + PHP_DIR + "/include/Zend /I " + PHP_DIR + "/include/TSRM /I " + PHP_DIR + "/include/ext "); +DEFINE("BASE_INCLUDES", "/I " + PHP_DIR + "/include /I " + PHP_DIR + "/include/main /I " + PHP_DIR + "/include/Zend /I " + PHP_DIR + "/include/TSRM /I " + PHP_DIR + "/include/ext " + "/include/ext/lexbor "); toolset_setup_common_cflags();