From 56bd759df1d0c750a065b8c845e93d5dfa6b549d Mon Sep 17 00:00:00 2001 From: "Robin H. Johnson" Date: Sat, 8 Aug 2015 13:49:04 -0700 Subject: proj/gentoo: Initial commit MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This commit represents a new era for Gentoo: Storing the gentoo-x86 tree in Git, as converted from CVS. This commit is the start of the NEW history. Any historical data is intended to be grafted onto this point. Creation process: 1. Take final CVS checkout snapshot 2. Remove ALL ChangeLog* files 3. Transform all Manifests to thin 4. Remove empty Manifests 5. Convert all stale $Header$/$Id$ CVS keywords to non-expanded Git $Id$ 5.1. Do not touch files with -kb/-ko keyword flags. Signed-off-by: Robin H. Johnson X-Thanks: Alec Warner - did the GSoC 2006 migration tests X-Thanks: Robin H. Johnson - infra guy, herding this project X-Thanks: Nguyen Thai Ngoc Duy - Former Gentoo developer, wrote Git features for the migration X-Thanks: Brian Harring - wrote much python to improve cvs2svn X-Thanks: Rich Freeman - validation scripts X-Thanks: Patrick Lauer - Gentoo dev, running new 2014 work in migration X-Thanks: Michał Górny - scripts, QA, nagging X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed --- app-misc/abook/Manifest | 1 + app-misc/abook/abook-0.6.0_pre2.ebuild | 38 +++ .../abook/files/abook-0.6.0_pre2-vcard-fix.patch | 10 + .../files/abook-0.6.0_pre2-vcard-import.patch | 325 +++++++++++++++++++++ app-misc/abook/metadata.xml | 6 + 5 files changed, 380 insertions(+) create mode 100644 app-misc/abook/Manifest create mode 100644 app-misc/abook/abook-0.6.0_pre2.ebuild create mode 100644 app-misc/abook/files/abook-0.6.0_pre2-vcard-fix.patch create mode 100644 app-misc/abook/files/abook-0.6.0_pre2-vcard-import.patch create mode 100644 app-misc/abook/metadata.xml (limited to 'app-misc/abook') diff --git a/app-misc/abook/Manifest b/app-misc/abook/Manifest new file mode 100644 index 000000000000..e154d0f2db1b --- /dev/null +++ b/app-misc/abook/Manifest @@ -0,0 +1 @@ +DIST abook-0.6.0pre2.tar.gz 411412 SHA256 59d444504109dd96816e003b3023175981ae179af479349c34fa70bc12f6d385 SHA512 d1bc437981964a5dd873b12458833c60306d37b36904a04b072cefe7501175933dd7817ca51f8634bbd6722f79f768b39e00b68d0699086d5efaf28d0cbdf1ed WHIRLPOOL fbaed8cc4dff1b7b7786c4f5b4124e94893d59e97b67372b0b1f1cf176a16ef23141c37255589cfb352f1e4993ae69d1f77077f2396aaa2c482e85b3c617fc5f 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..e383d809c9ba --- /dev/null +++ b/app-misc/abook/abook-0.6.0_pre2.ebuild @@ -0,0 +1,38 @@ +# Copyright 1999-2014 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +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="sys-libs/ncurses + sys-libs/readline + 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 + + +net-mail +Abook is a text-based addressbook program designed to use with mutt mail client. + -- cgit v1.2.3-65-gdbad