forked from gentoo/gentoo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dev-cpp/htmlcxx: New package, required by lgogdownloader
Package-Manager: portage-2.3.0
- Loading branch information
Showing
5 changed files
with
171 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 @@ | ||
DIST htmlcxx-0.86.tar.gz 469416 SHA256 07542b5ea2442143b125ba213b6823ff4a23fff352ecdd84bbebe1d154f4f5c1 SHA512 dcff9c9946e1c3429af2230997c965b89a28a8ee219d8d594800106ff578bb21154e4680c38a09fb5f96cd4051c89cbf16f2151d30be93d4e3d291ff421aafcb WHIRLPOOL 8c0fc17cd52db957cd91cb79e1a8d0d2b477a75501e58135244434e8ee472482f4577dc9cc377b45e1ff7febb83fc31e79b454c0875e2f5919bdc9906113003e |
56 changes: 56 additions & 0 deletions
56
dev-cpp/htmlcxx/files/0001-strstream-is-deprecated-use-sstream-instead.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,56 @@ | ||
From 04fbe8cb7d933699f2a8ac06d89b205d933070c1 Mon Sep 17 00:00:00 2001 | ||
From: James Le Cuirot <[email protected]> | ||
Date: Wed, 14 Sep 2016 22:56:14 +0100 | ||
Subject: [PATCH 1/3] strstream is deprecated, use sstream instead | ||
|
||
--- | ||
html/Uri.cc | 2 +- | ||
html/utils.cc | 5 ++--- | ||
2 files changed, 3 insertions(+), 4 deletions(-) | ||
|
||
diff --git a/html/Uri.cc b/html/Uri.cc | ||
index 4ddb3dd..034d29a 100644 | ||
--- a/html/Uri.cc | ||
+++ b/html/Uri.cc | ||
@@ -1,7 +1,7 @@ | ||
#include "Uri.h" | ||
|
||
#include "wincstring.h" | ||
-#include <strstream> | ||
+#include <sstream> | ||
#include <cstdlib> | ||
#include <cassert> | ||
#include "tld.h" | ||
diff --git a/html/utils.cc b/html/utils.cc | ||
index 37ee889..e56cbaf 100644 | ||
--- a/html/utils.cc | ||
+++ b/html/utils.cc | ||
@@ -1,7 +1,7 @@ | ||
#include <algorithm> | ||
#include <cctype> | ||
#include <cstring> | ||
-#include <strstream> | ||
+#include <sstream> | ||
#include "Uri.h" | ||
|
||
#include "utils.h" | ||
@@ -509,7 +509,7 @@ namespace htmlcxx { | ||
string __serialize_gml(const tree<HTML::Node> &tr, tree<HTML::Node>::iterator it, tree<HTML::Node>::iterator end, unsigned int parent_id, unsigned int& label) { | ||
|
||
using namespace std; | ||
- ostrstream ret; | ||
+ ostringstream ret; | ||
tree<HTML::Node>::sibling_iterator sib = tr.begin(it); | ||
while(sib != tr.end(it)) { | ||
ret << "node [ id " << ++label << "\n label \"" << label << "\"\n]\n"; | ||
@@ -519,7 +519,6 @@ namespace htmlcxx { | ||
} | ||
ret << ends; | ||
string str = ret.str(); | ||
- ret.freeze(0); | ||
return str; | ||
} | ||
|
||
-- | ||
2.8.2 | ||
|
67 changes: 67 additions & 0 deletions
67
dev-cpp/htmlcxx/files/0002-Update-css_syntax.y-for-use-with-less-ancient-Bison.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,67 @@ | ||
From 807081583ea58b07a5ff2e0659f4173492befb8a Mon Sep 17 00:00:00 2001 | ||
From: James Le Cuirot <[email protected]> | ||
Date: Wed, 14 Sep 2016 22:56:35 +0100 | ||
Subject: [PATCH 2/3] Update css_syntax.y for use with less ancient Bison | ||
|
||
New pregenerated css_syntax.c to follow. | ||
--- | ||
css/css_syntax.y | 24 +++++++++++++++--------- | ||
1 file changed, 15 insertions(+), 9 deletions(-) | ||
|
||
diff --git a/css/css_syntax.y b/css/css_syntax.y | ||
index e75720d..0d9b177 100644 | ||
--- a/css/css_syntax.y | ||
+++ b/css/css_syntax.y | ||
@@ -4,13 +4,13 @@ | ||
#include "css_lex.h" | ||
#include "parser.h" | ||
|
||
-#define YYPARSE_PARAM yyparam | ||
#define YYERROR_VERBOSE 1 | ||
//#define YYDEBUG 1 | ||
|
||
%} | ||
|
||
-%pure_parser | ||
+%parse-param {void *yyparam} | ||
+%pure-parser | ||
|
||
%union { | ||
char *lexeme; | ||
@@ -22,6 +22,19 @@ | ||
int pseudo_element; | ||
} | ||
|
||
+%{ | ||
+ | ||
+int yylex(YYSTYPE *lvalp); | ||
+ | ||
+int yyerror(void *yyparam, const char *s) { | ||
+#if YYDEBUG | ||
+ fprintf(stderr, "Error: %s\n", s); | ||
+#endif | ||
+ return 0; | ||
+} | ||
+ | ||
+%} | ||
+ | ||
%token IMPORT_SYM | ||
%token IMPORTANT_SYM | ||
%token IDENT | ||
@@ -571,13 +584,6 @@ hexcolor | ||
|
||
%% | ||
|
||
-int yyerror(char *s) { | ||
-#if YYDEBUG | ||
- fprintf(stderr, "Error: %s\n", s); | ||
-#endif | ||
- return 0; | ||
-} | ||
- | ||
struct selector_list_t* css_parse(const char *buffer, int buf_len) { | ||
struct selector_list_t *ret = NULL; | ||
//yydebug = 1; | ||
-- | ||
2.8.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,36 @@ | ||
# Copyright 1999-2016 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Id$ | ||
|
||
EAPI=6 | ||
|
||
inherit eutils multilib-minimal | ||
|
||
DESCRIPTION="A simple non-validating CSS 1 and HTML parser for C++" | ||
HOMEPAGE="http://htmlcxx.sourceforge.net/" | ||
SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz" | ||
LICENSE="LGPL-2" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="static-libs" | ||
|
||
DEPEND="sys-devel/flex[${MULTILIB_USEDEP}] | ||
virtual/yacc" | ||
|
||
PATCHES=( | ||
"${FILESDIR}"/0001-strstream-is-deprecated-use-sstream-instead.patch | ||
"${FILESDIR}"/0002-Update-css_syntax.y-for-use-with-less-ancient-Bison.patch | ||
) | ||
|
||
ECONF_SOURCE="${S}" | ||
|
||
multilib_src_configure() { | ||
econf \ | ||
--enable-shared \ | ||
$(use_enable static-libs static) | ||
} | ||
|
||
multilib_src_install_all() { | ||
prune_libtool_files | ||
einstalldocs | ||
} |
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 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> | ||
<pkgmetadata> | ||
<maintainer type="person"> | ||
<email>[email protected]</email> | ||
<name>James Le Cuirot</name> | ||
</maintainer> | ||
<upstream> | ||
<remote-id type="sourceforge">htmlcxx</remote-id> | ||
</upstream> | ||
</pkgmetadata> |