summaryrefslogtreecommitdiff
path: root/security
diff options
context:
space:
mode:
authorkhorben <khorben@pkgsrc.org>2014-12-09 13:26:40 +0000
committerkhorben <khorben@pkgsrc.org>2014-12-09 13:26:40 +0000
commit22d629e40c997e1dd39f90f10ab9a4e6571e912c (patch)
treeeb6a37805b71c4e3df38cebb5502f18e4241b1c5 /security
parent02e393a1b1d37ec1b11b2864e2b2d212e4bb4d1f (diff)
downloadpkgsrc-22d629e40c997e1dd39f90f10ab9a4e6571e912c.tar.gz
Fixed the default path to "userdb.txt" in pepack(1) (for pkg/49458)
Diffstat (limited to 'security')
-rw-r--r--security/pev/Makefile3
-rw-r--r--security/pev/distinfo5
-rw-r--r--security/pev/patches/patch-src_Makefile14
-rw-r--r--security/pev/patches/patch-src_pepack.c29
4 files changed, 45 insertions, 6 deletions
diff --git a/security/pev/Makefile b/security/pev/Makefile
index b3a3dedb3e3..5fe853b8bdc 100644
--- a/security/pev/Makefile
+++ b/security/pev/Makefile
@@ -1,7 +1,8 @@
-# $NetBSD: Makefile,v 1.1 2014/08/02 14:11:08 khorben Exp $
+# $NetBSD: Makefile,v 1.2 2014/12/09 13:26:40 khorben Exp $
#
DISTNAME= pev-0.60
+PKGREVISION= 1
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=pev/}
diff --git a/security/pev/distinfo b/security/pev/distinfo
index bee7b0a338f..5fa0d5ffdbc 100644
--- a/security/pev/distinfo
+++ b/security/pev/distinfo
@@ -1,7 +1,8 @@
-$NetBSD: distinfo,v 1.2 2014/08/06 11:07:30 khorben Exp $
+$NetBSD: distinfo,v 1.3 2014/12/09 13:26:40 khorben Exp $
SHA1 (pev-0.60.tar.gz) = 8d5e0bafb6dd4da0dcda6837928ad4babb6c8a94
RMD160 (pev-0.60.tar.gz) = f585355f5971e72f208b56ad0db1ca8ba603f3cd
Size (pev-0.60.tar.gz) = 212932 bytes
SHA1 (patch-lib_libpe_Makefile) = 5adf4a60f3320da9deddf74a740dd152b1810f0a
-SHA1 (patch-src_Makefile) = f8b1a5e33820626b4afad487b50ec184239db3bf
+SHA1 (patch-src_Makefile) = 3a2aed9ed69b4ce0e6a297d39eb81010f24cab48
+SHA1 (patch-src_pepack.c) = 189b2c40a72453e3b1f3cc6efbbebda373bb37b0
diff --git a/security/pev/patches/patch-src_Makefile b/security/pev/patches/patch-src_Makefile
index 54eb3103ee5..8a3ba27c960 100644
--- a/security/pev/patches/patch-src_Makefile
+++ b/security/pev/patches/patch-src_Makefile
@@ -1,10 +1,10 @@
-$NetBSD: patch-src_Makefile,v 1.1 2014/08/02 14:11:08 khorben Exp $
+$NetBSD: patch-src_Makefile,v 1.2 2014/12/09 13:26:40 khorben Exp $
Fixed DESTDIR support
---- src/Makefile.orig 2012-10-31 03:59:14.000000000 +0000
+--- src/Makefile.orig 2013-01-23 12:37:31.000000000 +0000
+++ src/Makefile
-@@ -20,9 +20,9 @@ RM = rm -f
+@@ -20,15 +20,17 @@ RM = rm -f
SOURCES = output.c
PROGS = readpe pedis pepack pescan rva2ofs pesec ofs2rva pestr pehash pestr
INSTALL = install -m 0755
@@ -16,3 +16,11 @@ Fixed DESTDIR support
####### Build rules
+ # 'make' will compile all binaries
+ all: $(PROGS)
+
++pepack: CPPFLAGS += -DPREFIX=\"$(PREFIX)\"
++
+ pestr: CPPFLAGS += -D_GNU_SOURCE=1
+ pestr: LDFLAGS += -lpcre
+ pestr: pestr.c
diff --git a/security/pev/patches/patch-src_pepack.c b/security/pev/patches/patch-src_pepack.c
new file mode 100644
index 00000000000..b4fa3d3fd27
--- /dev/null
+++ b/security/pev/patches/patch-src_pepack.c
@@ -0,0 +1,29 @@
+$NetBSD: patch-src_pepack.c,v 1.1 2014/12/09 13:26:40 khorben Exp $
+
+Fixed the path to userdb.txt (see pkg/49458)
+
+--- src/pepack.c.orig 2012-10-31 03:59:14.000000000 +0000
++++ src/pepack.c
+@@ -21,6 +21,13 @@
+
+ #include "pepack.h"
+
++#ifndef PREFIX
++# define PREFIX "/usr"
++#endif
++#ifndef DATADIR
++# define DATADIR PREFIX "/share"
++#endif
++
+ struct options config;
+ static int ind;
+
+@@ -119,7 +126,7 @@ bool loaddb(FILE **fp)
+ *fp = fopen(dbfile, "r");
+
+ if (!*fp)
+- *fp = fopen("/usr/share/pev/userdb.txt", "r");
++ *fp = fopen(DATADIR "/pev/userdb.txt", "r");
+
+ return (*fp != NULL);
+ }