- Update from 0.60 to 0.70

- Add LICENSE
This commit is contained in:
Danilo Egea Gondolfo 2013-12-28 02:34:56 +00:00
parent 900a70dd92
commit 653330038a
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=337827
5 changed files with 85 additions and 64 deletions

View file

@ -2,19 +2,23 @@
# $FreeBSD$
PORTNAME= pev
PORTVERSION= 0.60
PORTREVISION= 2
PORTVERSION= 0.70
CATEGORIES= security
MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-${PORTVERSION}/
MAINTAINER= danilo@FreeBSD.org
COMMENT= PE analysis toolkit
LICENSE= GPLv3
LIB_DEPENDS= libpcre.so:${PORTSDIR}/devel/pcre
WRKSRC= ${WRKDIR}/${PORTNAME}
USES= gmake
USE_LDCONFIG= yes
MAKE_ARGS+= PREFIX=${STAGEDIR}/${PREFIX} MAKE=${GMAKE}
MAKE_ARGS= MAKE=${GMAKE}
CFLAGS+= -I${LOCALBASE}/include
.include <bsd.port.mk>

View file

@ -1,2 +1,2 @@
SHA256 (pev-0.60.tar.gz) = 9f7f6c45644a66a90ec35ebd40ec8aedc2a8b80d7fbe2771a7061c1691639099
SIZE (pev-0.60.tar.gz) = 212932
SHA256 (pev-0.70.tar.gz) = 250396a06930d60a92e9bc86d7afb543d899ba12c007d1be5d09802a02908202
SIZE (pev-0.70.tar.gz) = 254821

View file

@ -1,34 +1,29 @@
--- ./lib/libpe/Makefile.orig 2012-10-31 01:59:14.000000000 -0200
+++ ./lib/libpe/Makefile 2013-09-24 12:03:36.000000000 -0300
@@ -5,16 +5,15 @@
--- ./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 @@
####### Compiler, tools and options
####### Makefile Conventions - Directory variables
-PREFIX = /usr
-DEST = $(DESTDIR)/$(PREFIX)/lib
+DEST = $(PREFIX)/lib
VERSION = 1.0
-override CFLAGS += -W -Wall -Wextra -pedantic -std=c99 -c
+override CFLAGS += -W -Wall -Wextra -pedantic -std=c99 -shared -o libpe.so
ifneq ($(PLATFORM_OS), CYGWIN)
override CFLAGS += -fPIC
endif
SRC = pe.c
RM = rm -f
-CC = gcc
+CC ?= ${CC}
SYMLINK = ln -sf
ifeq ($(PLATFORM_OS), Darwin)
STRIP = strip -x
@@ -46,6 +45,11 @@
$(INSTALL) $(LIBNAME).so $(DEST)/$(LIBNAME).so.$(VERSION)
-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
+else ifeq ($(PLATFORM_OS), FreeBSD)
+ $(STRIP) $(LIBNAME).so
+ $(INSTALL) $(LIBNAME).so $(DEST)/$(LIBNAME).so.$(VERSION)
+ cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so
+ cd $(DEST); $(SYMLINK) $(LIBNAME).so.$(VERSION) $(LIBNAME).so.1
else ifeq ($(PLATFORM_OS), Darwin)
$(STRIP) $(LIBNAME).dylib
$(INSTALL) $(LIBNAME).dylib $(DEST)/$(LIBNAME).$(VERSION).dylib

View file

@ -1,33 +1,53 @@
--- ./src/Makefile.orig 2013-01-23 10:37:31.000000000 -0200
+++ ./src/Makefile 2013-09-24 12:03:20.000000000 -0300
@@ -5,24 +5,23 @@
--- ./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 @@
####### Compiler, tools and options
####### Makefile Conventions - Directory variables
-PREFIX = /usr
-DEST = $(DESTDIR)/$(PREFIX)/bin
+DEST = $(PREFIX)/bin
LIBPE = ../lib/libpe
LIBUDIS86 = ../lib/libudis86
-override LDFLAGS += -L$(LIBPE) -lpe
-override CFLAGS += -I$(LIBPE) -W -Wall -Wextra -std=c99 -pedantic
+override LDFLAGS += -L/usr/local/lib -L$(LIBPE) -lpe
+override CFLAGS += -I/usr/local/include -I$(LIBPE) -W -Wall -Wextra -std=c99 -pedantic
ifeq ($(PLATFORM_OS), Darwin)
# We disable warnings for deprecated declarations since Apple deprecated OpenSSL in Mac OS X 10.7
override CFLAGS += -Wno-deprecated-declarations
endif
-CC = gcc
+CC ?= ${CC}
RM = rm -f
SOURCES = output.c
PROGS = readpe pedis pepack pescan rva2ofs pesec ofs2rva pestr pehash pestr
INSTALL = install -m 0755
-SHAREDIR = /usr/share/pev
+SHAREDIR = ${PREFIX}/share/pev
MAN = ../doc/manpages
-MANDIR = /usr/share/man/man1
+MANDIR = ${PREFIX}/man/man1
-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
####### Build rules
-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

@ -2,6 +2,7 @@ bin/ofs2rva
bin/pedis
bin/pehash
bin/pepack
bin/peres
bin/pescan
bin/pesec
bin/pestr
@ -14,6 +15,7 @@ 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