summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2010-10-03 22:18:40 +0000
committerTim Harder <radhermit@gentoo.org>2010-10-03 22:18:40 +0000
commit95cb8ebe45a3f54b3e28441efc5b81ba77ca42eb (patch)
treea17a1db18d8f834ba911a1fa22fefc3be2d1bf4b /app-misc
parentFix bad ebuild header. (diff)
downloadhistorical-95cb8ebe45a3f54b3e28441efc5b81ba77ca42eb.tar.gz
historical-95cb8ebe45a3f54b3e28441efc5b81ba77ca42eb.tar.bz2
historical-95cb8ebe45a3f54b3e28441efc5b81ba77ca42eb.zip
Version bump (fixes bug #301502, thanks to Roger <rogerx@sdf.org> for reporting), update to EAPI=3, apply patches for vCard import support, and use emake instead of make.
Package-Manager: portage-2.2_rc88/cvs/Linux x86_64
Diffstat (limited to 'app-misc')
-rw-r--r--app-misc/abook/ChangeLog11
-rw-r--r--app-misc/abook/Manifest18
-rw-r--r--app-misc/abook/abook-0.6.0_pre2.ebuild36
-rw-r--r--app-misc/abook/files/abook-0.6.0_pre2-vcard-fix.patch10
-rw-r--r--app-misc/abook/files/abook-0.6.0_pre2-vcard-import.patch325
5 files changed, 394 insertions, 6 deletions
diff --git a/app-misc/abook/ChangeLog b/app-misc/abook/ChangeLog
index 03c1d3ea4f3d..bb8ef8d03773 100644
--- a/app-misc/abook/ChangeLog
+++ b/app-misc/abook/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for app-misc/abook
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/app-misc/abook/ChangeLog,v 1.56 2010/02/11 14:59:04 tove Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-misc/abook/ChangeLog,v 1.57 2010/10/03 22:18:40 radhermit Exp $
+
+*abook-0.6.0_pre2 (03 Oct 2010)
+
+ 03 Oct 2010; Tim Harder <radhermit@gentoo.org> +abook-0.6.0_pre2.ebuild,
+ +files/abook-0.6.0_pre2-vcard-fix.patch,
+ +files/abook-0.6.0_pre2-vcard-import.patch:
+ Version bump (fixes bug #301502, thanks to Roger <rogerx@sdf.org> for
+ reporting), update to EAPI=3, apply patches for vCard import support, and
+ use emake instead of make.
11 Feb 2010; Torsten Veller <tove@gentoo.org> -abook-0.5.6.ebuild:
Cleanup
diff --git a/app-misc/abook/Manifest b/app-misc/abook/Manifest
index 6f07d82b0433..af8da6d533dc 100644
--- a/app-misc/abook/Manifest
+++ b/app-misc/abook/Manifest
@@ -2,14 +2,22 @@
Hash: SHA1
AUX 0.5.6-01_editor.patch 464 RMD160 b6d8459089dee9b4d07a2cd8575c2870d278edca SHA1 bc74e7847d6ac56c4e3ed6b8388cd7700433dba9 SHA256 dcd37cb0cdecb0b52e680210acd8df84031466d697e037a02888e199d8cbc671
+AUX abook-0.6.0_pre2-vcard-fix.patch 270 RMD160 16fdafea3126897d2ca72ebb9422e9e8942cb4b2 SHA1 f299564b94ba0f1607cbe5a824265f7e9460e7a6 SHA256 aeb3290e60e7bda28a9a2b0845a500b0399072247ff41319e0384095ac697086
+AUX abook-0.6.0_pre2-vcard-import.patch 6491 RMD160 45d89ec6bde5ce583d6ea14a398c98b3f83f7843 SHA1 a52256adbe3f3ab74b2aa0dcc5626352c103349e SHA256 42344474cf8ad64d7937aa20d322b0e5f39736c51445d803a05f0733ee7ce5c1
DIST abook-0.5.6.tar.gz 393097 RMD160 e6a6e77fb7c8ba6608482b1103b948015c37b737 SHA1 79f04f2264c8bd81bbc952b6560c86d69b21615d SHA256 0646f6311a94ad3341812a4de12a5a940a7a44d5cb6e9da5b0930aae9f44756e
+DIST abook-0.6.0pre2.tar.gz 411412 RMD160 7b69dff4678e6deccc48ee3040f019c9a95463a9 SHA1 42a939fba43e51aa011fa185113c12ec4bc1e1ec SHA256 59d444504109dd96816e003b3023175981ae179af479349c34fa70bc12f6d385
EBUILD abook-0.5.6-r1.ebuild 952 RMD160 23d48c45f7699804dcc2d023530a10186594d46e SHA1 425f0ddcb8057449a3e80558c9fa1ee88c1e65ce SHA256 d78cc44bdb0d21c56f9995feb153ab68408d54359d40c6b9173d8efa2ebb7504
-MISC ChangeLog 6308 RMD160 c7e96ee8b7c76ac61309be008c027eada5c7d992 SHA1 9b226455fbb31ff8aa698f00d9640fdab31f7421 SHA256 746eb136f088a59e39ef3540b4faddb6ebc7a155567ad179e2444517a70a2e7d
+EBUILD abook-0.6.0_pre2.ebuild 1036 RMD160 13a9304f7c3c5050a895c023a15b33bad1dd04e4 SHA1 a307eae14aa847cd374eb64dd3b1f90ef6e1cf20 SHA256 774593a2904edae8cfff7a99bad4326f665720bd688799783e3062ba63bc61aa
+MISC ChangeLog 6688 RMD160 205af4a23c380f977cd7a529e1bad0fffaba5564 SHA1 7962f6e88d21fd6da0182e84813d3fc5f740803f SHA256 c5c29d41e094e9f928754d2d554bf59dda34e462697059704ddc4b401ad012ab
MISC metadata.xml 277 RMD160 714f3386e1e40ab95489b87a15b97b05f230a093 SHA1 88d0606eee1253fec75e34633e68677c1b07d7be SHA256 b4d9ec08fcedf6ef469e5eda6cf968678daa03f8c9ad244d97acc5b3223bde1a
-----BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.14 (GNU/Linux)
+Version: GnuPG v2.0.16 (GNU/Linux)
-iEYEARECAAYFAkt0Gz4ACgkQV3J2n04EauwMIQCeLPXMkxZE+q/QhDLHrptcgDPt
-aAoAnRnt9AW4BxqFrZ8hl7C65UvBLkat
-=Muxi
+iQEcBAEBAgAGBQJMqQFJAAoJEEqz6FtPBkyjChIH/2zunJLxhMisJg9cnpG9Nyqc
+UU6adJxJyaZlR0VpEb6EwCG0Ibj4NoDvP9iuf2hrVcJvGq3DHo3o2fSeMEjBV5PM
+6LTmrHm6XlCi7qSaQkVnHgkX9Qrfl3jTgo0TGuyBn6PliMAnPGASJl99q4naX81U
++3VXGUqrW2XHQyalNixzpsZ0RO1je3fO32Vdi4/o41I/tk1k5qt4d1x9WZkjcgRK
+QKEDH4RiRVRoN0AQqsfDUwWD7sQ7I+zQYwjeRtWALKVWK4Z7teB6qjiw9W5fcY6y
+1GsEF437HL/9+qrb1/rCj8w2Xwb88iIt+6s9wuNuF0kwZrWiREw3zuG+pZi+0mY=
+=1u5B
-----END PGP SIGNATURE-----
diff --git a/app-misc/abook/abook-0.6.0_pre2.ebuild b/app-misc/abook/abook-0.6.0_pre2.ebuild
new file mode 100644
index 000000000000..bea9ea198479
--- /dev/null
+++ b/app-misc/abook/abook-0.6.0_pre2.ebuild
@@ -0,0 +1,36 @@
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-misc/abook/abook-0.6.0_pre2.ebuild,v 1.1 2010/10/03 22:18:40 radhermit Exp $
+
+EAPI=3
+
+inherit eutils
+
+MY_P="${P/_/}"
+DESCRIPTION="Abook is a text-based addressbook program designed to use with mutt mail client."
+HOMEPAGE="http://abook.sourceforge.net/"
+SRC_URI="http://abook.sourceforge.net/devel/${MY_P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~alpha ~amd64 ~ppc ~ppc64 ~sparc ~x86 ~x86-interix ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris ~x86-solaris"
+IUSE="nls"
+
+RDEPEND="nls? ( virtual/libintl )"
+DEPEND="nls? ( sys-devel/gettext )"
+
+S="${WORKDIR}/${MY_P}"
+
+src_prepare() {
+ epatch "${FILESDIR}"/${P}-vcard-import.patch
+ epatch "${FILESDIR}"/${P}-vcard-fix.patch
+}
+
+src_configure() {
+ econf $(use_enable nls)
+}
+
+src_install() {
+ emake DESTDIR="${D}" install || die "emake install failed"
+ dodoc BUGS ChangeLog FAQ README TODO sample.abookrc || die "dodoc failed"
+}
diff --git a/app-misc/abook/files/abook-0.6.0_pre2-vcard-fix.patch b/app-misc/abook/files/abook-0.6.0_pre2-vcard-fix.patch
new file mode 100644
index 000000000000..8045909463ac
--- /dev/null
+++ b/app-misc/abook/files/abook-0.6.0_pre2-vcard-fix.patch
@@ -0,0 +1,10 @@
+--- abook-0.6.0pre2/abook.c.orig 2010-10-03 14:54:23.827767178 -0700
++++ abook-0.6.0pre2/abook.c 2010-10-03 14:54:55.738042419 -0700
+@@ -708,6 +708,7 @@
+ check_abook_directory();
+ init_opts();
+ load_opts(rcfile);
++ init_standard_fields();
+ atexit(free_opts);
+
+ /*
diff --git a/app-misc/abook/files/abook-0.6.0_pre2-vcard-import.patch b/app-misc/abook/files/abook-0.6.0_pre2-vcard-import.patch
new file mode 100644
index 000000000000..316f1229fd9f
--- /dev/null
+++ b/app-misc/abook/files/abook-0.6.0_pre2-vcard-import.patch
@@ -0,0 +1,325 @@
+diff -ru a/filter.c b/filter.c
+--- a/filter.c 2006-09-06 07:26:10.000000000 +0200
++++ b/filter.c 2008-05-18 20:55:12.000000000 +0200
+@@ -44,6 +44,7 @@
+ static int csv_parse_file(FILE *in);
+ static int allcsv_parse_file(FILE *in);
+ static int palmcsv_parse_file(FILE *in);
++static int vcard_parse_file(FILE *in);
+
+ /*
+ * export filter prototypes
+@@ -75,6 +76,7 @@
+ { "csv", N_("comma separated values"), csv_parse_file },
+ { "allcsv", N_("comma separated values (all fields)"), allcsv_parse_file },
+ { "palmcsv", N_("Palm comma separated values"), palmcsv_parse_file },
++ { "vcard", N_("vCard file"), vcard_parse_file },
+ { "\0", NULL, NULL }
+ };
+
+@@ -1331,6 +1333,262 @@
+ */
+
+ /*
++ * vCard import filter
++ */
++
++static char *vcard_fields[] = {
++ "FN", /* NAME */
++ "EMAIL", /* EMAIL */
++ "ADR", /* ADDRESS */
++ "ADR", /* ADDRESS2 - not used */
++ "ADR", /* CITY */
++ "ADR", /* STATE */
++ "ADR", /* ZIP */
++ "ADR", /* COUNTRY */
++ "TEL", /* PHONE */
++ "TEL", /* WORKPHONE */
++ "TEL", /* FAX */
++ "TEL", /* MOBILEPHONE */
++ "NICKNAME", /* NICK */
++ "URL", /* URL */
++ "NOTE", /* NOTES */
++ NULL /* not implemented: ANNIVERSARY, ITEM_FIELDS */
++};
++
++/*
++ * mappings between vCard ADR field and abook's ADDRESS
++ * see rfc2426 section 3.2.1
++ */
++static int vcard_address_fields[] = {
++ -1, /* vCard(post office box) - not used */
++ -1, /* vCard(the extended address) - not used */
++ 2, /* vCard(the street address) - ADDRESS */
++ 4, /* vCard(the locality) - CITY */
++ 5, /* vCard(the region) - STATE */
++ 6, /* vCard(the postal code) - ZIP */
++ 7 /* vCard(the country name) - COUNTRY */
++};
++
++enum {
++ VCARD_KEY = 0,
++ VCARD_KEY_ATTRIBUTE,
++ VCARD_VALUE,
++};
++
++static char *
++vcard_get_line_element(char *line, int element)
++{
++ int i;
++ char *line_copy = 0;
++ char *result = 0;
++ char *key = 0;
++ char *key_attr = 0;
++ char *value = 0;
++
++ line_copy = xstrdup(line);
++
++ /* make newline characters if exist end of string */
++ for(i=0; line_copy[i]; i++) {
++ if(line_copy[i] == '\r' || line_copy[i] == '\n') {
++ line_copy[i] = '\0';
++ break;
++ }
++ }
++
++ /* separate key from value */
++ for(i=0; line_copy[i]; i++) {
++ if(line_copy[i] == ':') {
++ line_copy[i] = '\0';
++ key = line_copy;
++ value = &line_copy[i+1];
++ break;
++ }
++ }
++
++ /* separate key from key attributes */
++ if (key) {
++ for(i=0; key[i]; i++) {
++ if(key[i] == ';') {
++ key[i] = '\0';
++ key_attr = &key[i+1];
++ break;
++ }
++ }
++ }
++
++ switch(element) {
++ case VCARD_KEY:
++ if(key)
++ result = xstrdup(key);
++ break;
++ case VCARD_KEY_ATTRIBUTE:
++ if(key_attr)
++ result = xstrdup(key_attr);
++ break;
++ case VCARD_VALUE:
++ if(value)
++ result = xstrdup(value);
++ break;
++ }
++
++ xfree(line_copy);
++ return result;
++}
++
++static void
++vcard_parse_email(list_item item, char *line)
++{
++ char *email;
++
++ email = vcard_get_line_element(line, VCARD_VALUE);
++
++ if(item[1]) {
++ item[1] = strconcat(item[1], ",", email, 0);
++ xfree(email);
++ }
++ else {
++ item[1] = email;
++ }
++}
++
++static void
++vcard_parse_address(list_item item, char *line)
++{
++ int i;
++ int k;
++ char *value;
++ char *address_field;
++
++ value = vcard_get_line_element(line, VCARD_VALUE);
++ if(!value)
++ return;
++
++ address_field = value;
++ for(i=k=0; value[i]; i++) {
++ if(value[i] == ';') {
++ value[i] = '\0';
++ if(vcard_address_fields[k] >= 0) {
++ item[vcard_address_fields[k]] = xstrdup(address_field);
++ }
++ address_field = &value[i+1];
++ k++;
++ if((k+1)==(sizeof(vcard_address_fields)/sizeof(*vcard_address_fields)))
++ break;
++ }
++ }
++ item[vcard_address_fields[k]] = xstrdup(address_field);
++ xfree(value);
++}
++
++static void
++vcard_parse_phone(list_item item, char *line)
++{
++ int index = 8;
++ char *type = vcard_get_line_element(line, VCARD_KEY_ATTRIBUTE);
++ char *value = vcard_get_line_element(line, VCARD_VALUE);
++
++ /* set the standard number */
++ if (!type) {
++ item[index] = value;
++ }
++
++ /*
++ * see rfc2426 section 3.3.1
++ */
++ else if (strstr(type, "TYPE=") == type){
++ if (strcasestr(type, "home")) {
++ item[index] = xstrdup(value);
++ }
++ if (strcasestr(type, "work")) {
++ item[index+1] = xstrdup(value);
++ }
++ if (strcasestr(type, "fax")) {
++ item[index+2] = xstrdup(value);
++ }
++ if (strcasestr(type, "cell")) {
++ item[index+3] = xstrdup(value);
++ }
++
++ xfree(type);
++ xfree(value);
++ }
++}
++
++static void
++vcard_parse_line(list_item item, char *line)
++{
++ int i;
++ char *key;
++
++ for(i=0; vcard_fields[i]; i++) {
++ key = vcard_fields[i];
++
++ if(!strncmp(key, line, strlen(key))) {
++ if(i == 1) {
++ vcard_parse_email(item, line);
++ }
++ else if(i == 2) {
++ vcard_parse_address(item, line);
++ }
++ else if(i == 8) {
++ vcard_parse_phone(item, line);
++ }
++ else {
++ item[i] = vcard_get_line_element(line, VCARD_VALUE);
++ }
++ break;
++ }
++ }
++}
++
++static void
++vcard_parse_item(FILE *in)
++{
++ char *line = NULL;
++ list_item item = item_create();
++
++ while(!feof(in)) {
++ line = getaline(in);
++
++ if(line && !strncmp("END:VCARD", line, 9)) {
++ xfree(line);
++ break;
++ }
++ else if(line) {
++ vcard_parse_line(item, line);
++ xfree(line);
++ }
++ }
++
++ add_item2database(item);
++ item_free(&item);
++}
++
++static int
++vcard_parse_file(FILE *in)
++{
++ char *line = NULL;
++
++ while(!feof(in)) {
++ line = getaline(in);
++
++ if(line && !strncmp("BEGIN:VCARD", line, 11)) {
++ xfree(line);
++ vcard_parse_item(in);
++ }
++ else if(line) {
++ xfree(line);
++ }
++ }
++
++ return 0;
++}
++
++/*
++ * end of vCard import filter
++ */
++
++/*
+ * csv addressbook export filters
+ */
+
+diff -ru a/misc.c b/misc.c
+--- a/misc.c 2006-09-04 21:24:18.000000000 +0200
++++ b/misc.c 2008-05-18 18:00:33.000000000 +0200
+@@ -77,6 +77,27 @@
+ return 1;
+ }
+
++char *
++strcasestr(char *haystack, char *needle)
++{
++ int i;
++ int k;
++
++ assert(haystack != NULL);
++ assert(needle != NULL);
++
++ for(i=0; i<strlen(haystack)-strlen(needle)+1; i++) {
++ for(k=0; k<strlen(needle); k++, i++) {
++ if (tolower(haystack[i]) != tolower(needle[k]))
++ break;
++ else if ((k+1) == strlen(needle))
++ return &haystack[i];
++ }
++ }
++
++ return NULL;
++}
++
+
+ #ifdef HAVE_CONFIG_H
+ # include "config.h"
+diff -ru a/misc.h b/misc.h
+--- a/misc.h 2006-09-04 21:24:18.000000000 +0200
++++ b/misc.h 2008-05-18 17:55:59.000000000 +0200
+@@ -18,6 +18,8 @@
+
+ int is_number(char *s);
+
++char *strcasestr(char *haystack, char *needle);
++
+ char *strdup_printf(const char *format, ... );
+ char *strconcat(const char *str, ...);
+