From 4339668ff27c839af1a1e4cfa5a2d034afe204f2 Mon Sep 17 00:00:00 2001 From: Martin Jansa Date: Mon, 30 Jul 2012 23:52:49 +0200 Subject: fbreader, fltk, gpm, iksemel, joe, links, ode, openldap, opensync, xchat: import from meta-smartphone Signed-off-by: Martin Jansa --- .../recipes-support/links/files/ac-prog-cxx.patch | 11 +++ .../links/files/cookies-save-0.96.patch | 106 +++++++++++++++++++++ ...-2.1pre17-fix-segfault-on-loading-cookies.patch | 20 ++++ meta-oe/recipes-support/links/files/links2.desktop | 14 +++ 4 files changed, 151 insertions(+) create mode 100644 meta-oe/recipes-support/links/files/ac-prog-cxx.patch create mode 100644 meta-oe/recipes-support/links/files/cookies-save-0.96.patch create mode 100644 meta-oe/recipes-support/links/files/links-2.1pre17-fix-segfault-on-loading-cookies.patch create mode 100644 meta-oe/recipes-support/links/files/links2.desktop (limited to 'meta-oe/recipes-support/links/files') diff --git a/meta-oe/recipes-support/links/files/ac-prog-cxx.patch b/meta-oe/recipes-support/links/files/ac-prog-cxx.patch new file mode 100644 index 0000000000..41c3826850 --- /dev/null +++ b/meta-oe/recipes-support/links/files/ac-prog-cxx.patch @@ -0,0 +1,11 @@ +--- links-2.1pre20/configure.in.orig 2005-12-21 15:23:49.000000000 +0000 ++++ links-2.1pre20/configure.in 2005-12-21 15:23:59.000000000 +0000 +@@ -18,7 +18,7 @@ + dnl Checks for programs. + AC_PROG_CC + +-#AC_PROG_CXX ++AC_PROG_CXX + #AC_PROG_AWK + #AM_PROG_LEX + #AC_PROG_YACC diff --git a/meta-oe/recipes-support/links/files/cookies-save-0.96.patch b/meta-oe/recipes-support/links/files/cookies-save-0.96.patch new file mode 100644 index 0000000000..a1e35c01ca --- /dev/null +++ b/meta-oe/recipes-support/links/files/cookies-save-0.96.patch @@ -0,0 +1,106 @@ +diff -ru links-0.96/cookies.c links-0.96+cookies-save/cookies.c +--- links-0.96/cookies.c Mon Sep 3 07:19:37 2001 ++++ links-0.96+cookies-save/cookies.c Mon Sep 3 07:18:42 2001 +@@ -276,15 +276,99 @@ + + void init_cookies(void) + { +- /* !!! FIXME: read cookies */ ++ unsigned char in_buffer[MAX_STR_LEN]; ++ unsigned char *cookfile, *p, *q; ++ FILE *fp; ++ ++ /* must be called after init_home */ ++ if (! links_home) return; ++ ++ cookfile = stracpy(links_home); ++ if (! cookfile) return; ++ add_to_strn(&cookfile, "cookies"); ++ ++ fp = fopen(cookfile, "r"); ++ mem_free(cookfile); ++ if (fp == NULL) return; ++ ++ while (fgets(in_buffer, MAX_STR_LEN, fp)) { ++ struct cookie *cookie; ++ ++ if (!(cookie = mem_alloc(sizeof(struct cookie)))) return; ++ memset(cookie, 0, sizeof(struct cookie)); ++ ++ q = in_buffer; p = strchr(in_buffer, ' '); ++ if (p == NULL) goto inv; ++ *p++ = '\0'; ++ cookie->name = stracpy(q); ++ ++ q = p; p = strchr(p, ' '); ++ if (p == NULL) goto inv; ++ *p++ = '\0'; ++ cookie->value = stracpy(q); ++ ++ q = p; p = strchr(p, ' '); ++ if (p == NULL) goto inv; ++ *p++ = '\0'; ++ cookie->server = stracpy(q); ++ ++ q = p; p = strchr(p, ' '); ++ if (p == NULL) goto inv; ++ *p++ = '\0'; ++ cookie->path = stracpy(q); ++ ++ q = p; p = strchr(p, ' '); ++ if (p == NULL) goto inv; ++ *p++ = '\0'; ++ cookie->domain = stracpy(q); ++ ++ q = p; p = strchr(p, ' '); ++ if (p == NULL) goto inv; ++ *p++ = '\0'; ++ cookie->expires = atoi(q); ++ ++ cookie->secure = atoi(p); ++ ++ cookie->id = cookie_id++; ++ ++ accept_cookie(cookie); ++ ++ continue; ++ ++inv: ++ free_cookie(cookie); ++ free(cookie); ++ } ++ fclose(fp); + } + + void cleanup_cookies(void) + { + struct cookie *c; ++ unsigned char *cookfile; ++ FILE *fp; ++ + free_list(c_domains); +- /* !!! FIXME: save cookies */ +- foreach (c, cookies) free_cookie(c); ++ ++ cookfile = stracpy(links_home); ++ if (! cookfile) return; ++ add_to_strn(&cookfile, "cookies"); ++ ++ fp = fopen(cookfile, "w"); ++ mem_free(cookfile); ++ if (fp == NULL) return; ++ ++ foreach (c, cookies) { ++ if (c->expires && ! cookie_expired(c)) ++ fprintf(fp, "%s %s %s %s %s %d %d\n", c->name, c->value, ++ c->server?c->server:(unsigned char *)"", c->path?c->path:(unsigned char *)"", ++ c->domain?c->domain:(unsigned char *)"", c->expires, c->secure); ++ ++ free_cookie(c); ++ } ++ ++ fclose(fp); ++ + free_list(cookies); + } + diff --git a/meta-oe/recipes-support/links/files/links-2.1pre17-fix-segfault-on-loading-cookies.patch b/meta-oe/recipes-support/links/files/links-2.1pre17-fix-segfault-on-loading-cookies.patch new file mode 100644 index 0000000000..0d3b407e2a --- /dev/null +++ b/meta-oe/recipes-support/links/files/links-2.1pre17-fix-segfault-on-loading-cookies.patch @@ -0,0 +1,20 @@ +--- links-2.1pre17/cookies.c.pix 2005-05-15 23:05:10.000000000 +0800 ++++ links-2.1pre17/cookies.c 2005-05-15 23:17:21.000000000 +0800 +@@ -41,7 +41,7 @@ + + void free_cookie(struct cookie *c) + { +- mem_free(c->name); ++ if (c->value) mem_free(c->name); + if (c->value) mem_free(c->value); + if (c->server) mem_free(c->server); + if (c->path) mem_free(c->path); +@@ -355,7 +355,7 @@ + + inv: + free_cookie(cookie); +- free(cookie); ++ mem_free(cookie); + } + fclose(fp); + } diff --git a/meta-oe/recipes-support/links/files/links2.desktop b/meta-oe/recipes-support/links/files/links2.desktop new file mode 100644 index 0000000000..a05bce1b2b --- /dev/null +++ b/meta-oe/recipes-support/links/files/links2.desktop @@ -0,0 +1,14 @@ +[Desktop Entry] +Encoding=UTF-8 +Name=Links +Comment=Links is a browser very similar to lynx +Comment[es]=El links es un browser para modo texto, similar a lynx +Comment[pl]=Links jest przeglądarką podobną do lynksa +Comment[pt]=O links é um browser para modo texto, similar ao lynx +Comment[pt_BR]=O links é um browser para modo texto, similar ao lynx +Exec=links -g +Terminal=true +Icon=links2 +Type=Application +Categories=Application;ConsoleOnly;Network;WebBrowser; +# vi: encoding=utf-8 -- cgit 1.2.3-korg