Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion ext/dom/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -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');

Expand Down
34 changes: 31 additions & 3 deletions ext/lexbor/config.m4
Original file line number Diff line number Diff line change
@@ -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.])
Expand Down Expand Up @@ -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
Expand All @@ -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
]))

Expand Down
34 changes: 33 additions & 1 deletion ext/lexbor/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -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"
);
4 changes: 1 addition & 3 deletions ext/uri/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -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.])

Expand All @@ -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])
Expand All @@ -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
4 changes: 2 additions & 2 deletions ext/uri/config.w32
Original file line number Diff line number Diff line change
@@ -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.")
Expand All @@ -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");
2 changes: 1 addition & 1 deletion ext/uri/php_uri.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 <uriparser/UriBase.h>

zend_class_entry *php_uri_ce_rfc3986_uri;
zend_class_entry *php_uri_ce_whatwg_url;
Expand Down
2 changes: 1 addition & 1 deletion scripts/php-config.in
Original file line number Diff line number Diff line change
Expand Up @@ -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@"
Expand Down
2 changes: 1 addition & 1 deletion win32/build/config.w32
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 1 addition & 1 deletion win32/build/config.w32.phpize.in
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down