aboutsummaryrefslogtreecommitdiffstats
path: root/www/bk2site
diff options
context:
space:
mode:
authorclive <clive@FreeBSD.org>2006-05-01 12:22:57 +0800
committerclive <clive@FreeBSD.org>2006-05-01 12:22:57 +0800
commit53fdcad3ea0b911dfad579d545068fd6aaf96f10 (patch)
treec5a0d8ec6b3d732471110c501e75807bec2a1a93 /www/bk2site
parent2f2ab519693432babbc6876ba0daf1b0977d64f9 (diff)
downloadfreebsd-ports-gnome-53fdcad3ea0b911dfad579d545068fd6aaf96f10.tar.gz
freebsd-ports-gnome-53fdcad3ea0b911dfad579d545068fd6aaf96f10.tar.zst
freebsd-ports-gnome-53fdcad3ea0b911dfad579d545068fd6aaf96f10.zip
Support XBEL file of Galeon better.
PR: ports/96556 Submitted by: netchild
Diffstat (limited to 'www/bk2site')
-rw-r--r--www/bk2site/Makefile2
-rw-r--r--www/bk2site/files/patch-XMLParser.C66
-rw-r--r--www/bk2site/files/patch-XMLParser.H32
3 files changed, 99 insertions, 1 deletions
diff --git a/www/bk2site/Makefile b/www/bk2site/Makefile
index 387dc2031362..c6131e58ff2b 100644
--- a/www/bk2site/Makefile
+++ b/www/bk2site/Makefile
@@ -8,7 +8,7 @@
PORTNAME= bk2site
PORTVERSION= 1.1.9
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= www
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE}
MASTER_SITE_SUBDIR= ${PORTNAME}
diff --git a/www/bk2site/files/patch-XMLParser.C b/www/bk2site/files/patch-XMLParser.C
new file mode 100644
index 000000000000..ec59c4d96ef1
--- /dev/null
+++ b/www/bk2site/files/patch-XMLParser.C
@@ -0,0 +1,66 @@
+--- XMLParser.C.orig Sun Apr 30 18:27:46 2006
++++ XMLParser.C Sun Apr 30 18:30:18 2006
+@@ -426,6 +426,15 @@
+ else if (equalNoCase(tagName,"DESC")){
+ inDesc = true;
+ }
++ else if (equalNoCase(tagName,"TIME_ADDED")){
++ inAdded = true;
++ }
++ else if (equalNoCase(tagName,"TIME_VISITED")){
++ inVisited = true;
++ }
++ else if (equalNoCase(tagName,"TIME_MODIFIED")){
++ inModified = true;
++ }
+ else if (equalNoCase(tagName,"BOOKMARK")){
+ map<string, string>::const_iterator i;
+ string url = "";
+@@ -455,6 +464,15 @@
+ else if (equalNoCase(tagName,"DESC")){
+ inDesc = false;
+ }
++ else if (equalNoCase(tagName,"TIME_ADDED")){
++ inAdded = false;
++ }
++ else if (equalNoCase(tagName,"TIME_VISITED")){
++ inVisited = false;
++ }
++ else if (equalNoCase(tagName,"TIME_MODIFIED")){
++ inModified = false;
++ }
+ else if (equalNoCase(tagName,"FOLDER")){
+ rtStack.pop_back();
+ currentReferenceTree = rtStack.back();
+@@ -484,6 +502,15 @@
+ else if (inDesc){
+ currentFolder->comment = content;
+ }
++ else if (inAdded) {
++ currentFolder->creationTime = atoi(content.c_str());
++ }
++ else if (inVisited) {
++ currentFolder->visitTime = atoi(content.c_str());
++ }
++ else if (inModified) {
++ currentFolder->modifiedTime = atoi(content.c_str());
++ }
+ }
+ else if (inBookmark) {
+ if (inTitle) {
+@@ -492,6 +519,15 @@
+ }
+ else if (inDesc){
+ currentBookmark->comment = content;
++ }
++ else if (inAdded) {
++ currentBookmark->creationTime = atoi(content.c_str());
++ }
++ else if (inVisited) {
++ currentBookmark->visitTime = atoi(content.c_str());
++ }
++ else if (inModified) {
++ currentBookmark->modifiedTime = atoi(content.c_str());
+ }
+ }
+ }
diff --git a/www/bk2site/files/patch-XMLParser.H b/www/bk2site/files/patch-XMLParser.H
new file mode 100644
index 000000000000..4a826d141f38
--- /dev/null
+++ b/www/bk2site/files/patch-XMLParser.H
@@ -0,0 +1,32 @@
+--- XMLParser.H.orig Sun Apr 30 18:27:46 2006
++++ XMLParser.H Sun Apr 30 18:28:29 2006
+@@ -140,6 +140,9 @@
+ bool inFolder;
+ bool inDesc;
+ bool inTitle;
++ bool inAdded;
++ bool inVisited;
++ bool inModified;
+
+ public:
+
+@@ -152,6 +155,9 @@
+ inFolder = false;
+ inDesc = false;
+ inTitle = false;
++ inAdded = false;
++ inVisited = false;
++ inModified = false;
+ };
+
+ XBELParser(referenceTree * r) {
+@@ -165,6 +171,9 @@
+ inFolder = false;
+ inDesc = false;
+ inTitle = false;
++ inAdded = false;
++ inVisited = false;
++ inModified = false;
+ };
+
+ void startTag(string &tagName, map<string,string> & attributes);