Skip to content

Commit 91a5976

Browse files
kocsismatendossche
authored andcommitted
Trying to fix Windows builds
1 parent 27ebc65 commit 91a5976

File tree

4 files changed

+11
-9
lines changed

4 files changed

+11
-9
lines changed

ext/dom/config.w32

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ ARG_WITH("dom", "DOM support", "yes");
55
if (PHP_DOM == "yes") {
66
if (PHP_LIBXML == "yes" &&
77
ADD_EXTENSION_DEP('dom', 'libxml') &&
8-
ADD_EXTENSION_DEP('dom', 'lexbor') &&
98
CHECK_HEADER_ADD_INCLUDE("libxml/parser.h", "CFLAGS_DOM", PHP_PHP_BUILD + "\\include\\libxml2")
109
) {
1110
EXTENSION("dom", "php_dom.c attr.c document.c infra.c \
@@ -17,7 +16,9 @@ if (PHP_DOM == "yes") {
1716
entityreference.c \
1817
token_list.c \
1918
notation.c xpath.c dom_iterators.c \
20-
namednodemap.c xpath_callbacks.c", null, "");
19+
namednodemap.c xpath_callbacks.c", null, "/I ext/lexbor");
20+
21+
ADD_EXTENSION_DEP('dom', 'lexbor');
2122

2223
ADD_SOURCES("ext/dom/parentnode", "tree.c css_selectors.c", "dom");
2324
ADD_SOURCES("ext/dom/lexbor/selectors-adapted", "selectors.c", "dom");
@@ -35,7 +36,8 @@ if (PHP_DOM == "yes") {
3536
"dom_ce.h " +
3637
"namespace_compat.h " +
3738
"xml_common.h " +
38-
"xpath_callbacks.h "
39+
"xpath_callbacks.h " +
40+
"lexbor/selectors-adapted/selectors.h "
3941
);
4042
} else {
4143
WARNING("dom support can't be enabled, libxml is not enabled")

ext/dom/lexbor/selectors-adapted/selectors.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include <Zend/zend_API.h>
1414
#include <php.h>
1515

16-
#include "lexbor/selectors-adapted/selectors.h"
16+
#include "ext/dom/lexbor/selectors-adapted/selectors.h"
1717
#include "../../namespace_compat.h"
1818
#include "../../domexception.h"
1919
#include "../../php_dom.h"

ext/dom/parentnode/css_selectors.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#if defined(HAVE_LIBXML) && defined(HAVE_DOM)
2323
#include "../php_dom.h"
2424

25-
#include "lexbor/css/parser.h"
26-
#include "lexbor/selectors-adapted/selectors.h"
25+
#include "ext/lexbor/lexbor/css/parser.h"
26+
#include "../lexbor/selectors-adapted/selectors.h"
2727

2828
// TODO: optimization idea: cache the parsed selectors in an LRU fashion?
2929

ext/lexbor/config.w32

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
ARG_ENABLE("lexbor", "Lexbor support", "yes");
44

55
if (PHP_LEXBOR == "yes") {
6-
EXTENSION("lexbor", "php_lexbor.c", null, "-Iext/lexbor /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
6+
EXTENSION("lexbor", "php_lexbor.c", null, "/I " + configure_module_dirname + " /DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
77

88
ADD_SOURCES("ext/lexbor", "php_lexbor.c", "lexbor");
99
ADD_SOURCES("ext/lexbor/lexbor/ports/windows_nt/lexbor/core", "memory.c", "lexbor");
@@ -22,9 +22,9 @@ if (PHP_LEXBOR == "yes") {
2222
ADD_SOURCES("ext/lexbor/lexbor/css/syntax/tokenizer", "error.c","lexbor");
2323
ADD_SOURCES("ext/lexbor/lexbor/ns", "ns.c","lexbor");
2424
ADD_SOURCES("ext/lexbor/lexbor/tag", "tag.c","lexbor");
25-
ADD_FLAG("CFLAGS_LEXBOR", "/D LEXBOR_STATIC");
25+
ADD_FLAG("CFLAGS_LEXBOR", "/D LEXBOR_STATIC /utf-8");
2626

2727
AC_DEFINE("HAVE_LEXBOR", 1, "Define to 1 if the PHP extension 'lexbor' is available.");
2828

29-
PHP_INSTALL_HEADERS("ext/lexbor", "php_lexbor.h");
29+
PHP_INSTALL_HEADERS("ext/lexbor", "php_lexbor.h lexbor/");
3030
}

0 commit comments

Comments
 (0)