- Update to 0.80

This commit is contained in:
Danilo Egea Gondolfo 2017-01-22 22:11:24 +00:00
parent 481ff38dbf
commit 2b8c20291d
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=432167
10 changed files with 127 additions and 86 deletions

View File

@ -2,8 +2,7 @@
# $FreeBSD$
PORTNAME= pev
PORTVERSION= 0.70
PORTREVISION= 1
PORTVERSION= 0.80
CATEGORIES= security
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-${PORTVERSION}/
@ -19,6 +18,8 @@ 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}

View File

@ -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

View File

@ -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

View File

@ -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)

View File

@ -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)

View File

@ -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 \

View File

@ -0,0 +1,11 @@
--- src/config.c.orig 2017-01-06 22:27:18 UTC
+++ src/config.c
@@ -40,7 +40,7 @@
#include <string.h>
#if defined(__linux__)
#include <linux/limits.h>
-#elif defined(__NetBSD__)
+#elif defined(__NetBSD__) || defined(__FreeBSD__)
#include <limits.h>
#elif defined(__APPLE__)
#include <sys/syslimits.h>

View File

@ -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;

View File

@ -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)

View File

@ -11,6 +11,11 @@ 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