-
Notifications
You must be signed in to change notification settings - Fork 394
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
PR for #2493 Release: https://source.netsurf-browser.org/libhubbub.git/tag/?h=release/0.3.8 Used by: * https://www.netsurf-browser.org/
1 parent
65ea63e
commit 3dbf2f6
Showing
14 changed files
with
501 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,5 @@ | ||
module( | ||
name = "gperf", | ||
version = "3.1", | ||
compatibility_level = 1, | ||
) |
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,30 @@ | ||
--- /dev/null | ||
+++ BUILD.bazel | ||
@@ -0,0 +1,27 @@ | ||
+""" Builds gperf. | ||
+""" | ||
+ | ||
+cc_library( | ||
+ name = "gperf_c_lib", | ||
+ srcs = glob([ | ||
+ "lib/*.c", | ||
+ "lib/*.h", | ||
+ ]), | ||
+ includes = ["lib"], | ||
+ visibility = ["//visibility:private"], | ||
+) | ||
+ | ||
+cc_binary( | ||
+ name = "gperf", | ||
+ srcs = glob([ | ||
+ "src/*.inc", | ||
+ "src/*.cc", | ||
+ "src/*.h", | ||
+ "lib/*.cc", | ||
+ "lib/*.h", | ||
+ ]) + ["config.h"], | ||
+ includes = ["lib", "src"], | ||
+ copts = ["-std=c++11","-w"], | ||
+ deps = ["gperf_c_lib"], | ||
+ visibility = ["//visibility:public"], | ||
+) |
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,190 @@ | ||
From 6c073922a7b04fe520d8350ab4da03d6c8207703 Mon Sep 17 00:00:00 2001 | ||
From: Dmitry Mikhin <dmikhin@webmonitorx.ru> | ||
Date: Fri, 26 Jul 2024 18:12:25 +0300 | ||
Subject: [PATCH] gperf | ||
|
||
--- | ||
config.h | 1 + | ||
src/bool-array.cc | 2 +- | ||
src/bool-array.h | 2 +- | ||
src/{bool-array.icc => bool-array.inc} | 0 | ||
src/keyword-list.cc | 2 +- | ||
src/keyword-list.h | 2 +- | ||
src/{keyword-list.icc => keyword-list.inc} | 0 | ||
src/keyword.cc | 2 +- | ||
src/keyword.h | 2 +- | ||
src/{keyword.icc => keyword.inc} | 0 | ||
src/options.cc | 2 +- | ||
src/options.h | 2 +- | ||
src/{options.icc => options.inc} | 0 | ||
src/positions.cc | 2 +- | ||
src/positions.h | 2 +- | ||
src/{positions.icc => positions.inc} | 0 | ||
16 files changed, 11 insertions(+), 10 deletions(-) | ||
create mode 100644 config.h | ||
rename src/{bool-array.icc => bool-array.inc} (100%) | ||
rename src/{keyword-list.icc => keyword-list.inc} (100%) | ||
rename src/{keyword.icc => keyword.inc} (100%) | ||
rename src/{options.icc => options.inc} (100%) | ||
rename src/{positions.icc => positions.inc} (100%) | ||
|
||
diff --git config.h config.h | ||
new file mode 100644 | ||
index 0000000..8b13789 | ||
--- /dev/null | ||
+++ config.h | ||
@@ -0,0 +1 @@ | ||
+ | ||
diff --git src/bool-array.cc src/bool-array.cc | ||
index d0e3364..e1c27a5 100644 | ||
--- src/bool-array.cc | ||
+++ src/bool-array.cc | ||
@@ -39,7 +39,7 @@ Bool_Array::~Bool_Array () | ||
#ifndef __OPTIMIZE__ | ||
|
||
#define INLINE /* not inline */ | ||
-#include "bool-array.icc" | ||
+#include "bool-array.inc" | ||
#undef INLINE | ||
|
||
#endif /* not defined __OPTIMIZE__ */ | ||
diff --git src/bool-array.h src/bool-array.h | ||
index 33472fe..0a9d824 100644 | ||
--- src/bool-array.h | ||
+++ src/bool-array.h | ||
@@ -69,7 +69,7 @@ private: | ||
#include <string.h> | ||
#include "options.h" | ||
#define INLINE inline | ||
-#include "bool-array.icc" | ||
+#include "bool-array.inc" | ||
#undef INLINE | ||
|
||
#endif | ||
diff --git src/bool-array.icc src/bool-array.inc | ||
similarity index 100% | ||
rename from src/bool-array.icc | ||
rename to src/bool-array.inc | ||
diff --git src/keyword-list.cc src/keyword-list.cc | ||
index 235edd5..abca269 100644 | ||
--- src/keyword-list.cc | ||
+++ src/keyword-list.cc | ||
@@ -167,7 +167,7 @@ mergesort_list (KeywordExt_List *list, | ||
#ifndef __OPTIMIZE__ | ||
|
||
#define INLINE /* not inline */ | ||
-#include "keyword-list.icc" | ||
+#include "keyword-list.inc" | ||
#undef INLINE | ||
|
||
#endif /* not defined __OPTIMIZE__ */ | ||
diff --git src/keyword-list.h src/keyword-list.h | ||
index ca2ada6..8a9bfde 100644 | ||
--- src/keyword-list.h | ||
+++ src/keyword-list.h | ||
@@ -75,7 +75,7 @@ extern KeywordExt_List * mergesort_list (KeywordExt_List *list, | ||
#ifdef __OPTIMIZE__ | ||
|
||
#define INLINE inline | ||
-#include "keyword-list.icc" | ||
+#include "keyword-list.inc" | ||
#undef INLINE | ||
|
||
#endif | ||
diff --git src/keyword-list.icc src/keyword-list.inc | ||
similarity index 100% | ||
rename from src/keyword-list.icc | ||
rename to src/keyword-list.inc | ||
diff --git src/keyword.cc src/keyword.cc | ||
index 82f1077..fd67dc1 100644 | ||
--- src/keyword.cc | ||
+++ src/keyword.cc | ||
@@ -153,7 +153,7 @@ char empty_string[1] = ""; | ||
#ifndef __OPTIMIZE__ | ||
|
||
#define INLINE /* not inline */ | ||
-#include "keyword.icc" | ||
+#include "keyword.inc" | ||
#undef INLINE | ||
|
||
#endif /* not defined __OPTIMIZE__ */ | ||
diff --git src/keyword.h src/keyword.h | ||
index e4421cf..02fda31 100644 | ||
--- src/keyword.h | ||
+++ src/keyword.h | ||
@@ -106,7 +106,7 @@ extern char empty_string[1]; | ||
#ifdef __OPTIMIZE__ | ||
|
||
#define INLINE inline | ||
-#include "keyword.icc" | ||
+#include "keyword.inc" | ||
#undef INLINE | ||
|
||
#endif | ||
diff --git src/keyword.icc src/keyword.inc | ||
similarity index 100% | ||
rename from src/keyword.icc | ||
rename to src/keyword.inc | ||
diff --git src/options.cc src/options.cc | ||
index ec5cd5f..85c9f02 100644 | ||
--- src/options.cc | ||
+++ src/options.cc | ||
@@ -1088,7 +1088,7 @@ There is NO WARRANTY, to the extent permitted by law.\n\ | ||
#ifndef __OPTIMIZE__ | ||
|
||
#define INLINE /* not inline */ | ||
-#include "options.icc" | ||
+#include "options.inc" | ||
#undef INLINE | ||
|
||
#endif /* not defined __OPTIMIZE__ */ | ||
diff --git src/options.h src/options.h | ||
index 2ac53b8..09df009 100644 | ||
--- src/options.h | ||
+++ src/options.h | ||
@@ -295,7 +295,7 @@ extern Options option; | ||
#ifdef __OPTIMIZE__ | ||
|
||
#define INLINE inline | ||
-#include "options.icc" | ||
+#include "options.inc" | ||
#undef INLINE | ||
|
||
#endif | ||
diff --git src/options.icc src/options.inc | ||
similarity index 100% | ||
rename from src/options.icc | ||
rename to src/options.inc | ||
diff --git src/positions.cc src/positions.cc | ||
index 1fb6883..064d269 100644 | ||
--- src/positions.cc | ||
+++ src/positions.cc | ||
@@ -169,7 +169,7 @@ Positions::print () const | ||
#ifndef __OPTIMIZE__ | ||
|
||
#define INLINE /* not inline */ | ||
-#include "positions.icc" | ||
+#include "positions.inc" | ||
#undef INLINE | ||
|
||
#endif /* not defined __OPTIMIZE__ */ | ||
diff --git src/positions.h src/positions.h | ||
index 05c3cf3..bfd25da 100644 | ||
--- src/positions.h | ||
+++ src/positions.h | ||
@@ -165,7 +165,7 @@ private: | ||
|
||
#include <string.h> | ||
#define INLINE inline | ||
-#include "positions.icc" | ||
+#include "positions.inc" | ||
#undef INLINE | ||
|
||
#endif | ||
diff --git src/positions.icc src/positions.inc | ||
similarity index 100% | ||
rename from src/positions.icc | ||
rename to src/positions.inc | ||
-- | ||
2.45.2 | ||
|
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,8 @@ | ||
--- MODULE.bazel | ||
+++ MODULE.bazel | ||
@@ -0,0 +1,5 @@ | ||
+module( | ||
+ name = "gperf", | ||
+ version = "3.1", | ||
+ compatibility_level = 1, | ||
+) |
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 @@ | ||
matrix: | ||
platform: | ||
- debian10 | ||
- ubuntu2004 | ||
- macos | ||
- macos_arm64 | ||
- windows | ||
bazel: | ||
- 7.x | ||
tasks: | ||
verify_targets: | ||
name: Verify build targets | ||
platform: ${{ platform }} | ||
bazel: ${{ bazel }} | ||
build_targets: | ||
- '@gperf//:gperf' |
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,11 @@ | ||
{ | ||
"url": "http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz", | ||
"integrity": "sha256-WIVGuUW7pLcLajphboC0q0ZuPzMCSjUvwhmBEs27OuI=", | ||
"strip_prefix": "gperf-3.1", | ||
"patches": { | ||
"gperf.patch": "sha256-OC0fk8s9GVp8ptxl6KvTiOuyvt3MdhiVUsshepFUcs0=", | ||
"add_build_file.patch": "sha256-qrp/8jek9e/vHriN0bd2zdAgNK3BGvz+aCMo8lYXOV0=", | ||
"module_dot_bazel.patch": "sha256-yR1aSyo1yzfL1MGwQq18JTAsWOx8O1e6JNbX9uG27sc=" | ||
}, | ||
"patch_strip": 0 | ||
} |
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,15 @@ | ||
{ | ||
"homepage": "https://www.gnu.org/software/gperf/", | ||
"maintainers": [ | ||
{ | ||
"email": "tectep@gmail.com", | ||
"github": "dmitry-j-mikhin", | ||
"name": "Dmitry Mikhin" | ||
} | ||
], | ||
"repository": [], | ||
"versions": [ | ||
"3.1" | ||
], | ||
"yanked_versions": {} | ||
} |
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,8 @@ | ||
module( | ||
name = "libhubbub", | ||
version = "0.3.8", | ||
compatibility_level = 1, | ||
) | ||
bazel_dep(name = "libparserutils", version = "0.2.5") | ||
bazel_dep(name = "rules_perl", version = "0.2.0") | ||
bazel_dep(name = "gperf", version = "3.1") |
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,62 @@ | ||
From eba0d3683723d6f1f8624ab53d06f5e4b340766e Mon Sep 17 00:00:00 2001 | ||
From: Dmitry Mikhin <dmikhin@webmonitorx.ru> | ||
Date: Tue, 23 Jul 2024 19:33:05 +0300 | ||
Subject: [PATCH] lubhubbub | ||
|
||
--- | ||
build/make-entities.pl | 10 +++++----- | ||
src/treebuilder/element-type.c | 2 +- | ||
2 files changed, 6 insertions(+), 6 deletions(-) | ||
|
||
diff --git build/make-entities.pl build/make-entities.pl | ||
index 7492052..4ec46bc 100644 | ||
--- build/make-entities.pl | ||
+++ build/make-entities.pl | ||
@@ -7,10 +7,10 @@ | ||
|
||
use strict; | ||
|
||
-use constant ENTITIES_FILE => 'build/Entities'; | ||
-use constant ENTITIES_INC => 'src/tokeniser/entities.inc'; | ||
+my $ENTITIES_FILE = $ARGV[0]; | ||
+my $ENTITIES_INC = $ARGV[1]; | ||
|
||
-open(INFILE, "<", ENTITIES_FILE) || die "Unable to open " . ENTITIES_FILE; | ||
+open(INFILE, "<", $ENTITIES_FILE) || die "Unable to open " . $ENTITIES_FILE; | ||
|
||
my %entities; | ||
|
||
@@ -124,7 +124,7 @@ $output .= "static int32_t dict_root = " . $trie->{heapindex} . ";\n"; | ||
|
||
# Write file out | ||
|
||
-if (open(EXISTING, "<", ENTITIES_INC)) { | ||
+if (open(EXISTING, "<", $ENTITIES_INC)) { | ||
local $/ = undef(); | ||
my $now = <EXISTING>; | ||
undef($output) if ($output eq $now); | ||
@@ -132,7 +132,7 @@ if (open(EXISTING, "<", ENTITIES_INC)) { | ||
} | ||
|
||
if (defined($output)) { | ||
- open(OUTF, ">", ENTITIES_INC); | ||
+ open(OUTF, ">", $ENTITIES_INC); | ||
print OUTF $output; | ||
close(OUTF); | ||
} | ||
diff --git src/treebuilder/element-type.c src/treebuilder/element-type.c | ||
index 7e2772c..ef51e7f 100644 | ||
--- src/treebuilder/element-type.c | ||
+++ src/treebuilder/element-type.c | ||
@@ -8,7 +8,7 @@ | ||
#include "treebuilder/element-type.h" | ||
|
||
/* Auto-generated by `gperf`. */ | ||
-#include "treebuilder/autogenerated-element-type.c" | ||
+#include "treebuilder/autogenerated-element-type.inc" | ||
|
||
/* Exported function, documented in element-type.h */ | ||
element_type element_type_from_name( | ||
-- | ||
2.45.2 | ||
|
Oops, something went wrong.