summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-support/links
diff options
context:
space:
mode:
authorMartin Jansa <Martin.Jansa@gmail.com>2012-07-30 23:52:49 +0200
committerMartin Jansa <Martin.Jansa@gmail.com>2012-07-31 00:14:55 +0200
commit4339668ff27c839af1a1e4cfa5a2d034afe204f2 (patch)
treed2a48dca9a2a46a944e5091bf9b157cb2dc15e44 /meta-oe/recipes-support/links
parentf2afdd2b988af8d0b4d822c7c03529b725fe24ba (diff)
downloadmeta-openembedded-4339668ff27c839af1a1e4cfa5a2d034afe204f2.tar.gz
fbreader, fltk, gpm, iksemel, joe, links, ode, openldap, opensync, xchat: import from meta-smartphone
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-oe/recipes-support/links')
-rw-r--r--meta-oe/recipes-support/links/files/ac-prog-cxx.patch11
-rw-r--r--meta-oe/recipes-support/links/files/cookies-save-0.96.patch106
-rw-r--r--meta-oe/recipes-support/links/files/links-2.1pre17-fix-segfault-on-loading-cookies.patch20
-rw-r--r--meta-oe/recipes-support/links/files/links2.desktop14
-rw-r--r--meta-oe/recipes-support/links/links-x11_2.0+2.1pre30.bb26
-rw-r--r--meta-oe/recipes-support/links/links.inc19
-rw-r--r--meta-oe/recipes-support/links/links_2.0+2.1pre30.bb13
7 files changed, 209 insertions, 0 deletions
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 000000000..41c382685
--- /dev/null
+++ b/meta-oe/recipes-support/links/files/ac-prog-cxx.patch
@@ -0,0 +1,11 @@
1--- links-2.1pre20/configure.in.orig 2005-12-21 15:23:49.000000000 +0000
2+++ links-2.1pre20/configure.in 2005-12-21 15:23:59.000000000 +0000
3@@ -18,7 +18,7 @@
4 dnl Checks for programs.
5 AC_PROG_CC
6
7-#AC_PROG_CXX
8+AC_PROG_CXX
9 #AC_PROG_AWK
10 #AM_PROG_LEX
11 #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 000000000..a1e35c01c
--- /dev/null
+++ b/meta-oe/recipes-support/links/files/cookies-save-0.96.patch
@@ -0,0 +1,106 @@
1diff -ru links-0.96/cookies.c links-0.96+cookies-save/cookies.c
2--- links-0.96/cookies.c Mon Sep 3 07:19:37 2001
3+++ links-0.96+cookies-save/cookies.c Mon Sep 3 07:18:42 2001
4@@ -276,15 +276,99 @@
5
6 void init_cookies(void)
7 {
8- /* !!! FIXME: read cookies */
9+ unsigned char in_buffer[MAX_STR_LEN];
10+ unsigned char *cookfile, *p, *q;
11+ FILE *fp;
12+
13+ /* must be called after init_home */
14+ if (! links_home) return;
15+
16+ cookfile = stracpy(links_home);
17+ if (! cookfile) return;
18+ add_to_strn(&cookfile, "cookies");
19+
20+ fp = fopen(cookfile, "r");
21+ mem_free(cookfile);
22+ if (fp == NULL) return;
23+
24+ while (fgets(in_buffer, MAX_STR_LEN, fp)) {
25+ struct cookie *cookie;
26+
27+ if (!(cookie = mem_alloc(sizeof(struct cookie)))) return;
28+ memset(cookie, 0, sizeof(struct cookie));
29+
30+ q = in_buffer; p = strchr(in_buffer, ' ');
31+ if (p == NULL) goto inv;
32+ *p++ = '\0';
33+ cookie->name = stracpy(q);
34+
35+ q = p; p = strchr(p, ' ');
36+ if (p == NULL) goto inv;
37+ *p++ = '\0';
38+ cookie->value = stracpy(q);
39+
40+ q = p; p = strchr(p, ' ');
41+ if (p == NULL) goto inv;
42+ *p++ = '\0';
43+ cookie->server = stracpy(q);
44+
45+ q = p; p = strchr(p, ' ');
46+ if (p == NULL) goto inv;
47+ *p++ = '\0';
48+ cookie->path = stracpy(q);
49+
50+ q = p; p = strchr(p, ' ');
51+ if (p == NULL) goto inv;
52+ *p++ = '\0';
53+ cookie->domain = stracpy(q);
54+
55+ q = p; p = strchr(p, ' ');
56+ if (p == NULL) goto inv;
57+ *p++ = '\0';
58+ cookie->expires = atoi(q);
59+
60+ cookie->secure = atoi(p);
61+
62+ cookie->id = cookie_id++;
63+
64+ accept_cookie(cookie);
65+
66+ continue;
67+
68+inv:
69+ free_cookie(cookie);
70+ free(cookie);
71+ }
72+ fclose(fp);
73 }
74
75 void cleanup_cookies(void)
76 {
77 struct cookie *c;
78+ unsigned char *cookfile;
79+ FILE *fp;
80+
81 free_list(c_domains);
82- /* !!! FIXME: save cookies */
83- foreach (c, cookies) free_cookie(c);
84+
85+ cookfile = stracpy(links_home);
86+ if (! cookfile) return;
87+ add_to_strn(&cookfile, "cookies");
88+
89+ fp = fopen(cookfile, "w");
90+ mem_free(cookfile);
91+ if (fp == NULL) return;
92+
93+ foreach (c, cookies) {
94+ if (c->expires && ! cookie_expired(c))
95+ fprintf(fp, "%s %s %s %s %s %d %d\n", c->name, c->value,
96+ c->server?c->server:(unsigned char *)"", c->path?c->path:(unsigned char *)"",
97+ c->domain?c->domain:(unsigned char *)"", c->expires, c->secure);
98+
99+ free_cookie(c);
100+ }
101+
102+ fclose(fp);
103+
104 free_list(cookies);
105 }
106
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 000000000..0d3b407e2
--- /dev/null
+++ b/meta-oe/recipes-support/links/files/links-2.1pre17-fix-segfault-on-loading-cookies.patch
@@ -0,0 +1,20 @@
1--- links-2.1pre17/cookies.c.pix 2005-05-15 23:05:10.000000000 +0800
2+++ links-2.1pre17/cookies.c 2005-05-15 23:17:21.000000000 +0800
3@@ -41,7 +41,7 @@
4
5 void free_cookie(struct cookie *c)
6 {
7- mem_free(c->name);
8+ if (c->value) mem_free(c->name);
9 if (c->value) mem_free(c->value);
10 if (c->server) mem_free(c->server);
11 if (c->path) mem_free(c->path);
12@@ -355,7 +355,7 @@
13
14 inv:
15 free_cookie(cookie);
16- free(cookie);
17+ mem_free(cookie);
18 }
19 fclose(fp);
20 }
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 000000000..a05bce1b2
--- /dev/null
+++ b/meta-oe/recipes-support/links/files/links2.desktop
@@ -0,0 +1,14 @@
1[Desktop Entry]
2Encoding=UTF-8
3Name=Links
4Comment=Links is a browser very similar to lynx
5Comment[es]=El links es un browser para modo texto, similar a lynx
6Comment[pl]=Links jest przeglądarką podobną do lynksa
7Comment[pt]=O links é um browser para modo texto, similar ao lynx
8Comment[pt_BR]=O links é um browser para modo texto, similar ao lynx
9Exec=links -g
10Terminal=true
11Icon=links2
12Type=Application
13Categories=Application;ConsoleOnly;Network;WebBrowser;
14# vi: encoding=utf-8
diff --git a/meta-oe/recipes-support/links/links-x11_2.0+2.1pre30.bb b/meta-oe/recipes-support/links/links-x11_2.0+2.1pre30.bb
new file mode 100644
index 000000000..b71da9f88
--- /dev/null
+++ b/meta-oe/recipes-support/links/links-x11_2.0+2.1pre30.bb
@@ -0,0 +1,26 @@
1require links.inc
2
3DEPENDS += "virtual/libx11"
4RCONFLICTS_${PN} = "links"
5
6SRC_URI += " file://links2.desktop \
7 http://www.xora.org.uk/oe/links2.png;name=icon"
8
9EXTRA_OECONF = "--enable-javascript --with-libfl --enable-graphics \
10 --with-ssl=${STAGING_LIBDIR}/.. --with-libjpeg \
11 --without-libtiff --without-svgalib --without-fb \
12 --without-directfb --without-pmshell --without-atheos \
13 --with-x --without-gpm --without-sdl"
14
15do_install_append() {
16 install -d ${D}/${datadir}/applications
17 install -m 0644 ${WORKDIR}/links2.desktop ${D}/${datadir}/applications
18 install -d ${D}/${datadir}/pixmaps
19 install -m 0644 ${WORKDIR}/links2.png ${D}/${datadir}/pixmaps
20}
21
22
23SRC_URI[md5sum] = "f0f107cc824b71e43f0c6ab620209daf"
24SRC_URI[sha256sum] = "f32314d851e86ec463967ddce78d051e3953b529878cbaeecf882c625ad29c75"
25SRC_URI[icon.md5sum] = "477e8787927c634614bac01b44355a33"
26SRC_URI[icon.sha256sum] = "eddcd8b8c8698aa621d1a453943892d77b72ed492e0d14e0dbac5c6a57e52f47"
diff --git a/meta-oe/recipes-support/links/links.inc b/meta-oe/recipes-support/links/links.inc
new file mode 100644
index 000000000..9001d2a3b
--- /dev/null
+++ b/meta-oe/recipes-support/links/links.inc
@@ -0,0 +1,19 @@
1DESCRIPTION = "Links is graphics and text mode WWW \
2browser, similar to Lynx."
3HOMEPAGE = "http://links.twibright.com/"
4SECTION = "console/network"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=b0c80473f97008e42e29a9f80fcc55ff"
7DEPENDS = "jpeg libpng flex openssl zlib"
8
9LPV = "${@bb.data.getVar("PV",d,1).split("+")[1]}"
10
11SRC_URI = "http://links.twibright.com/download/links-${LPV}.tar.bz2 \
12 file://ac-prog-cxx.patch \
13 file://cookies-save-0.96.patch \
14 file://links-2.1pre17-fix-segfault-on-loading-cookies.patch"
15
16inherit autotools
17
18S = "${WORKDIR}/links-${LPV}"
19
diff --git a/meta-oe/recipes-support/links/links_2.0+2.1pre30.bb b/meta-oe/recipes-support/links/links_2.0+2.1pre30.bb
new file mode 100644
index 000000000..24961737d
--- /dev/null
+++ b/meta-oe/recipes-support/links/links_2.0+2.1pre30.bb
@@ -0,0 +1,13 @@
1require links.inc
2
3DEPENDS += "gpm"
4RCONFLICTS_${PN} = "links-x11"
5
6EXTRA_OECONF = "--enable-javascript --with-libfl --enable-graphics \
7 --with-ssl=${STAGING_LIBDIR}/.. --with-libjpeg \
8 --without-libtiff --without-svgalib --with-fb \
9 --without-directfb --without-pmshell --without-atheos \
10 --without-x --without-sdl"
11
12SRC_URI[md5sum] = "f0f107cc824b71e43f0c6ab620209daf"
13SRC_URI[sha256sum] = "f32314d851e86ec463967ddce78d051e3953b529878cbaeecf882c625ad29c75"