Index: head/security/pev/Makefile =================================================================== --- head/security/pev/Makefile (revision 432166) +++ head/security/pev/Makefile (revision 432167) @@ -1,26 +1,27 @@ # Created by: Danilo Egea Gondolfo # $FreeBSD$ PORTNAME= pev -PORTVERSION= 0.70 -PORTREVISION= 1 +PORTVERSION= 0.80 CATEGORIES= security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-${PORTVERSION}/ MAINTAINER= danilo@FreeBSD.org COMMENT= PE analysis toolkit LICENSE= GPLv3 LIB_DEPENDS= libpcre.so:devel/pcre WRKSRC= ${WRKDIR}/${PORTNAME} USES= gmake ssl USE_LDCONFIG= yes + +INSTALL_TARGET= install-strip MAKE_ARGS= MAKE=${MAKE_CMD} CFLAGS+= -I${OPENSSLINC} -I${LOCALBASE}/include LDFLAGS+= -L${OPENSSLLIB} .include Index: head/security/pev/distinfo =================================================================== --- head/security/pev/distinfo (revision 432166) +++ head/security/pev/distinfo (revision 432167) @@ -1,2 +1,3 @@ -SHA256 (pev-0.70.tar.gz) = 250396a06930d60a92e9bc86d7afb543d899ba12c007d1be5d09802a02908202 -SIZE (pev-0.70.tar.gz) = 254821 +TIMESTAMP = 1484430170 +SHA256 (pev-0.80.tar.gz) = f68c8596f16d221d9a742812f6f728bcc739be90957bc1b00fbaa5943ffc5cfa +SIZE (pev-0.80.tar.gz) = 921102 Index: head/security/pev/files/patch-src__Makefile =================================================================== --- head/security/pev/files/patch-src__Makefile (revision 432166) +++ head/security/pev/files/patch-src__Makefile (nonexistent) @@ -1,53 +0,0 @@ ---- ./src/Makefile.orig 2013-12-27 08:39:49.000000000 -0200 -+++ ./src/Makefile 2013-12-28 00:19:50.000000000 -0200 -@@ -5,7 +5,7 @@ - - ####### Makefile Conventions - Directory variables - --prefix = /usr -+prefix = /usr/local - exec_prefix = $(prefix) - bindir = $(exec_prefix)/bin - sbindir = $(exec_prefix)/sbin -@@ -19,7 +19,7 @@ - infodir = $(datarootdir)/info - libdir = $(exec_prefix)/lib - localedir = $(datarootdir)/locale --mandir = $(datarootdir)/man -+mandir = $(prefix)/man - man1dir = $(mandir)/man1 - manext = .1 - man1ext = .1 -@@ -71,7 +71,7 @@ - pesec: LDFLAGS += -lcrypto - pesec: compat/strlcat.c - --pestr: LDFLAGS += -lpcre -+pestr: LDFLAGS += -L/usr/local/lib -lpcre - - pehash: CFLAGS += -I$(LIBFUZZY) - pehash: $(LIBFUZZY)/*.c -@@ -89,18 +89,16 @@ - - install: installdirs - for prog in $(PROGS); do \ -- $(INSTALL_PROGRAM) -m 755 $$prog $(DEST); \ -- $(CHK_FILE_EXISTS) $(MANDIR)/$$prog$(man1ext) && \ -- gzip -c -9 $(MANDIR)/$$prog$(man1ext) > $(man1dir)/$$prog$(man1ext).gz || \ -- echo -n; \ -+ $(INSTALL_PROGRAM) -s -m 755 $$prog $(DEST); \ -+ $(INSTALL_DATA) $(MANDIR)/$$prog$(man1ext) $(DESTDIR)$(man1dir); \ - done - # TODO: Should we copy it anyway if it already exists? -- @$(CHK_FILE_EXISTS) $(SHAREDIR)/userdb.txt || cp $(srcdir)/userdb.txt $(SHAREDIR) -+ @$(CHK_FILE_EXISTS) $(DESTDIR)$(SHAREDIR)/userdb.txt || cp $(srcdir)/userdb.txt $(DESTDIR)$(SHAREDIR) - - installdirs: - @$(CHK_DIR_EXISTS) $(DEST) || $(MKDIR) $(DEST) -- @$(CHK_DIR_EXISTS) $(man1dir) || $(MKDIR) $(man1dir) -- @$(CHK_DIR_EXISTS) $(SHAREDIR) || $(MKDIR) $(SHAREDIR) -+ @$(CHK_DIR_EXISTS) $(DESTDIR)$(man1dir) || $(MKDIR) $(DESTDIR)$(man1dir) -+ @$(CHK_DIR_EXISTS) $(DESTDIR)$(SHAREDIR) || $(MKDIR) $(DESTDIR)$(SHAREDIR) - - uninstall: - for prog in $(PROGS); do \ Property changes on: head/security/pev/files/patch-src__Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/pev/files/patch-lib__libpe__Makefile =================================================================== --- head/security/pev/files/patch-lib__libpe__Makefile (revision 432166) +++ head/security/pev/files/patch-lib__libpe__Makefile (nonexistent) @@ -1,29 +0,0 @@ ---- ./lib/libpe/Makefile.orig 2013-12-27 08:39:52.000000000 -0200 -+++ ./lib/libpe/Makefile 2013-12-28 00:18:59.000000000 -0200 -@@ -5,7 +5,7 @@ - - ####### Makefile Conventions - Directory variables - --prefix = /usr -+prefix = /usr/local - exec_prefix = $(prefix) - bindir = $(exec_prefix)/bin - sbindir = $(exec_prefix)/sbin -@@ -68,7 +68,7 @@ - - libpe: CPPFLAGS += -D_GNU_SOURCE - libpe: $(libpe_OBJS) --ifeq ($(PLATFORM_OS), Linux) -+ifeq ($(PLATFORM_OS), FreeBSD) - $(LINK) -shared -Wl,-soname,$(LIBNAME).so.1 $(LDFLAGS) -o $(LIBNAME).so $^ - else ifeq ($(PLATFORM_OS), Darwin) - $(LINK) -headerpad_max_install_names -dynamiclib \ -@@ -84,7 +84,7 @@ - $(CC) -c $(CFLAGS) $(CPPFLAGS) -o $@ $< - - install: installdirs --ifeq ($(PLATFORM_OS), Linux) -+ifeq ($(PLATFORM_OS), FreeBSD) - $(INSTALL_DATA) $(LIBNAME).so $(DEST)/$(LIBNAME).so.$(VERSION) - cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so - cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so.1 Property changes on: head/security/pev/files/patch-lib__libpe__Makefile ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property Index: head/security/pev/files/patch-lib_libpe_Makefile =================================================================== --- head/security/pev/files/patch-lib_libpe_Makefile (nonexistent) +++ head/security/pev/files/patch-lib_libpe_Makefile (revision 432167) @@ -0,0 +1,31 @@ +--- lib/libpe/Makefile.orig 2017-01-06 22:27:20 UTC ++++ lib/libpe/Makefile +@@ -78,6 +78,8 @@ ifeq ($(PLATFORM_OS), Linux) + $(LINK) -shared -Wl,-soname,$(LIBNAME).so.1 $(LDFLAGS) -o $(LIBNAME).so $^ + else ifeq ($(PLATFORM_OS), NetBSD) + $(LINK) -shared -Wl,-soname,$(LIBNAME).so.1 $(LDFLAGS) -o $(LIBNAME).so $^ ++else ifeq ($(PLATFORM_OS), FreeBSD) ++ $(LINK) -shared -Wl,-soname,$(LIBNAME).so.1 $(LDFLAGS) -o $(LIBNAME).so $^ + else ifeq ($(PLATFORM_OS), Darwin) + $(LINK) -headerpad_max_install_names -dynamiclib \ + -flat_namespace -install_name $(LIBNAME).$(VERSION).dylib \ +@@ -100,6 +102,10 @@ else ifeq ($(PLATFORM_OS), NetBSD) + $(INSTALL_DATA) $(LIBNAME).so $(DESTDIR)$(libdir)/$(LIBNAME).so.$(VERSION) + cd $(DESTDIR)$(libdir); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so + cd $(DESTDIR)$(libdir); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so.1 ++else ifeq ($(PLATFORM_OS), FreeBSD) ++ $(INSTALL_DATA) $(LIBNAME).so $(DESTDIR)$(libdir)/$(LIBNAME).so.$(VERSION) ++ cd $(DESTDIR)$(libdir); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so ++ cd $(DESTDIR)$(libdir); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so.1 + else ifeq ($(PLATFORM_OS), Darwin) + $(INSTALL_DATA) $(LIBNAME).dylib $(DESTDIR)$(libdir)/$(LIBNAME).$(VERSION).dylib + cd $(DESTDIR)$(libdir); $(SYMLINK) $(LIBNAME).$(VERSION).dylib $(LIBNAME).dylib +@@ -117,6 +123,8 @@ ifeq ($(PLATFORM_OS), Linux) + $(STRIP) $(LIBNAME).so + else ifeq ($(PLATFORM_OS), NetBSD) + $(STRIP) $(LIBNAME).so ++else ifeq ($(PLATFORM_OS), FreeBSD) ++ $(STRIP) $(LIBNAME).so + else ifeq ($(PLATFORM_OS), Darwin) + $(STRIP) $(LIBNAME).dylib + else ifeq ($(PLATFORM_OS), CYGWIN) Property changes on: head/security/pev/files/patch-lib_libpe_Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/security/pev/files/patch-src_Makefile =================================================================== --- head/security/pev/files/patch-src_Makefile (nonexistent) +++ head/security/pev/files/patch-src_Makefile (revision 432167) @@ -0,0 +1,38 @@ +--- src/Makefile.orig 2017-01-07 22:34:07 UTC ++++ src/Makefile +@@ -24,7 +24,7 @@ docdir = $(datarootdir)/doc/pev + infodir = $(datarootdir)/info + localedir = $(datarootdir)/locale + +-mandir = $(datarootdir)/man ++mandir = $(prefix)/man + manext = .1 + man1dir = $(mandir)/man1 + man1ext = .1 +@@ -52,7 +52,7 @@ endif + + ####### Compiler options + +-override LDFLAGS += -L$(LIBPE) -lpe -ldl ++override LDFLAGS += -L$(LIBPE) -lpe + override CFLAGS += -I$(LIBPE) -I"../include" -W -Wall -Wextra -std=c99 -pedantic + override CPPFLAGS += -D_GNU_SOURCE -DSHAREDIR="\"$(SHAREDIR)"\" + +@@ -153,6 +153,17 @@ install: installdirs + $(INSTALL_DATA) $(srcdir)/userdb.txt $(DESTDIR)$(SHAREDIR) + cd $(PLUGINS_DIR) && $(MAKE) $@ + ++install-strip: installdirs ++ for prog in $(PROGS); do \ ++ $(INSTALL_PROGRAM) -s $(pev_BUILDDIR)/$$prog $(DESTDIR)$(bindir); \ ++ $(CHK_FILE_EXISTS) $(MANDIR)/$$prog$(man1ext) && \ ++ gzip -c -9 $(MANDIR)/$$prog$(man1ext) > $(DESTDIR)$(man1dir)/$$prog$(man1ext).gz || \ ++ echo -n; \ ++ done ++ ++ $(INSTALL_DATA) $(srcdir)/userdb.txt $(DESTDIR)$(SHAREDIR) ++ cd $(PLUGINS_DIR) && $(MAKE) $@ ++ + installdirs: + @$(CHK_DIR_EXISTS) $(DESTDIR) || $(MKDIR) $(DESTDIR) + @$(CHK_DIR_EXISTS) $(DESTDIR)$(bindir) || $(MKDIR) $(DESTDIR)$(bindir) Property changes on: head/security/pev/files/patch-src_Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/security/pev/files/patch-src_config.c =================================================================== --- head/security/pev/files/patch-src_config.c (nonexistent) +++ head/security/pev/files/patch-src_config.c (revision 432167) @@ -0,0 +1,11 @@ +--- src/config.c.orig 2017-01-06 22:27:18 UTC ++++ src/config.c +@@ -40,7 +40,7 @@ + #include + #if defined(__linux__) + #include +-#elif defined(__NetBSD__) ++#elif defined(__NetBSD__) || defined(__FreeBSD__) + #include + #elif defined(__APPLE__) + #include Property changes on: head/security/pev/files/patch-src_config.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/security/pev/files/patch-src_plugins.c =================================================================== --- head/security/pev/files/patch-src_plugins.c (nonexistent) +++ head/security/pev/files/patch-src_plugins.c (revision 432167) @@ -0,0 +1,11 @@ +--- src/plugins.c.orig 2017-01-06 22:27:18 UTC ++++ src/plugins.c +@@ -167,7 +167,7 @@ int plugins_load_all_from_directory(cons + const char *filename = dir_entry->d_name; + + // TODO(jweyrich): Use macro conditions for each system: .so, .dylib, .dll +-#if defined(__linux__) ++#if defined(__linux__) || defined(__FreeBSD__) + const bool possible_plugin = utils_str_ends_with(filename, ".so") != 0; + #elif defined(__APPLE__) + const bool possible_plugin = utils_str_ends_with(filename, ".dylib") != 0; Property changes on: head/security/pev/files/patch-src_plugins.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/security/pev/files/patch-src_plugins_Makefile =================================================================== --- head/security/pev/files/patch-src_plugins_Makefile (nonexistent) +++ head/security/pev/files/patch-src_plugins_Makefile (revision 432167) @@ -0,0 +1,25 @@ +--- src/plugins/Makefile.orig 2017-01-06 22:27:18 UTC ++++ src/plugins/Makefile +@@ -57,6 +57,8 @@ json: $(json_OBJS) + $(PLUGINS): + ifeq ($(PLATFORM_OS), Linux) + $(LINK) -shared -Wl,-soname,$(LIBNAME).so.1 $(LDFLAGS) -o ${plugins_BUILDDIR}/$(LIBNAME).so $^ ++else ifeq ($(PLATFORM_OS), FreeBSD) ++ $(LINK) -shared -Wl,-soname,$(LIBNAME).so.1 $(LDFLAGS) -o ${plugins_BUILDDIR}/$(LIBNAME).so $^ + else ifeq ($(PLATFORM_OS), Darwin) + $(LINK) -headerpad_max_install_names -dynamiclib \ + -undefined dynamic_lookup -fno-common \ +@@ -83,6 +85,13 @@ install: installdirs + $(INSTALL_PROGRAM) -m 755 $(plugins_BUILDDIR)/$(xml_LIBNAME).* $(pluginsdir) + $(INSTALL_PROGRAM) -m 755 $(plugins_BUILDDIR)/$(json_LIBNAME).* $(pluginsdir) + ++install-strip: installdirs ++ $(INSTALL_PROGRAM) -s -m 755 $(plugins_BUILDDIR)/$(csv_LIBNAME).* $(pluginsdir) ++ $(INSTALL_PROGRAM) -s -m 755 $(plugins_BUILDDIR)/$(html_LIBNAME).* $(pluginsdir) ++ $(INSTALL_PROGRAM) -s -m 755 $(plugins_BUILDDIR)/$(text_LIBNAME).* $(pluginsdir) ++ $(INSTALL_PROGRAM) -s -m 755 $(plugins_BUILDDIR)/$(xml_LIBNAME).* $(pluginsdir) ++ $(INSTALL_PROGRAM) -s -m 755 $(plugins_BUILDDIR)/$(json_LIBNAME).* $(pluginsdir) ++ + installdirs: + @$(CHK_DIR_EXISTS) $(pluginsdir) || $(MKDIR) $(pluginsdir) + Property changes on: head/security/pev/files/patch-src_plugins_Makefile ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property Index: head/security/pev/pkg-plist =================================================================== --- head/security/pev/pkg-plist (revision 432166) +++ head/security/pev/pkg-plist (revision 432167) @@ -1,24 +1,29 @@ bin/ofs2rva bin/pedis bin/pehash bin/pepack bin/peres bin/pescan bin/pesec bin/pestr bin/readpe bin/rva2ofs lib/libpe.so lib/libpe.so.1 lib/libpe.so.1.0 +lib/pev/plugins/csv_plugin.so +lib/pev/plugins/html_plugin.so +lib/pev/plugins/json_plugin.so +lib/pev/plugins/text_plugin.so +lib/pev/plugins/xml_plugin.so man/man1/ofs2rva.1.gz man/man1/pedis.1.gz man/man1/pehash.1.gz man/man1/pepack.1.gz man/man1/peres.1.gz man/man1/pescan.1.gz man/man1/pesec.1.gz man/man1/pestr.1.gz man/man1/readpe.1.gz man/man1/rva2ofs.1.gz %%DATADIR%%/userdb.txt