diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 13:49:04 -0700 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2015-08-08 17:38:18 -0700 |
commit | 56bd759df1d0c750a065b8c845e93d5dfa6b549d (patch) | |
tree | 3f91093cdb475e565ae857f1c5a7fd339e2d781e /app-editors/nvi | |
download | gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.gz gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.tar.bz2 gentoo-56bd759df1d0c750a065b8c845e93d5dfa6b549d.zip |
proj/gentoo: Initial commit
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 <robbat2@gentoo.org>
X-Thanks: Alec Warner <antarus@gentoo.org> - did the GSoC 2006 migration tests
X-Thanks: Robin H. Johnson <robbat2@gentoo.org> - infra guy, herding this project
X-Thanks: Nguyen Thai Ngoc Duy <pclouds@gentoo.org> - Former Gentoo developer, wrote Git features for the migration
X-Thanks: Brian Harring <ferringb@gentoo.org> - wrote much python to improve cvs2svn
X-Thanks: Rich Freeman <rich0@gentoo.org> - validation scripts
X-Thanks: Patrick Lauer <patrick@gentoo.org> - Gentoo dev, running new 2014 work in migration
X-Thanks: Michał Górny <mgorny@gentoo.org> - scripts, QA, nagging
X-Thanks: All of other Gentoo developers - many ideas and lots of paint on the bikeshed
Diffstat (limited to 'app-editors/nvi')
-rw-r--r-- | app-editors/nvi/Manifest | 1 | ||||
-rw-r--r-- | app-editors/nvi/files/nvi-1.81.6-ac_config_header.patch | 12 | ||||
-rw-r--r-- | app-editors/nvi/files/nvi-1.81.6-db.patch | 26 | ||||
-rw-r--r-- | app-editors/nvi/files/nvi-1.81.6-db44.patch | 29 | ||||
-rw-r--r-- | app-editors/nvi/files/nvi-1.81.6-perl-as-needed.patch | 94 | ||||
-rw-r--r-- | app-editors/nvi/files/nvi-1.81.6-perl-shortnames.patch | 20 | ||||
-rw-r--r-- | app-editors/nvi/files/nvi-1.81.6-strlen-macro-renaming.patch | 499 | ||||
-rw-r--r-- | app-editors/nvi/files/nvi-1.81.6-use_pkgconfig_for_ncurses.patch | 30 | ||||
-rw-r--r-- | app-editors/nvi/metadata.xml | 8 | ||||
-rw-r--r-- | app-editors/nvi/nvi-1.81.6-r3.ebuild | 90 | ||||
-rw-r--r-- | app-editors/nvi/nvi-1.81.6-r4.ebuild | 101 | ||||
-rw-r--r-- | app-editors/nvi/nvi-1.81.6-r5.ebuild | 102 |
12 files changed, 1012 insertions, 0 deletions
diff --git a/app-editors/nvi/Manifest b/app-editors/nvi/Manifest new file mode 100644 index 000000000000..4a3146c32a26 --- /dev/null +++ b/app-editors/nvi/Manifest @@ -0,0 +1 @@ +DIST nvi-1.81.6.tar.bz2 1758309 SHA256 3441b8e3247b2b6dd19b5fd38355fe6593b2a92e960ecb3dd00d676f63d06b59 SHA512 7e203f7ea6723427d18ff55361254991f50d395f89aab2ea52d0902c474acb24c289da7c35d9e907d652145f13483d8a8270f5c8ee72bd723a3b1eaeecc4f9fd WHIRLPOOL e349a09c281bc41b1ff404a9bfa6bc16b7e4b70c45a91efe231e4e766f72f83f5bbae9a901ffc448b8badae21a494fafd3292028f1a3234d8b92085206772375 diff --git a/app-editors/nvi/files/nvi-1.81.6-ac_config_header.patch b/app-editors/nvi/files/nvi-1.81.6-ac_config_header.patch new file mode 100644 index 000000000000..49f9453983bc --- /dev/null +++ b/app-editors/nvi/files/nvi-1.81.6-ac_config_header.patch @@ -0,0 +1,12 @@ +diff -uNr nvi-1.81.6.orig/dist/configure.in nvi-1.81.6/dist/configure.in +--- nvi-1.81.6.orig/dist/configure.in 2013-07-09 16:54:56.000000000 -0400 ++++ nvi-1.81.6/dist/configure.in 2013-07-09 16:59:35.000000000 -0400 +@@ -4,7 +4,7 @@ + AC_INIT(../common/main.c) + AC_CONFIG_AUX_DIR(.) + AM_INIT_AUTOMAKE(vi, 1.81.6) +-AM_CONFIG_HEADER(config.h) ++AC_CONFIG_HEADER(config.h) + + dnl Configure setup. + AC_PROG_INSTALL() diff --git a/app-editors/nvi/files/nvi-1.81.6-db.patch b/app-editors/nvi/files/nvi-1.81.6-db.patch new file mode 100644 index 000000000000..a8b721951270 --- /dev/null +++ b/app-editors/nvi/files/nvi-1.81.6-db.patch @@ -0,0 +1,26 @@ +--- common/exf.c ++++ common/exf.c +@@ -228,13 +228,18 @@ + /* + * XXX + * A seat of the pants calculation: try to keep the file in +- * 15 pages or less. Don't use a page size larger than 10K ++ * 15 pages or less. Don't use a page size larger than 8K +- * (vi should have good locality) or smaller than 1K. ++ * (vi should have good locality) or smaller than 1K. DB asks ++ * for a power of two, so give it one. + */ + psize = ((sb.st_size / 15) + 1023) / 1024; +- if (psize > 10) ++ if (psize >= 8) +- psize = 10; ++ psize = 8; ++ else if (psize >= 4) ++ psize = 4; ++ else if (psize >= 2) ++ psize = 2; +- if (psize == 0) ++ else + psize = 1; + psize *= 1024; + diff --git a/app-editors/nvi/files/nvi-1.81.6-db44.patch b/app-editors/nvi/files/nvi-1.81.6-db44.patch new file mode 100644 index 000000000000..f081a2d28bea --- /dev/null +++ b/app-editors/nvi/files/nvi-1.81.6-db44.patch @@ -0,0 +1,29 @@ + + First part is from http://cvsweb.se.netbsd.org/cgi-bin/bsdweb.cgi/pkgsrc/editors/nvi/patches/patch-aa?rev=1.3;content-type=text/plain + +--- common/db.h 2012-08-27 06:55:01.000000000 -0400 ++++ common/db.h 2012-08-27 07:17:48.000000000 -0400 +@@ -16,7 +16,10 @@ + (env)->remove(env, path, NULL, flags) + #endif + +-#if DB_VERSION_MAJOR >= 4 && DB_VERSION_MINOR >= 1 ++# if (DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 4) || DB_VERSION_MAJOR > 4 ++#define db_open(db,file,type,flags,mode) \ ++ (db)->open(db, NULL, file, NULL, type, flags | DB_CREATE, mode) ++#elif DB_VERSION_MAJOR == 4 && DB_VERSION_MINOR >= 1 + #define db_open(db,file,type,flags,mode) \ + (db)->open(db, NULL, file, NULL, type, flags, mode) + #else +--- common/msg.c ++++ common/msg.c +@@ -724,7 +724,8 @@ + p = buf; + } else + p = file; +- if ((sp->db_error = db_create(&db, 0, 0)) != 0 || ++ if (access(p, R_OK) != 0 || ++ (sp->db_error = db_create(&db, 0, 0)) != 0 || + (sp->db_error = db->set_re_source(db, p)) != 0 || + (sp->db_error = db_open(db, NULL, DB_RECNO, 0, 0)) != 0) { + if (first) { diff --git a/app-editors/nvi/files/nvi-1.81.6-perl-as-needed.patch b/app-editors/nvi/files/nvi-1.81.6-perl-as-needed.patch new file mode 100644 index 000000000000..01117491ec4f --- /dev/null +++ b/app-editors/nvi/files/nvi-1.81.6-perl-as-needed.patch @@ -0,0 +1,94 @@ +--- dist/configure.in ++++ dist/configure.in +@@ -105,7 +105,7 @@ + + dnl A/UX has a broken getopt(3), strpbrk(3). + case "$host_os" in +-aux*) LIBOBJS="getopt.o strpbrk.o $LIBOBJS";; ++aux*) LIBOBJS="libvi_la-getopt.o libvi_la-strpbrk.o $LIBOBJS";; + esac + + dnl Ultrix has a broken POSIX.1 VDISABLE value. +@@ -434,7 +434,7 @@ + -e 'ldopts'` + perlldflags=`cd $srcdir;$vi_cv_path_perl -MExtUtils::Embed \ + -e 'ccdlflags'` +- LIBOBJS="perl.o perlxsi.o perlsfio.o $LIBOBJS" ++ LIBOBJS="libvi_la-perl.o libvi_la-perlxsi.o libvi_la-perlsfio.o $LIBOBJS" + AC_DEFINE(HAVE_PERL_INTERP) + AC_CACHE_CHECK([whether we need to use perl's setenv], + vi_cv_perl_setenv, [ +@@ -471,7 +471,7 @@ + AC_MSG_ERROR([No Tcl library found;]) + fi + . $vi_cv_tclconfig +- LIBOBJS="tcl.o $LIBOBJS" ++ LIBOBJS="libvi_la-tcl.o $LIBOBJS" + LIBS="$TCL_LIB_SPEC $TCL_LIBS $LIBS" + AC_DEFINE(HAVE_TCL_INTERP) + fi +@@ -607,12 +607,12 @@ + + dnl If we needed setenv or unsetenv, add in the clib/env.c replacement file. + if test "$need_env" = yes; then +- LIBOBJS="env.o $LIBOBJS" ++ LIBOBJS="libvi_la-env.o $LIBOBJS" + fi + + dnl If we need strsep, add it and define it so we get a prototype. + if test "$need_strsep" = yes; then +- LIBOBJS="strsep.o $LIBOBJS" ++ LIBOBJS="libvi_la-strsep.o $LIBOBJS" + fi + + dnl Check for fcntl/flock +@@ -1003,7 +1003,7 @@ + PATH="$OLDPATH" + + AC_DEFINE(USE_DYNAMIC_LOADING) +- LIBOBJS="dldb.o $LIBOBJS" ++ LIBOBJS="libvi_la-dldb.o $LIBOBJS" + dl_src=../common/dldb.c + LIBS="-ldl $LIBS" + else +@@ -1046,9 +1046,9 @@ + CPPFLAGS="-I$vi_cv_dbsrc/include_auto $CPPFLAGS" + CPPFLAGS="-I$with_db_build $CPPFLAGS" + AC_DEFINE(USE_DB4_LOGGING) +- LIBOBJS="log4.o vi_auto.o vi_rec.o $LIBOBJS" ++ LIBOBJS="libvi_la-log4.o libvi_la-vi_auto.o libvi_la-vi_rec.o $LIBOBJS" + else +- LIBOBJS="log.o $LIBOBJS" ++ LIBOBJS="libvi_la-log.o $LIBOBJS" + fi + + dnl We compile in nvi's RE routines unless the user specifies otherwise. +@@ -1064,7 +1064,7 @@ + case "$vi_cv_re_lib" in + "bundled RE") + CPPFLAGS="-I\$(visrcdir)/regex $CPPFLAGS" +- LIBOBJS="regcomp.o regerror.o regexec.o regfree.o $LIBOBJS";; ++ LIBOBJS="libvi_la-regcomp.o libvi_la-regerror.o libvi_la-regexec.o libvi_la-regfree.o $LIBOBJS";; + "other RE") + ;; + esac +--- dist/Makefile.am ++++ dist/Makefile.am +@@ -169,12 +169,15 @@ + $(visrcdir)/common/pthread.c \ + $(visrcdir)/common/vi_auto.c \ + $(visrcdir)/common/vi_rec.c \ +- $(visrcdir)/perl_api/perl.xs \ ++ perl.c \ + $(visrcdir)/perl_api/perlsfio.c \ ++ perlxsi.c \ + $(visrcdir)/tcl_api/tcl.c + # Is this the way to do it ? + libvi_la_DEPENDENCIES = @LTLIBOBJS@ +-libvi_la_LIBADD = @LTLIBOBJS@ ++libvi_la_LIBADD = @LTLIBOBJS@ @perllibs@ ++libvi_la_CPPFLAGS = @perlldflags@ $(AM_CPPFLAGS) ++libvi_la_LDFLAGS = @perlldflags@ + + bin_PROGRAMS = @vi_programs@ @vi_ipc@ + EXTRA_PROGRAMS = vi vi-ipc vi-motif vi-gtk diff --git a/app-editors/nvi/files/nvi-1.81.6-perl-shortnames.patch b/app-editors/nvi/files/nvi-1.81.6-perl-shortnames.patch new file mode 100644 index 000000000000..88e1829e78d6 --- /dev/null +++ b/app-editors/nvi/files/nvi-1.81.6-perl-shortnames.patch @@ -0,0 +1,20 @@ +--- perl_api/perlsfio.c ++++ perl_api/perlsfio.c +@@ -32,6 +32,7 @@ + /* perl redefines them + * avoid warnings + */ ++#undef re_compile + #undef USE_DYNAMIC_LOADING + #undef DEBUG + #undef PACKAGE +--- perl_api/perl.xs ++++ perl_api/perl.xs +@@ -38,6 +38,7 @@ + /* perl redefines them + * avoid warnings + */ ++#undef re_compile + #undef USE_DYNAMIC_LOADING + #undef DEBUG + #undef PACKAGE diff --git a/app-editors/nvi/files/nvi-1.81.6-strlen-macro-renaming.patch b/app-editors/nvi/files/nvi-1.81.6-strlen-macro-renaming.patch new file mode 100644 index 000000000000..70a47fd93fd5 --- /dev/null +++ b/app-editors/nvi/files/nvi-1.81.6-strlen-macro-renaming.patch @@ -0,0 +1,499 @@ +Created by: Karl Hakimian +Added by: Jesus Rivero <neurogeek@gentoo.org> +Added on: Feb 18, 2015 +diff -rupN nvi-1.81.6.orig/common/api.c nvi-1.81.6/common/api.c +--- nvi-1.81.6.orig/common/api.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/common/api.c 2015-02-17 11:04:50.199111784 -0800 +@@ -423,7 +423,7 @@ api_opts_get(SCR *sp, CHAR_T *name, char + switch (op->type) { + case OPT_0BOOL: + case OPT_1BOOL: +- MALLOC_RET(sp, *value, char *, STRLEN(op->name) + 2 + 1); ++ MALLOC_RET(sp, *value, char *, NVI_STRLEN(op->name) + 2 + 1); + (void)sprintf(*value, + "%s"WS, O_ISSET(sp, offset) ? "" : "no", op->name); + if (boolvalue != NULL) +diff -rupN nvi-1.81.6.orig/common/msg.c nvi-1.81.6/common/msg.c +--- nvi-1.81.6.orig/common/msg.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/common/msg.c 2015-02-17 11:04:50.203891722 -0800 +@@ -378,7 +378,7 @@ msgq_wstr(SCR *sp, mtype_t mtype, CHAR_T + msgq(sp, mtype, fmt); + return; + } +- INT2CHAR(sp, str, STRLEN(str) + 1, nstr, nlen); ++ INT2CHAR(sp, str, NVI_STRLEN(str) + 1, nstr, nlen); + msgq_str(sp, mtype, nstr, fmt); + } + +diff -rupN nvi-1.81.6.orig/common/multibyte.h nvi-1.81.6/common/multibyte.h +--- nvi-1.81.6.orig/common/multibyte.h 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/common/multibyte.h 2015-02-17 11:04:50.204262910 -0800 +@@ -12,7 +12,7 @@ typedef wchar_t CHAR_T; + typedef u_int UCHAR_T; + #define RCHAR_BIT 24 + +-#define STRLEN wcslen ++#define NVI_STRLEN wcslen + #define STRTOL wcstol + #define STRTOUL wcstoul + #define SPRINTF swprintf +@@ -31,7 +31,7 @@ typedef u_char CHAR_T; + typedef u_char UCHAR_T; + #define RCHAR_BIT CHAR_BIT + +-#define STRLEN strlen ++#define NVI_STRLEN strlen + #define STRTOL strtol + #define STRTOUL strtoul + #define SPRINTF snprintf +diff -rupN nvi-1.81.6.orig/common/options.c nvi-1.81.6/common/options.c +--- nvi-1.81.6.orig/common/options.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/common/options.c 2015-02-17 11:04:50.195900457 -0800 +@@ -315,7 +315,7 @@ opts_init(SCR *sp, int *oargs) + + /* Set numeric and string default values. */ + #define OI(indx, str) { \ +- a.len = STRLEN(str); \ ++ a.len = NVI_STRLEN(str); \ + if ((CHAR_T*)str != b2) /* GCC puts strings in text-space. */ \ + (void)MEMCPY(b2, str, a.len+1); \ + if (opts_set(sp, argv, NULL)) { \ +@@ -620,10 +620,10 @@ opts_set(SCR *sp, ARGS **argv, char *usa + goto badnum; + if ((nret = + nget_uslong(sp, &value, sep, &endp, 10)) != NUM_OK) { +- INT2CHAR(sp, name, STRLEN(name) + 1, ++ INT2CHAR(sp, name, NVI_STRLEN(name) + 1, + np, nlen); + p2 = msg_print(sp, np, &nf); +- INT2CHAR(sp, sep, STRLEN(sep) + 1, ++ INT2CHAR(sp, sep, NVI_STRLEN(sep) + 1, + np, nlen); + t2 = msg_print(sp, np, &nf2); + switch (nret) { +@@ -647,10 +647,10 @@ opts_set(SCR *sp, ARGS **argv, char *usa + break; + } + if (*endp && !ISBLANK(*endp)) { +-badnum: INT2CHAR(sp, name, STRLEN(name) + 1, ++badnum: INT2CHAR(sp, name, NVI_STRLEN(name) + 1, + np, nlen); + p2 = msg_print(sp, np, &nf); +- INT2CHAR(sp, sep, STRLEN(sep) + 1, ++ INT2CHAR(sp, sep, NVI_STRLEN(sep) + 1, + np, nlen); + t2 = msg_print(sp, np, &nf2); + msgq(sp, M_ERR, +@@ -680,7 +680,7 @@ badnum: INT2CHAR(sp, name, STRLEN(nam + break; + + /* Report to subsystems. */ +- INT2CHAR(sp, sep, STRLEN(sep) + 1, np, nlen); ++ INT2CHAR(sp, sep, NVI_STRLEN(sep) + 1, np, nlen); + if (op->func != NULL && + op->func(sp, spo, np, &value) || + ex_optchange(sp, offset, np, &value) || +@@ -712,7 +712,7 @@ badnum: INT2CHAR(sp, name, STRLEN(nam + * Do nothing if the value is unchanged, the underlying + * functions can be expensive. + */ +- INT2CHAR(sp, sep, STRLEN(sep) + 1, np, nlen); ++ INT2CHAR(sp, sep, NVI_STRLEN(sep) + 1, np, nlen); + if (!F_ISSET(op, OPT_ALWAYS) && + O_STR(sp, offset) != NULL && + !strcmp(O_STR(sp, offset), np)) +@@ -879,7 +879,7 @@ opts_dump(SCR *sp, enum optdisp type) + } + F_CLR(&sp->opts[cnt], OPT_SELECTED); + +- curlen = STRLEN(op->name); ++ curlen = NVI_STRLEN(op->name); + switch (op->type) { + case OPT_0BOOL: + case OPT_1BOOL: +@@ -1049,7 +1049,7 @@ opts_search(CHAR_T *name) + * Check to see if the name is the prefix of one (and only one) + * option. If so, return the option. + */ +- len = STRLEN(name); ++ len = NVI_STRLEN(name); + for (found = NULL, op = optlist; op->name != NULL; ++op) { + if (op->name[0] < name[0]) + continue; +diff -rupN nvi-1.81.6.orig/dist/tags nvi-1.81.6/dist/tags +--- nvi-1.81.6.orig/dist/tags 2007-11-18 08:43:55.000000000 -0800 ++++ nvi-1.81.6/dist/tags 2015-02-17 11:04:50.225314084 -0800 +@@ -1068,8 +1068,8 @@ SPRINTF ../common/multibyte.h 37;" d + STANDARD_TAB ../common/key.h 213;" d + STRCMP ../common/multibyte.h 19;" d + STRCMP ../common/multibyte.h 38;" d +-STRLEN ../common/multibyte.h 15;" d +-STRLEN ../common/multibyte.h 34;" d ++NVI_STRLEN ../common/multibyte.h 15;" d ++NVI_STRLEN ../common/multibyte.h 34;" d + STRPBRK ../common/multibyte.h 20;" d + STRPBRK ../common/multibyte.h 39;" d + STRSET ../common/multibyte.h 22;" d +diff -rupN nvi-1.81.6.orig/ex/ex_argv.c nvi-1.81.6/ex/ex_argv.c +--- nvi-1.81.6.orig/ex/ex_argv.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/ex/ex_argv.c 2015-02-17 11:04:50.267171388 -0800 +@@ -217,7 +217,7 @@ argv_exp2(SCR *sp, EXCMD *excp, CHAR_T * + + *p = '\0'; + INT2CHAR(sp, bp + SHELLOFFSET, +- STRLEN(bp + SHELLOFFSET) + 1, np, nlen); ++ NVI_STRLEN(bp + SHELLOFFSET) + 1, np, nlen); + d = strdup(np); + rval = argv_lexp(sp, excp, d); + free (d); +@@ -332,7 +332,7 @@ argv_fexp(SCR *sp, EXCMD *excp, CHAR_T * + "115|No previous command to replace \"!\""); + return (1); + } +- len += tlen = STRLEN(exp->lastbcomm); ++ len += tlen = NVI_STRLEN(exp->lastbcomm); + off = p - bp; + ADD_SPACE_RETW(sp, bp, blen, len); + p = bp + off; +@@ -683,7 +683,7 @@ err: if (ifp != NULL) + * XXX + * Assume that all shells have -c. + */ +- INT2CHAR(sp, bp, STRLEN(bp)+1, np, nlen); ++ INT2CHAR(sp, bp, NVI_STRLEN(bp)+1, np, nlen); + execl(sh_path, sh, "-c", np, (char *)NULL); + msgq_str(sp, M_SYSERR, sh_path, "118|Error: execl: %s"); + _exit(127); +diff -rupN nvi-1.81.6.orig/ex/ex_cscope.c nvi-1.81.6/ex/ex_cscope.c +--- nvi-1.81.6.orig/ex/ex_cscope.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/ex/ex_cscope.c 2015-02-17 11:04:50.261539058 -0800 +@@ -140,7 +140,7 @@ ex_cscope(SCR *sp, EXCMD *cmdp) + for (; *p && isspace(*p); ++p); + } + +- INT2CHAR(sp, cmd, STRLEN(cmd) + 1, np, nlen); ++ INT2CHAR(sp, cmd, NVI_STRLEN(cmd) + 1, np, nlen); + if ((ccp = lookup_ccmd(np)) == NULL) { + usage: msgq(sp, M_ERR, "309|Use \"cscope help\" for help"); + return (1); +@@ -214,7 +214,7 @@ cscope_add(SCR *sp, EXCMD *cmdp, CHAR_T + * >1 additional args: object, too many args. + */ + cur_argc = cmdp->argc; +- if (argv_exp2(sp, cmdp, dname, STRLEN(dname))) { ++ if (argv_exp2(sp, cmdp, dname, NVI_STRLEN(dname))) { + return (1); + } + if (cmdp->argc == cur_argc) { +@@ -228,7 +228,7 @@ cscope_add(SCR *sp, EXCMD *cmdp, CHAR_T + return (1); + } + +- INT2CHAR(sp, dname, STRLEN(dname)+1, np, nlen); ++ INT2CHAR(sp, dname, NVI_STRLEN(dname)+1, np, nlen); + + /* + * The user can specify a specific file (so they can have multiple +@@ -471,7 +471,7 @@ cscope_find(SCR *sp, EXCMD *cmdp, CHAR_T + } + + /* Create the cscope command. */ +- INT2CHAR(sp, pattern, STRLEN(pattern) + 1, np, nlen); ++ INT2CHAR(sp, pattern, NVI_STRLEN(pattern) + 1, np, nlen); + np = strdup(np); + if ((tqp = create_cs_cmd(sp, np, &search)) == NULL) + goto err; +@@ -801,7 +801,7 @@ cscope_help(SCR *sp, EXCMD *cmdp, CHAR_T + char *np; + size_t nlen; + +- INT2CHAR(sp, subcmd, STRLEN(subcmd) + 1, np, nlen); ++ INT2CHAR(sp, subcmd, NVI_STRLEN(subcmd) + 1, np, nlen); + return (csc_help(sp, np)); + } + +@@ -842,7 +842,7 @@ cscope_kill(SCR *sp, EXCMD *cmdp, CHAR_T + char *np; + size_t nlen; + +- INT2CHAR(sp, cn, STRLEN(cn) + 1, np, nlen); ++ INT2CHAR(sp, cn, NVI_STRLEN(cn) + 1, np, nlen); + return (terminate(sp, NULL, atoi(np))); + } + +diff -rupN nvi-1.81.6.orig/ex/ex_filter.c nvi-1.81.6/ex/ex_filter.c +--- nvi-1.81.6.orig/ex/ex_filter.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/ex/ex_filter.c 2015-02-17 11:04:50.263257613 -0800 +@@ -138,7 +138,7 @@ err: if (input[0] != -1) + else + ++name; + +- INT2SYS(sp, cmd, STRLEN(cmd)+1, np, nlen); ++ INT2SYS(sp, cmd, NVI_STRLEN(cmd)+1, np, nlen); + execl(O_STR(sp, O_SHELL), name, "-c", np, (char *)NULL); + msgq_str(sp, M_SYSERR, O_STR(sp, O_SHELL), "execl: %s"); + _exit (127); +@@ -283,7 +283,7 @@ err: if (input[0] != -1) + * Ignore errors on vi file reads, to make reads prettier. It's + * completely inconsistent, and historic practice. + */ +-uwait: INT2CHAR(sp, cmd, STRLEN(cmd) + 1, np, nlen); ++uwait: INT2CHAR(sp, cmd, NVI_STRLEN(cmd) + 1, np, nlen); + return (proc_wait(sp, (long)utility_pid, np, + ftype == FILTER_READ && F_ISSET(sp, SC_VI) ? 1 : 0, 0) || rval); + } +diff -rupN nvi-1.81.6.orig/ex/ex_init.c nvi-1.81.6/ex/ex_init.c +--- nvi-1.81.6.orig/ex/ex_init.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/ex/ex_init.c 2015-02-17 11:04:50.279419412 -0800 +@@ -61,7 +61,7 @@ ex_screen_copy(SCR *orig, SCR *sp) + + if (oexp->lastbcomm != NULL && + (nexp->lastbcomm = v_wstrdup(sp, oexp->lastbcomm, +- STRLEN(oexp->lastbcomm))) == NULL) { ++ NVI_STRLEN(oexp->lastbcomm))) == NULL) { + msgq(sp, M_SYSERR, NULL); + return(1); + } +diff -rupN nvi-1.81.6.orig/ex/ex_tag.c nvi-1.81.6/ex/ex_tag.c +--- nvi-1.81.6.orig/ex/ex_tag.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/ex/ex_tag.c 2015-02-17 11:04:50.275254557 -0800 +@@ -68,7 +68,7 @@ ex_tag_first(SCR *sp, CHAR_T *tagarg) + + /* Build an argument for the ex :tag command. */ + ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0); +- argv_exp0(sp, &cmd, tagarg, STRLEN(tagarg)); ++ argv_exp0(sp, &cmd, tagarg, NVI_STRLEN(tagarg)); + + /* + * XXX +@@ -115,7 +115,7 @@ ex_tag_push(SCR *sp, EXCMD *cmdp) + + /* Taglength may limit the number of characters. */ + if ((tl = +- O_VAL(sp, O_TAGLENGTH)) != 0 && STRLEN(exp->tag_last) > tl) ++ O_VAL(sp, O_TAGLENGTH)) != 0 && NVI_STRLEN(exp->tag_last) > tl) + exp->tag_last[tl] = '\0'; + break; + case 0: +@@ -587,7 +587,7 @@ ex_tag_copy(SCR *orig, SCR *sp) + /* Copy the last tag. */ + if (oexp->tag_last != NULL && + (nexp->tag_last = v_wstrdup(sp, oexp->tag_last, +- STRLEN(oexp->tag_last))) == NULL) { ++ NVI_STRLEN(oexp->tag_last))) == NULL) { + msgq(sp, M_SYSERR, NULL); + return (1); + } +@@ -997,7 +997,7 @@ ctag_slist(SCR *sp, CHAR_T *tag) + exp = EXP(sp); + + /* Allocate and initialize the tag queue structure. */ +- INT2CHAR(sp, tag, STRLEN(tag) + 1, np, nlen); ++ INT2CHAR(sp, tag, NVI_STRLEN(tag) + 1, np, nlen); + len = nlen - 1; + CALLOC_GOTO(sp, tqp, TAGQ *, 1, sizeof(TAGQ) + len + 1); + CIRCLEQ_INIT(&tqp->tagq); +diff -rupN nvi-1.81.6.orig/ex/ex_util.c nvi-1.81.6/ex/ex_util.c +--- nvi-1.81.6.orig/ex/ex_util.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/ex/ex_util.c 2015-02-17 11:04:50.268378054 -0800 +@@ -153,7 +153,7 @@ ex_wemsg(SCR* sp, CHAR_T *p, exm_t which + char *np; + size_t nlen; + +- if (p) INT2CHAR(sp, p, STRLEN(p), np, nlen); ++ if (p) INT2CHAR(sp, p, NVI_STRLEN(p), np, nlen); + else np = NULL; + ex_emsg(sp, np, which); + } +diff -rupN nvi-1.81.6.orig/ex/ex_write.c nvi-1.81.6/ex/ex_write.c +--- nvi-1.81.6.orig/ex/ex_write.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/ex/ex_write.c 2015-02-17 11:04:50.277249383 -0800 +@@ -158,7 +158,7 @@ exwr(SCR *sp, EXCMD *cmdp, enum which cm + ex_emsg(sp, cmdp->cmd->usage, EXM_USAGE); + return (1); + } +- if (argv_exp1(sp, cmdp, p, STRLEN(p), 1)) ++ if (argv_exp1(sp, cmdp, p, NVI_STRLEN(p), 1)) + return (1); + + /* +@@ -203,7 +203,7 @@ exwr(SCR *sp, EXCMD *cmdp, enum which cm + &cmdp->addr1, &cmdp->addr2, NULL, flags)); + + /* Build an argv so we get an argument count and file expansion. */ +- if (argv_exp2(sp, cmdp, p, STRLEN(p))) ++ if (argv_exp2(sp, cmdp, p, NVI_STRLEN(p))) + return (1); + + /* +@@ -255,7 +255,7 @@ exwr(SCR *sp, EXCMD *cmdp, enum which cm + set_alt_name(sp, name); + break; + default: +- INT2CHAR(sp, p, STRLEN(p) + 1, n, nlen); ++ INT2CHAR(sp, p, NVI_STRLEN(p) + 1, n, nlen); + ex_emsg(sp, n, EXM_FILECOUNT); + return (1); + } +diff -rupN nvi-1.81.6.orig/ip/ip_term.c nvi-1.81.6/ip/ip_term.c +--- nvi-1.81.6.orig/ip/ip_term.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/ip/ip_term.c 2015-02-17 11:04:50.280203225 -0800 +@@ -127,7 +127,7 @@ ip_optchange(SCR *sp, int offset, char * + + ipb.code = SI_EDITOPT; + ipb.str1 = (char*)opt->name; +- ipb.len1 = STRLEN(opt->name) * sizeof(CHAR_T); ++ ipb.len1 = NVI_STRLEN(opt->name) * sizeof(CHAR_T); + + (void)vi_send(ipp->o_fd, "ab1", &ipb); + return (0); +diff -rupN nvi-1.81.6.orig/perl_api/perl.xs nvi-1.81.6/perl_api/perl.xs +--- nvi-1.81.6.orig/perl_api/perl.xs 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/perl_api/perl.xs 2015-02-17 11:04:50.189684363 -0800 +@@ -326,7 +326,7 @@ perl_ex_perl(scrp, cmdp, cmdlen, f_lno, + newVIrv(pp->svid, scrp); + + istat = signal(SIGINT, my_sighandler); +- INT2CHAR(scrp, cmdp, STRLEN(cmdp)+1, np, nlen); ++ INT2CHAR(scrp, cmdp, NVI_STRLEN(cmdp)+1, np, nlen); + perl_eval(np); + signal(SIGINT, istat); + +@@ -421,7 +421,7 @@ perl_ex_perldo(scrp, cmdp, cmdlen, f_lno + /* Backwards compatibility. */ + newVIrv(pp->svid, scrp); + +- INT2CHAR(scrp, cmdp, STRLEN(cmdp)+1, np, nlen); ++ INT2CHAR(scrp, cmdp, NVI_STRLEN(cmdp)+1, np, nlen); + if (!(command = malloc(length = nlen - 1 + sizeof("sub {}")))) + return 1; + snprintf(command, length, "sub {%s}", np); +diff -rupN nvi-1.81.6.orig/regex/engine.c nvi-1.81.6/regex/engine.c +--- nvi-1.81.6.orig/regex/engine.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/regex/engine.c 2015-02-17 11:04:50.181456859 -0800 +@@ -161,7 +161,7 @@ int eflags; + stop = string + pmatch[0].rm_eo; + } else { + start = string; +- stop = start + STRLEN(start); ++ stop = start + NVI_STRLEN(start); + } + if (stop < start) + return(REG_INVARG); +diff -rupN nvi-1.81.6.orig/regex/regcomp.c nvi-1.81.6/regex/regcomp.c +--- nvi-1.81.6.orig/regex/regcomp.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/regex/regcomp.c 2015-02-17 11:04:50.175705539 -0800 +@@ -198,7 +198,7 @@ regcomp(regex_t *preg, const RCHAR_T *pa + return(REG_INVARG); + len = preg->re_endp - pattern; + } else +- len = STRLEN(pattern); ++ len = NVI_STRLEN(pattern); + + /* do the mallocs early so failure handling is easy */ + g = (struct re_guts *)malloc(sizeof(struct re_guts) + +@@ -818,7 +818,7 @@ p_b_cclass(register struct parse *p, reg + NEXT(); + len = p->next - sp; + for (cp = cclasses; cp->name != NULL; cp++) +- if (STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len)) ++ if (NVI_STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len)) + break; + if (cp->name == NULL) { + /* oops, didn't find it */ +@@ -889,7 +889,7 @@ p_b_coll_elem(register struct parse *p, + } + len = p->next - sp; + for (cp = cnames; cp->name != NULL; cp++) +- if (STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len)) ++ if (NVI_STRLEN(cp->name) == len && MEMCMP(cp->name, sp, len)) + return(cp->code); /* known name */ + if (len == 1) + return(*sp); /* single character */ +diff -rupN nvi-1.81.6.orig/vi/v_event.c nvi-1.81.6/vi/v_event.c +--- nvi-1.81.6.orig/vi/v_event.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/vi/v_event.c 2015-02-17 11:04:50.242966563 -0800 +@@ -97,7 +97,7 @@ v_editopt(SCR *sp, VICMD *vp) + size_t nlen; + char *p2; + +- INT2CHAR(sp, vp->ev.e_str2, STRLEN(vp->ev.e_str2)+1, np, nlen); ++ INT2CHAR(sp, vp->ev.e_str2, NVI_STRLEN(vp->ev.e_str2)+1, np, nlen); + p2 = strdup(np); + rval = api_opts_set(sp, vp->ev.e_str1, p2, + vp->ev.e_val1, vp->ev.e_val1); +@@ -135,7 +135,7 @@ v_tag(SCR *sp, VICMD *vp) + return (1); + + ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0); +- argv_exp0(sp, &cmd, VIP(sp)->keyw, STRLEN(VIP(sp)->keyw)); ++ argv_exp0(sp, &cmd, VIP(sp)->keyw, NVI_STRLEN(VIP(sp)->keyw)); + return (v_exec_ex(sp, vp, &cmd)); + } + +@@ -167,7 +167,7 @@ v_tagsplit(SCR *sp, VICMD *vp) + + ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, OOBLNO, 0); + F_SET(&cmd, E_NEWSCREEN); +- argv_exp0(sp, &cmd, VIP(sp)->keyw, STRLEN(VIP(sp)->keyw)); ++ argv_exp0(sp, &cmd, VIP(sp)->keyw, NVI_STRLEN(VIP(sp)->keyw)); + return (v_exec_ex(sp, vp, &cmd)); + } + +diff -rupN nvi-1.81.6.orig/vi/v_ex.c nvi-1.81.6/vi/v_ex.c +--- nvi-1.81.6.orig/vi/v_ex.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/vi/v_ex.c 2015-02-17 11:04:50.246380280 -0800 +@@ -210,7 +210,7 @@ v_tagpush(SCR *sp, VICMD *vp) + EXCMD cmd; + + ex_cinit(sp, &cmd, C_TAG, 0, OOBLNO, 0, 0); +- argv_exp0(sp, &cmd, VIP(sp)->keyw, STRLEN(VIP(sp)->keyw) + 1); ++ argv_exp0(sp, &cmd, VIP(sp)->keyw, NVI_STRLEN(VIP(sp)->keyw) + 1); + return (v_exec_ex(sp, vp, &cmd)); + } + +diff -rupN nvi-1.81.6.orig/vi/vs_msg.c nvi-1.81.6/vi/vs_msg.c +--- nvi-1.81.6.orig/vi/vs_msg.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/vi/vs_msg.c 2015-02-17 11:04:50.251093618 -0800 +@@ -175,7 +175,7 @@ vs_update(SCR *sp, const char *m1, const + */ + if (F_ISSET(sp, SC_SCR_EXWROTE)) { + if (m2 != NULL) +- INT2CHAR(sp, m2, STRLEN(m2) + 1, np, nlen); ++ INT2CHAR(sp, m2, NVI_STRLEN(m2) + 1, np, nlen); + (void)ex_printf(sp, + "%s\n", m1 == NULL? "" : m1, m2 == NULL ? "" : np); + (void)ex_fflush(sp); +@@ -203,7 +203,7 @@ vs_update(SCR *sp, const char *m1, const + } else + len = 0; + if (m2 != NULL) { +- mlen = STRLEN(m2); ++ mlen = NVI_STRLEN(m2); + if (len + mlen > sp->cols - 2) + mlen = (sp->cols - 2) - len; + (void)gp->scr_waddstr(sp, m2, mlen); +diff -rupN nvi-1.81.6.orig/vi/vs_split.c nvi-1.81.6/vi/vs_split.c +--- nvi-1.81.6.orig/vi/vs_split.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/vi/vs_split.c 2015-02-17 11:04:50.256136584 -0800 +@@ -628,7 +628,7 @@ vs_fg(SCR *sp, SCR **nspp, CHAR_T *name, + wp = sp->wp; + + if (name) +- INT2CHAR(sp, name, STRLEN(name) + 1, np, nlen); ++ INT2CHAR(sp, name, NVI_STRLEN(name) + 1, np, nlen); + else + np = NULL; + if (newscreen) +diff -rupN nvi-1.81.6.orig/vi/v_txt.c nvi-1.81.6/vi/v_txt.c +--- nvi-1.81.6.orig/vi/v_txt.c 2007-11-18 08:41:42.000000000 -0800 ++++ nvi-1.81.6/vi/v_txt.c 2015-02-17 11:04:50.240596567 -0800 +@@ -2049,7 +2049,7 @@ retry: for (len = 0, + return (0); + case 1: /* One match. */ + /* If something changed, do the exchange. */ +- nlen = STRLEN(cmd.argv[0]->bp); ++ nlen = NVI_STRLEN(cmd.argv[0]->bp); + if (len != nlen || MEMCMP(cmd.argv[0]->bp, p, len)) + break; + diff --git a/app-editors/nvi/files/nvi-1.81.6-use_pkgconfig_for_ncurses.patch b/app-editors/nvi/files/nvi-1.81.6-use_pkgconfig_for_ncurses.patch new file mode 100644 index 000000000000..a9bf7e0a06a4 --- /dev/null +++ b/app-editors/nvi/files/nvi-1.81.6-use_pkgconfig_for_ncurses.patch @@ -0,0 +1,30 @@ +diff -uNr nvi-1.81.6.orig/dist/configure.in nvi-1.81.6/dist/configure.in +--- nvi-1.81.6.orig/dist/configure.in 2013-07-09 17:17:35.000000000 -0400 ++++ nvi-1.81.6/dist/configure.in 2013-07-09 17:18:48.000000000 -0400 +@@ -263,11 +263,13 @@ + [ --enable-gtk Build a Gtk front-end for vi.], + [vi_cv_gtk=$enableval], [vi_cv_gtk="no"]) + AC_MSG_RESULT($vi_cv_gtk) ++ ++# ++# Find pkg-config ++# ++AC_PATH_PROG(PKG_CONFIG, pkg-config, no) ++ + if test "$vi_cv_gtk" = "yes"; then +- # +- # Find pkg-config +- # +- AC_PATH_PROG(PKG_CONFIG, pkg-config, no) + if test x$PKG_CONFIG = xno ; then + if test "$vi_cv_widechar" = "yes"; then + AC_MSG_ERROR( +@@ -531,7 +533,7 @@ + [CURSHEADER=ncursesw/ncurses.h]) + fi + vi_programs="vi $vi_programs" +- CURSLIBS="-l$vi_cv_curses" ++ CURSLIBS=`$PKG_CONFIG --libs $vi_cv_curses` + else + AC_MSG_WARN([*** No suitable curses library found.]) + if test "$vi_programs"X = X; then diff --git a/app-editors/nvi/metadata.xml b/app-editors/nvi/metadata.xml new file mode 100644 index 000000000000..5215b05de14e --- /dev/null +++ b/app-editors/nvi/metadata.xml @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer> + <email>neurogeek@gentoo.org</email> + <name>Jesus Rivero</name> + </maintainer> +</pkgmetadata> diff --git a/app-editors/nvi/nvi-1.81.6-r3.ebuild b/app-editors/nvi/nvi-1.81.6-r3.ebuild new file mode 100644 index 000000000000..3e3e6e6c1c54 --- /dev/null +++ b/app-editors/nvi/nvi-1.81.6-r3.ebuild @@ -0,0 +1,90 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools db-use eutils flag-o-matic + +DBVERS="4.8.30 4.7 4.6 4.5 4.4 4.3 4.2" +DBSLOTS= +DBDEPENDS= +for DBVER in ${DBVERS} +do + if [[ ${DBVER} = *.*.* ]]; then + DBSLOTS="${DBSLOTS} ${DBVER%.*}" + DBDEPENDS="${DBDEPENDS} >=sys-libs/db-${DBVER}:${DBVER%.*}" + else + DBSLOTS="${DBSLOTS} ${DBVER}" + DBDEPENDS="${DBDEPENDS} sys-libs/db:${DBVER}" + fi +done + +DESCRIPTION="Vi clone" +HOMEPAGE="https://sites.google.com/a/bostic.com/keithbostic/nvi" +SRC_URI="http://garage.linux.student.kuleuven.be/~skimo/nvi/devel/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86" +IUSE="perl tcl unicode" + +DEPEND="|| ( ${DBDEPENDS} ) + >=sys-libs/ncurses-5.6-r2[tinfo] + perl? ( dev-lang/perl ) + tcl? ( !unicode? ( >=dev-lang/tcl-8.5:0 ) )" +RDEPEND="${DEPEND} + app-eselect/eselect-vi" + +S=${WORKDIR}/${P}/build.unix + +pkg_setup() { + if use tcl && use unicode + then + ewarn "nvi does not support tcl+unicode. tcl support will not be included." + ewarn "If you need tcl support, please disable the unicode flag." + fi +} + +src_prepare() { + epatch "${FILESDIR}"/${P}-db44.patch + epatch "${FILESDIR}"/${P}-db.patch + epatch "${FILESDIR}"/${P}-perl-as-needed.patch + epatch "${FILESDIR}"/${P}-perl-shortnames.patch + cd dist || die + chmod +x findconfig || die + append-flags -I"$(db_includedir ${DBSLOTS})" + sed -i -e "s@-ldb@-l$(db_libname ${DBSLOTS})@" configure.in || die + rm -f configure || die + eautoreconf -Im4 +} + +src_compile() { + local myconf + + use perl && myconf="${myconf} --enable-perlinterp" + use tcl && ! use unicode && myconf="${myconf} --enable-tclinterp" + use unicode && myconf="${myconf} --enable-widechar" + + append-flags '-D_PATH_MSGCAT="\"/usr/share/vi/catalog/\""' + + ECONF_SOURCE=../dist econf \ + --program-prefix=n \ + ${myconf} \ + || die "configure failed" + emake OPTFLAG="${CFLAGS}" || die "make failed" +} + +src_install() { + emake -j1 DESTDIR="${D}" install || die "install failed" +} + +pkg_postinst() { + einfo "Setting /usr/bin/vi symlink" + eselect vi update --if-unset +} + +pkg_postrm() { + einfo "Updating /usr/bin/vi symlink" + eselect vi update --if-unset +} diff --git a/app-editors/nvi/nvi-1.81.6-r4.ebuild b/app-editors/nvi/nvi-1.81.6-r4.ebuild new file mode 100644 index 000000000000..098fb97f97f4 --- /dev/null +++ b/app-editors/nvi/nvi-1.81.6-r4.ebuild @@ -0,0 +1,101 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools db-use eutils flag-o-matic + +DBVERS="4.8.30 4.7 4.6 4.5 4.4 4.3 4.2" +DBSLOTS= +DBDEPENDS= +for DBVER in ${DBVERS} +do + if [[ ${DBVER} = *.*.* ]]; then + DBSLOTS="${DBSLOTS} ${DBVER%.*}" + DBDEPENDS="${DBDEPENDS} >=sys-libs/db-${DBVER}:${DBVER%.*}" + else + DBSLOTS="${DBSLOTS} ${DBVER}" + DBDEPENDS="${DBDEPENDS} sys-libs/db:${DBVER}" + fi +done + +DESCRIPTION="Vi clone" +HOMEPAGE="https://sites.google.com/a/bostic.com/keithbostic/vi" +SRC_URI="http://garage.linux.student.kuleuven.be/~skimo/nvi/devel/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="alpha amd64 hppa ~mips ppc ppc64 sparc x86" +IUSE="perl tcl unicode" + +CDEPEND="|| ( ${DBDEPENDS} ) + >=sys-libs/ncurses-5.6-r2 + perl? ( dev-lang/perl ) + tcl? ( !unicode? ( >=dev-lang/tcl-8.5:0 ) )" + +DEPEND="${CDEPEND} + virtual/pkgconfig" + +RDEPEND="${CDEPEND} + app-eselect/eselect-vi" + +REQUIRED_USE="tcl? ( !unicode )" + +src_prepare() { + + epatch "${FILESDIR}"/${P}-db44.patch + epatch "${FILESDIR}"/${P}-db.patch + epatch "${FILESDIR}"/${P}-perl-as-needed.patch + epatch "${FILESDIR}"/${P}-perl-shortnames.patch + epatch "${FILESDIR}"/${P}-ac_config_header.patch + epatch "${FILESDIR}"/${P}-use_pkgconfig_for_ncurses.patch + + cd dist || die + chmod +x findconfig || die + + append-cppflags -I"$(db_includedir ${DBSLOTS})" + + sed -i -e "s@-ldb@-l$(db_libname ${DBSLOTS})@" configure.in || die + rm -f configure || die + eautoreconf -Im4 +} + +src_configure() { + local myconf + + use perl && myconf="${myconf} --enable-perlinterp" + use unicode && myconf="${myconf} --enable-widechar" + use tcl && ! use unicode && myconf="${myconf} --enable-tclinterp" + + append-cppflags '-D_PATH_MSGCAT="\"/usr/share/vi/catalog/\""' + + pushd dist 2>/dev/null + econf \ + --program-prefix=n \ + ${myconf} \ + || die "configure failed" + popd 2>/dev/null +} + +src_compile() { + pushd dist 2>/dev/null + emake || die "make failed" + popd 2>/dev/null +} + +src_install() { + pushd dist 2>/dev/null + emake -j1 DESTDIR="${D}" install || die "install failed" + popd 2>/dev/null +} + +pkg_postinst() { + einfo "Setting /usr/bin/vi symlink" + eselect vi update --if-unset +} + +pkg_postrm() { + einfo "Updating /usr/bin/vi symlink" + eselect vi update --if-unset +} diff --git a/app-editors/nvi/nvi-1.81.6-r5.ebuild b/app-editors/nvi/nvi-1.81.6-r5.ebuild new file mode 100644 index 000000000000..7fd00133f989 --- /dev/null +++ b/app-editors/nvi/nvi-1.81.6-r5.ebuild @@ -0,0 +1,102 @@ +# Copyright 1999-2015 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=4 + +inherit autotools db-use eutils flag-o-matic + +DBVERS="4.8.30 4.7 4.6 4.5 4.4 4.3 4.2" +DBSLOTS= +DBDEPENDS= +for DBVER in ${DBVERS} +do + if [[ ${DBVER} = *.*.* ]]; then + DBSLOTS="${DBSLOTS} ${DBVER%.*}" + DBDEPENDS="${DBDEPENDS} >=sys-libs/db-${DBVER}:${DBVER%.*}" + else + DBSLOTS="${DBSLOTS} ${DBVER}" + DBDEPENDS="${DBDEPENDS} sys-libs/db:${DBVER}" + fi +done + +DESCRIPTION="Vi clone" +HOMEPAGE="https://sites.google.com/a/bostic.com/keithbostic/vi" +SRC_URI="http://garage.linux.student.kuleuven.be/~skimo/nvi/devel/${P}.tar.bz2" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~mips ~ppc ~ppc64 ~sparc ~x86" +IUSE="perl tcl unicode" + +CDEPEND="|| ( ${DBDEPENDS} ) + >=sys-libs/ncurses-5.6-r2 + perl? ( dev-lang/perl ) + tcl? ( !unicode? ( >=dev-lang/tcl-8.5:0 ) )" + +DEPEND="${CDEPEND} + virtual/pkgconfig" + +RDEPEND="${CDEPEND} + app-eselect/eselect-vi" + +REQUIRED_USE="tcl? ( !unicode )" + +src_prepare() { + + epatch "${FILESDIR}"/${P}-strlen-macro-renaming.patch + epatch "${FILESDIR}"/${P}-db44.patch + epatch "${FILESDIR}"/${P}-db.patch + epatch "${FILESDIR}"/${P}-perl-as-needed.patch + epatch "${FILESDIR}"/${P}-perl-shortnames.patch + epatch "${FILESDIR}"/${P}-ac_config_header.patch + epatch "${FILESDIR}"/${P}-use_pkgconfig_for_ncurses.patch + + cd dist || die + chmod +x findconfig || die + + append-cppflags -I"$(db_includedir ${DBSLOTS})" + + sed -i -e "s@-ldb@-l$(db_libname ${DBSLOTS})@" configure.in || die + rm -f configure || die + eautoreconf -Im4 +} + +src_configure() { + local myconf + + use perl && myconf="${myconf} --enable-perlinterp" + use unicode && myconf="${myconf} --enable-widechar" + use tcl && ! use unicode && myconf="${myconf} --enable-tclinterp" + + append-cppflags '-D_PATH_MSGCAT="\"/usr/share/vi/catalog/\""' + + pushd dist 2>/dev/null + econf \ + --program-prefix=n \ + ${myconf} \ + || die "configure failed" + popd 2>/dev/null +} + +src_compile() { + pushd dist 2>/dev/null + emake || die "make failed" + popd 2>/dev/null +} + +src_install() { + pushd dist 2>/dev/null + emake -j1 DESTDIR="${D}" install || die "install failed" + popd 2>/dev/null +} + +pkg_postinst() { + einfo "Setting /usr/bin/vi symlink" + eselect vi update --if-unset +} + +pkg_postrm() { + einfo "Updating /usr/bin/vi symlink" + eselect vi update --if-unset +} |