diff options
author | Alexey Dokuchaev <danfe@FreeBSD.org> | 2008-09-17 11:30:08 +0000 |
---|---|---|
committer | Alexey Dokuchaev <danfe@FreeBSD.org> | 2008-09-17 11:30:08 +0000 |
commit | 0f99a5bd2194695f9c8b695aa76e28fb4a988c0e (patch) | |
tree | 70e304e4941e7ddf66fb29cd2f2db208f4e89400 | |
parent | - Update to 1.22 (make it fetchable again) (diff) |
- Unbreak on big-endian architectures
- Avoid patching things at extract phase
Based on a patch from: gahr
Approved by: portmgr (pav)
Tested on: amd64, sparc64
Notes
Notes:
svn path=/head/; revision=220419
-rw-r--r-- | security/ophcrack/Makefile | 19 |
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) |