-
-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
52807da
commit 1b1959e
Showing
6 changed files
with
160 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
diff --git a/0.3.8/src/treebuilder/in_row.c b/0.3.8/src/treebuilder/in_row.c | ||
index 3bf9161..43b9dac 100644 | ||
--- a/0.3.8/src/treebuilder/in_row.c | ||
+++ b/0.3.8/src/treebuilder/in_row.c | ||
@@ -57,10 +57,12 @@ static hubbub_error act_as_if_end_tag_tr(hubbub_treebuilder *treebuilder) | ||
|
||
table_clear_stack(treebuilder); | ||
|
||
- element_stack_pop(treebuilder, &ns, &otype, &node); | ||
+ if (current_node(treebuilder) != HTML) { | ||
+ element_stack_pop(treebuilder, &ns, &otype, &node); | ||
|
||
- treebuilder->tree_handler->unref_node(treebuilder->tree_handler->ctx, | ||
- node); | ||
+ treebuilder->tree_handler->unref_node( | ||
+ treebuilder->tree_handler->ctx, node); | ||
+ } | ||
|
||
treebuilder->context.mode = IN_TABLE_BODY; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
add_rules("mode.debug", "mode.release") | ||
|
||
add_requires("libparserutils") | ||
add_packages("libparserutils") | ||
|
||
if is_plat("windows") then | ||
add_requires("strings_h") | ||
add_packages("strings_h") | ||
end | ||
|
||
if is_subhost("windows") then | ||
add_requires("strawberry-perl", "gperf") | ||
add_packages("strawberry-perl", "gperf") | ||
end | ||
|
||
target("hubbub") | ||
set_kind("$(kind)") | ||
add_files("src/**.c") | ||
add_includedirs("include", "src") | ||
add_headerfiles("include/(hubbub/*.h)") | ||
|
||
if is_plat("windows") and is_kind("shared") then | ||
add_rules("utils.symbols.export_all") | ||
end | ||
|
||
before_build(function (target) | ||
local perl, gperf | ||
if is_subhost("windows") then | ||
perl = path.join(target:pkg("strawberry-perl"):installdir(), "perl/bin/perl.exe") | ||
gperf = path.join(target:pkg("gperf"):installdir(), "bin/gperf.exe") | ||
else | ||
perl = "perl" | ||
gperf = "gperf" | ||
end | ||
os.vrunv(perl, {"build/make-entities.pl"}) | ||
os.vrunv(gperf, {"src/treebuilder/element-type.gperf", "--output-file=src/treebuilder/autogenerated-element-type.c"}) | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
package("libhubbub") | ||
set_homepage("https://www.netsurf-browser.org/projects/libhubbub") | ||
set_description("Hubbub is an HTML5 compliant parsing library") | ||
set_license("MIT") | ||
|
||
set_urls("https://source.netsurf-browser.org/libhubbub.git/snapshot/libhubbub-release/$(version).tar.bz2", | ||
"https://git.netsurf-browser.org/libhubbub.git") | ||
|
||
add_versions("0.3.8", "570f2aef99071e0c24d16444b74884d611f46b264bbfb6e314039c9786e87160") | ||
|
||
add_patches("0.3.8", "patches/0.3.8/treebuilder.patch", "c966decf79bcd0bbca4fe6c4ccdba776b9b9b3551a5956a894f14a55ec21eb72") | ||
|
||
add_deps("libparserutils") | ||
if is_plat("windows") then | ||
add_deps("strings_h", {private = true}) | ||
end | ||
|
||
on_load(function (package) | ||
if is_subhost("windows") and not package:is_precompiled() then | ||
package:add("deps", "strawberry-perl", "gperf") | ||
end | ||
end) | ||
|
||
on_install(function (package) | ||
os.cd(package:version_str()) | ||
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") | ||
import("package.tools.xmake").install(package) | ||
end) | ||
|
||
on_test(function (package) | ||
assert(package:has_cfuncs("hubbub_error_to_string", {includes = "hubbub/hubbub.h"})) | ||
end) |
16 changes: 16 additions & 0 deletions
16
packages/l/libparserutils/patches/0.2.5/uninitialised-variable.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/0.2.5/src/charset/codecs/codec_utf8.c b/0.2.5/src/charset/codecs/codec_utf8.c | ||
index 6117fe6..39bdb28 100644 | ||
--- a/0.2.5/src/charset/codecs/codec_utf8.c | ||
+++ b/0.2.5/src/charset/codecs/codec_utf8.c | ||
@@ -409,8 +409,8 @@ parserutils_error charset_utf8_codec_read_char(charset_utf8_codec *c, | ||
const uint8_t **source, size_t *sourcelen, | ||
uint8_t **dest, size_t *destlen) | ||
{ | ||
- uint32_t ucs4; | ||
- size_t sucs4; | ||
+ uint32_t ucs4 = 0; | ||
+ size_t sucs4 = 0; | ||
parserutils_error error; | ||
|
||
/* Convert a single character */ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
add_rules("mode.debug", "mode.release") | ||
|
||
if is_subhost("windows") then | ||
add_requires("strawberry-perl") | ||
add_packages("strawberry-perl") | ||
end | ||
|
||
add_defines("WITHOUT_ICONV_FILTER") | ||
|
||
target("parserutils") | ||
set_kind("$(kind)") | ||
add_files("src/**.c") | ||
add_includedirs("include", "src") | ||
add_headerfiles("include/(parserutils/**.h)") | ||
|
||
if is_plat("windows") and is_kind("shared") then | ||
add_rules("utils.symbols.export_all") | ||
end | ||
|
||
before_build(function (target) | ||
local perl | ||
if is_subhost("windows") then | ||
perl = path.join(target:pkg("strawberry-perl"):installdir(), "perl/bin/perl.exe") | ||
else | ||
perl = "perl" | ||
end | ||
os.vrunv(perl, {"build/make-aliases.pl"}) | ||
end) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package("libparserutils") | ||
set_homepage("https://www.netsurf-browser.org/projects/libparserutils") | ||
set_description("LibParserUtils is a library for building efficient parsers") | ||
set_license("MIT") | ||
|
||
set_urls("https://source.netsurf-browser.org/libparserutils.git/snapshot/libparserutils-release/$(version).tar.bz2", | ||
"https://git.netsurf-browser.org/libparserutils.git") | ||
|
||
add_versions("0.2.5", "816f0cb3281c6f6a6cc974ba00c3975fe91ab1425125aa9af64903065d2a36ec") | ||
|
||
add_patches("0.2.5", "patches/0.2.5/uninitialised-variable.patch", "1f9f6b7e0444f1bcb4e13684cc5e3660d33ab30db5e7d995e7644bc8b3fda3ff") | ||
|
||
on_load(function (package) | ||
if is_subhost("windows") and not package:is_precompiled() then | ||
package:add("deps", "strawberry-perl") | ||
end | ||
end) | ||
|
||
on_install(function (package) | ||
os.cd(package:version_str()) | ||
os.cp(path.join(package:scriptdir(), "port", "xmake.lua"), "xmake.lua") | ||
import("package.tools.xmake").install(package) | ||
end) | ||
|
||
on_test(function (package) | ||
assert(package:has_cfuncs("parserutils_error_to_string", {includes = "parserutils/parserutils.h"})) | ||
end) |