diff options
-rw-r--r-- | development/nvi/nvi.SlackBuild | 5 | ||||
-rw-r--r-- | development/nvi/nvi.info | 4 | ||||
-rw-r--r-- | development/nvi/patches/nvi.diffs | 28 |
3 files changed, 34 insertions, 3 deletions
diff --git a/development/nvi/nvi.SlackBuild b/development/nvi/nvi.SlackBuild index 13ef3627c3..999002e46e 100644 --- a/development/nvi/nvi.SlackBuild +++ b/development/nvi/nvi.SlackBuild @@ -24,7 +24,7 @@ PRGNAM=nvi VERSION=${VERSION:-1.81.6} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} if [ -z "$ARCH" ]; then @@ -70,6 +70,9 @@ find -L . \ \( -perm 666 -o -perm 664 -o -perm 600 -o -perm 444 -o -perm 440 -o -perm 400 \) \ -exec chmod 644 {} \; +# Apply patches to eliminate bogus "DB_CREATE must be specified to create databases." error message on exit +patch -p1 < $CWD/patches/nvi.diffs + cd build.unix CFLAGS="$SLKCFLAGS" \ ../dist/configure \ diff --git a/development/nvi/nvi.info b/development/nvi/nvi.info index fe2e96598a..358c0fa50b 100644 --- a/development/nvi/nvi.info +++ b/development/nvi/nvi.info @@ -6,5 +6,5 @@ MD5SUM="88d1e23115ee9f2961186b62e55f5704" DOWNLOAD_x86_64="" MD5SUM_x86_64="" REQUIRES="" -MAINTAINER="Robby Workman" -EMAIL="rworkman@slackbuilds.org" +MAINTAINER="Don Allen" +EMAIL="donaldcallen@gmail.com" diff --git a/development/nvi/patches/nvi.diffs b/development/nvi/patches/nvi.diffs new file mode 100644 index 0000000000..98a45861e7 --- /dev/null +++ b/development/nvi/patches/nvi.diffs @@ -0,0 +1,28 @@ +diff -up nvi-1.81.6/common/db.h patched-nvi-1.81.6/common/db.h +--- nvi-1.81.6/common/db.h 2007-11-18 11:41:42.000000000 -0500 ++++ patched-nvi-1.81.6/common/db.h 2014-10-04 08:53:11.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 +diff -up nvi-1.81.6/common/msg.c patched-nvi-1.81.6/common/msg.c +--- nvi-1.81.6/common/msg.c 2007-11-18 11:41:42.000000000 -0500 ++++ patched-nvi-1.81.6/common/msg.c 2014-10-04 08:55:13.000000000 -0400 +@@ -724,7 +724,8 @@ msg_open(SCR *sp, char *file) + 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) { |