diff options
author | ehaupt <ehaupt@FreeBSD.org> | 2011-06-21 22:07:47 +0800 |
---|---|---|
committer | ehaupt <ehaupt@FreeBSD.org> | 2011-06-21 22:07:47 +0800 |
commit | c9c4205f817709bc6a429b8d14afd7619e10b35e (patch) | |
tree | ac3b99473974ebb5cb4956c3e4da47e35613401b /security/pkcrack | |
parent | a78a4c2823a6d5554e19a1c8da9dbad8e70b2fd8 (diff) | |
download | freebsd-ports-gnome-c9c4205f817709bc6a429b8d14afd7619e10b35e.tar.gz freebsd-ports-gnome-c9c4205f817709bc6a429b8d14afd7619e10b35e.tar.zst freebsd-ports-gnome-c9c4205f817709bc6a429b8d14afd7619e10b35e.zip |
Fix build with clang.
Diffstat (limited to 'security/pkcrack')
-rw-r--r-- | security/pkcrack/Makefile | 11 | ||||
-rw-r--r-- | security/pkcrack/distinfo | 1 | ||||
-rw-r--r-- | security/pkcrack/files/patch-Makefile | 10 | ||||
-rw-r--r-- | security/pkcrack/files/patch-exfunc.c | 11 | ||||
-rw-r--r-- | security/pkcrack/files/patch-extract.c | 26 | ||||
-rw-r--r-- | security/pkcrack/files/patch-findkey.c | 18 | ||||
-rw-r--r-- | security/pkcrack/files/patch-main.c | 26 | ||||
-rw-r--r-- | security/pkcrack/files/patch-makekey.c | 26 | ||||
-rw-r--r-- | security/pkcrack/files/patch-mktmptbl.c | 10 | ||||
-rw-r--r-- | security/pkcrack/files/patch-readhead.c | 11 | ||||
-rw-r--r-- | security/pkcrack/files/patch-zdmain.c | 22 | ||||
-rw-r--r-- | security/pkcrack/files/patch-zipdecrypt.c | 10 |
12 files changed, 170 insertions, 12 deletions
diff --git a/security/pkcrack/Makefile b/security/pkcrack/Makefile index 30afdf6f1714..02fc85e3fdfb 100644 --- a/security/pkcrack/Makefile +++ b/security/pkcrack/Makefile @@ -21,17 +21,6 @@ WRKSRC= ${WRKDIR}/${DISTNAME}/src PLIST_FILES= bin/pkextract bin/pkfindkey bin/pkmakekey bin/pkcrack bin/zipdecrypt PORTDOCS= README pkzip.ps.gz -post-patch: - @${REINPLACE_CMD} -e 's|^\(#include\ <\)malloc\.h>|\1stdlib.h>|' \ - ${WRKSRC}/exfunc.c \ - ${WRKSRC}/readhead.c - @${REINPLACE_CMD} -e '/<malloc\.h>/d' \ - ${WRKSRC}/extract.c \ - ${WRKSRC}/main.c \ - ${WRKSRC}/zipdecrypt.c - @${REINPLACE_CMD} -E 's/^(CC|CFLAGS)=/\1?=/' \ - ${WRKSRC}/Makefile - do-install: .for f in pkcrack zipdecrypt ${INSTALL_PROGRAM} ${WRKSRC}/${f} ${PREFIX}/bin diff --git a/security/pkcrack/distinfo b/security/pkcrack/distinfo index 18e8027cee70..03766f886d50 100644 --- a/security/pkcrack/distinfo +++ b/security/pkcrack/distinfo @@ -1,3 +1,2 @@ -MD5 (pkcrack-1.2.2.tar.gz) = 41e2037ceb95fc0717f7d9ae0abe10db SHA256 (pkcrack-1.2.2.tar.gz) = 4d2dc193ffa4342ac2ed3a6311fdf770ae6a0771226b3ef453dca8d03e43895a SIZE (pkcrack-1.2.2.tar.gz) = 174208 diff --git a/security/pkcrack/files/patch-Makefile b/security/pkcrack/files/patch-Makefile new file mode 100644 index 000000000000..b44e88fdfe71 --- /dev/null +++ b/security/pkcrack/files/patch-Makefile @@ -0,0 +1,10 @@ +--- ./Makefile.orig 2003-01-04 11:30:30.000000000 +0100 ++++ ./Makefile 2011-06-21 16:03:11.000000000 +0200 +@@ -1,5 +1,5 @@ +-CC=gcc +-CFLAGS=-O6 -Wall ++CC?=gcc ++CFLAGS?=-O6 -Wall + #CFLAGS=-g + + RM=rm -f diff --git a/security/pkcrack/files/patch-exfunc.c b/security/pkcrack/files/patch-exfunc.c new file mode 100644 index 000000000000..f8b465f5ba07 --- /dev/null +++ b/security/pkcrack/files/patch-exfunc.c @@ -0,0 +1,11 @@ +--- ./exfunc.c.orig 2003-01-05 15:58:05.000000000 +0100 ++++ ./exfunc.c 2011-06-21 16:03:11.000000000 +0200 +@@ -41,7 +41,7 @@ + + #include <stdio.h> + #include <string.h> +-#include <malloc.h> ++#include <stdlib.h> + #include <ctype.h> + #include "headers.h" + diff --git a/security/pkcrack/files/patch-extract.c b/security/pkcrack/files/patch-extract.c new file mode 100644 index 000000000000..fb0c4484a925 --- /dev/null +++ b/security/pkcrack/files/patch-extract.c @@ -0,0 +1,26 @@ +--- ./extract.c.orig 2003-01-01 16:49:51.000000000 +0100 ++++ ./extract.c 2011-06-21 16:03:11.000000000 +0200 +@@ -68,7 +68,6 @@ + #endif + + #include <fcntl.h> +-#include <malloc.h> + #include <string.h> + + #include "headers.h" +@@ -90,7 +89,7 @@ + fprintf( stderr, " -s <size>\textract only specified number of bytes\n" ); + } + +-void main(int argc, char *argv[]) ++int main(int argc, char *argv[]) + { + char *ret, *outname; + int outfile, err=0, i, caseflg=0, size=0; +@@ -150,5 +149,5 @@ + } + free( ret ); + } +- exit(err); ++ return(err); + } diff --git a/security/pkcrack/files/patch-findkey.c b/security/pkcrack/files/patch-findkey.c new file mode 100644 index 000000000000..ab852f1cbdd5 --- /dev/null +++ b/security/pkcrack/files/patch-findkey.c @@ -0,0 +1,18 @@ +--- ./findkey.c.orig 2003-01-01 16:49:51.000000000 +0100 ++++ ./findkey.c 2011-06-21 16:03:11.000000000 +0200 +@@ -56,7 +56,7 @@ + exit( 1 ); + } + +-void main( int argc, char **argv ) ++int main( int argc, char **argv ) + { + uword key0, key1, key2; + int pwdLen=0; +@@ -81,4 +81,6 @@ + findLongPwd( key0, key1, key2, pwdLen, initBytes ); + else + findPwd( key0, key1, key2 ); ++ ++ return(0); + } diff --git a/security/pkcrack/files/patch-main.c b/security/pkcrack/files/patch-main.c new file mode 100644 index 000000000000..1ca4d2850981 --- /dev/null +++ b/security/pkcrack/files/patch-main.c @@ -0,0 +1,26 @@ +--- ./main.c.orig 2003-01-01 16:49:51.000000000 +0100 ++++ ./main.c 2011-06-21 16:03:11.000000000 +0200 +@@ -80,7 +80,6 @@ + + #include <sys/stat.h> + #include <fcntl.h> +-#include <malloc.h> + #include <stdlib.h> + #include <string.h> + +@@ -128,7 +127,7 @@ + fprintf( stderr, " -n\tno progress indicator\n" ); + } + +-void main( int argc, char **argv ) ++int main( int argc, char **argv ) + { + int crypt, plain, cryptlength, plainlength; + struct stat filestat; +@@ -334,5 +333,5 @@ + now = time(NULL); + fprintf( stderr, "Finished on %s", ctime(&now) ); + +- exit(0); ++ return(0); + } diff --git a/security/pkcrack/files/patch-makekey.c b/security/pkcrack/files/patch-makekey.c new file mode 100644 index 000000000000..4d20f7f9bd04 --- /dev/null +++ b/security/pkcrack/files/patch-makekey.c @@ -0,0 +1,26 @@ +--- ./makekey.c.orig 2003-01-01 16:49:51.000000000 +0100 ++++ ./makekey.c 2011-06-21 16:03:52.000000000 +0200 +@@ -12,6 +12,7 @@ + + #include <stdio.h> + #include <string.h> ++#include <stdlib.h> + #include "pkcrack.h" + #include "keystuff.h" + #include "crc.h" +@@ -24,7 +25,7 @@ + exit( 1 ); + } + +-void main( int argc, char **argv ) ++int main( int argc, char **argv ) + { + char * pwd; + int pwdLen, i; +@@ -41,5 +42,6 @@ + updateKeys( pwd[i] ); + + printf( "%08x %08x %08x\n", key0, key1, key2 ); ++ return(0); + } + diff --git a/security/pkcrack/files/patch-mktmptbl.c b/security/pkcrack/files/patch-mktmptbl.c new file mode 100644 index 000000000000..e6c237cbca62 --- /dev/null +++ b/security/pkcrack/files/patch-mktmptbl.c @@ -0,0 +1,10 @@ +--- ./mktmptbl.c.orig 2011-06-21 16:04:16.000000000 +0200 ++++ ./mktmptbl.c 2011-06-21 16:04:31.000000000 +0200 +@@ -43,6 +43,7 @@ + static char RCSID[]="$Id: mktmptbl.c,v 1.9 2002/11/02 15:12:06 lucifer Exp $"; + + #include <stdio.h> ++#include <string.h> + #include "mktmptbl.h" + + ushort tempTable[256][64]; diff --git a/security/pkcrack/files/patch-readhead.c b/security/pkcrack/files/patch-readhead.c new file mode 100644 index 000000000000..6b122df9269f --- /dev/null +++ b/security/pkcrack/files/patch-readhead.c @@ -0,0 +1,11 @@ +--- ./readhead.c.orig 2003-01-05 15:58:05.000000000 +0100 ++++ ./readhead.c 2011-06-21 16:03:11.000000000 +0200 +@@ -55,7 +55,7 @@ + /* Functions to read signature and headers */ + /******************************************************************************/ + #include <stdio.h> +-#include <malloc.h> ++#include <stdlib.h> + #include <string.h> + + #ifndef _WIN32 diff --git a/security/pkcrack/files/patch-zdmain.c b/security/pkcrack/files/patch-zdmain.c new file mode 100644 index 000000000000..0e5ad6ab3e66 --- /dev/null +++ b/security/pkcrack/files/patch-zdmain.c @@ -0,0 +1,22 @@ +--- ./zdmain.c.orig 2003-01-01 16:49:51.000000000 +0100 ++++ ./zdmain.c 2011-06-21 16:03:11.000000000 +0200 +@@ -35,7 +35,7 @@ + + extern void zipdecrypt( char*infile, char*outfile, int k0, int k1, int k2 ); + +-void main( int argc, char **argv ) ++int main( int argc, char **argv ) + { + char *c; + +@@ -53,8 +53,9 @@ + break; + default: + fprintf( stderr, "Usage: %s {<password> | <key0> <key1> <key2>} <cryptedzipfile> <plainzipfile>\n", argv[0] ); +- return; ++ return(0); + } + + zipdecrypt( argv[argc-2], argv[argc-1], key0, key1, key2 ); ++ return(0); + } diff --git a/security/pkcrack/files/patch-zipdecrypt.c b/security/pkcrack/files/patch-zipdecrypt.c new file mode 100644 index 000000000000..a6511c97e74b --- /dev/null +++ b/security/pkcrack/files/patch-zipdecrypt.c @@ -0,0 +1,10 @@ +--- ./zipdecrypt.c.orig 2003-01-05 15:58:05.000000000 +0100 ++++ ./zipdecrypt.c 2011-06-21 16:03:11.000000000 +0200 +@@ -84,7 +84,6 @@ + + #include <sys/stat.h> + #include <fcntl.h> +-#include <malloc.h> + #include <string.h> + #include "pkctypes.h" + #include "crc.h" |