aboutsummaryrefslogtreecommitdiff
path: root/security/ophcrack
diff options
context:
space:
mode:
authorAlexey Dokuchaev <danfe@FreeBSD.org>2008-09-17 11:30:08 +0000
committerAlexey Dokuchaev <danfe@FreeBSD.org>2008-09-17 11:30:08 +0000
commit0f99a5bd2194695f9c8b695aa76e28fb4a988c0e (patch)
tree70e304e4941e7ddf66fb29cd2f2db208f4e89400 /security/ophcrack
parent8395bc00e42cf221ce7d93aa938af0ce2bdda917 (diff)
downloadports-0f99a5bd2194695f9c8b695aa76e28fb4a988c0e.tar.gz
ports-0f99a5bd2194695f9c8b695aa76e28fb4a988c0e.zip
Notes
Diffstat (limited to 'security/ophcrack')
-rw-r--r--security/ophcrack/Makefile19
1 files changed, 17 insertions, 2 deletions
diff --git a/security/ophcrack/Makefile b/security/ophcrack/Makefile
index 2c531d6d3879..8a7010b3ffc4 100644
--- a/security/ophcrack/Makefile
+++ b/security/ophcrack/Makefile
@@ -25,16 +25,31 @@ MAN1= bkhive.1 samdump2.1
TOOLS_VER= 1.1.1
-post-extract:
+post-patch:
@${REINPLACE_CMD} -e '/^CFLAGS=/d' ${WRKSRC}/${CONFIGURE_SCRIPT}
# Do not install any Linux binaries: we build and install native ones;
# mute their banner as well in favor of our nice pkg-message
@${REINPLACE_CMD} -e 's/ install-exec-local// ; 605,617d' \
${WRKSRC}/Makefile.in
# Hint the tools about correct endianness
- @${REINPLACE_CMD} -e '27s,^$$,#include <machine/endian.h>,' \
+ @${REINPLACE_CMD} -e '22s,^$$,#include <sys/endian.h>,' \
+ ${WRKDIR}/bkhive-${TOOLS_VER}/bkhive.c
+ @${REINPLACE_CMD} -e '26s,^$$,#include <sys/endian.h>,' \
+ ${WRKDIR}/bkhive-${TOOLS_VER}/hive.c
+ @${REINPLACE_CMD} -e '27s,^$$,#include <sys/endian.h>,' \
+ ${WRKDIR}/samdump2-${TOOLS_VER}/samdump2.c
+# FreeBSD does not have <byteswap.h>
+ @${REINPLACE_CMD} -e '/byteswap\.h/d' \
${WRKDIR}/bkhive-${TOOLS_VER}/bkhive.c \
+ ${WRKDIR}/bkhive-${TOOLS_VER}/hive.c \
+ ${WRKDIR}/samdump2-${TOOLS_VER}/samdump2.c
+# And our swap function names are prettier
+ @${REINPLACE_CMD} -E 's,__bswap_([[:digit:]]+),bswap\1,' \
+ ${WRKDIR}/bkhive-${TOOLS_VER}/hive.c \
${WRKDIR}/samdump2-${TOOLS_VER}/samdump2.c
+# Link to file instead of patching identical copy
+ @${LN} -sf ../bkhive-${TOOLS_VER}/hive.c \
+ ${WRKDIR}/samdump2-${TOOLS_VER}/hive.c
post-build:
# Build auxiliary tools (useful: e.g., samdump2 is called at runtime)