Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 02 Mar 2026 08:22:01 +0000
From:      Philippe Audeoud <jadawin@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: ff3fd337c1d8 - main - security/pdfcrack: update to 0.21
Message-ID:  <69a548a9.1d0ba.6e47b496@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch main has been updated by jadawin:

URL: https://cgit.FreeBSD.org/ports/commit/?id=ff3fd337c1d84a0545abdc6674a90f291a138ad7

commit ff3fd337c1d84a0545abdc6674a90f291a138ad7
Author:     Philippe Audeoud <jadawin@FreeBSD.org>
AuthorDate: 2026-03-02 08:20:14 +0000
Commit:     Philippe Audeoud <jadawin@FreeBSD.org>
CommitDate: 2026-03-02 08:21:46 +0000

    security/pdfcrack: update to 0.21
    
    PR:             293015
    Approved by:    maintainer timeout
---
 security/pdfcrack/Makefile                | 11 ++--
 security/pdfcrack/distinfo                |  6 +--
 security/pdfcrack/files/patch-benchmark.c | 13 +++++
 security/pdfcrack/files/patch-main.c      | 14 +++++
 security/pdfcrack/files/patch-md5         | 88 -------------------------------
 5 files changed, 33 insertions(+), 99 deletions(-)

diff --git a/security/pdfcrack/Makefile b/security/pdfcrack/Makefile
index 49ecddc1ae4f..3d085290f9e2 100644
--- a/security/pdfcrack/Makefile
+++ b/security/pdfcrack/Makefile
@@ -1,6 +1,5 @@
 PORTNAME=	pdfcrack
-PORTVERSION=	0.20
-PORTREVISION=	1
+PORTVERSION=	0.21
 CATEGORIES=	security print
 MASTER_SITES=	SF/${PORTNAME}/${PORTNAME}/${PORTNAME}-${PORTVERSION}
 
@@ -11,19 +10,15 @@ WWW=		https://sourceforge.net/projects/pdfcrack/
 LICENSE=	GPLv2+
 LICENSE_FILE=	${WRKSRC}/COPYING
 
-PLIST_FILES=	bin/pdfcrack bin/pdfreader share/man/man1/pdfcrack.1.gz
 ALL_TARGET=	pdfcrack pdfreader
+PLIST_FILES=	bin/pdfcrack bin/pdfreader share/man/man1/pdfcrack.1.gz
 
 post-patch:
 	${REINPLACE_CMD} 's,-O.* -g,,' ${WRKSRC}/Makefile
 
-post-build:
-	${COMPRESS_CMD} < ${WRKSRC}/pdfcrack.1 > ${WRKSRC}/pdfcrack.1.gz
-
 do-install:
 	${INSTALL_PROGRAM} ${PLIST_FILES:Mbin/*:S,bin/,${WRKSRC}/,g} \
 		${STAGEDIR}${PREFIX}/bin/
-	${INSTALL_MAN} ${PLIST_FILES:Mshare/man/*:S,share/man/man1/,${WRKSRC}/,g}	\
-		${STAGEDIR}${PREFIX}/share/man/man1/
+	${INSTALL_MAN} ${WRKSRC}/pdfcrack.1 ${STAGEDIR}${PREFIX}/share/man/man1/
 
 .include <bsd.port.mk>
diff --git a/security/pdfcrack/distinfo b/security/pdfcrack/distinfo
index bd26b9bf8782..e9a8ed648351 100644
--- a/security/pdfcrack/distinfo
+++ b/security/pdfcrack/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1705079287
-SHA256 (pdfcrack-0.20.tar.gz) = 7b8b29b18fcd5cb984aeb640ee06edf09fede4709b59c32fee4f2d86860de5b4
-SIZE (pdfcrack-0.20.tar.gz) = 35647
+TIMESTAMP = 1770398529
+SHA256 (pdfcrack-0.21.tar.gz) = 26f00d4afcb70b5839047bc6f62e4253073ac437bdb526f01e8c04b220e97762
+SIZE (pdfcrack-0.21.tar.gz) = 35822
diff --git a/security/pdfcrack/files/patch-benchmark.c b/security/pdfcrack/files/patch-benchmark.c
new file mode 100644
index 000000000000..f9863d0898a3
--- /dev/null
+++ b/security/pdfcrack/files/patch-benchmark.c
@@ -0,0 +1,13 @@
+--- benchmark.c.orig	2025-09-08 19:02:36 UTC
++++ benchmark.c
+@@ -40,8 +40,9 @@ static void
+ 
+ /** interruptBench is used to stop the current benchmark */
+ static void
+-interruptBench(int) {
++interruptBench(int sig) {
+   finished = true;
++  (void)sig;
+ }
+ 
+ /** print_and_clean was supposed to make the binary somewhat smaller but
diff --git a/security/pdfcrack/files/patch-main.c b/security/pdfcrack/files/patch-main.c
new file mode 100644
index 000000000000..94e263b369ae
--- /dev/null
+++ b/security/pdfcrack/files/patch-main.c
@@ -0,0 +1,14 @@
+--- main.c.orig	2025-09-08 19:57:23 UTC
++++ main.c
+@@ -37,9 +37,10 @@ static void
+ 
+ /** alarmInterrupt is used to print out the progress at specific intervals */
+ static void
+-alarmInterrupt(int) {
++alarmInterrupt(int sig) {
+   if(!printProgress())
+     alarm(PRINTERVAL);
++  (void)sig;
+ }
+ 
+ /** autoSave is used to save down the current state when interrupted */
diff --git a/security/pdfcrack/files/patch-md5 b/security/pdfcrack/files/patch-md5
deleted file mode 100644
index 1857662bf6cd..000000000000
--- a/security/pdfcrack/files/patch-md5
+++ /dev/null
@@ -1,88 +0,0 @@
---- md5.h	2015-07-25 16:10:57.000000000 -0400
-+++ md5.h	2024-01-12 12:57:19.536200000 -0500
-@@ -20,17 +20,18 @@
- #ifndef _MD5_H_
- #define _MD5_H_
-+#include <sys/types.h>
- #include <stdint.h>
- 
- void 
--md5(const uint8_t *msg, const unsigned int msgLen, uint8_t *digest);
-+md5(const uint8_t *msg, size_t msgLen, uint8_t *digest);
- 
- /** init function for md5_50 which chooses a md5_50 optimised for msgLen, 
-     if one is available */
- void
--md5_50_init(const unsigned int msgLen);
-+md5_50_init(size_t msgLen);
- 
- /** md5_50 is basically for(i=0; i<50; i++) { md5(msg, msgLen, msg); } */
- void
--md5_50(uint8_t *msg, const unsigned int msgLen);
-+md5_50(uint8_t *msg, size_t msgLen);
- 
- #endif /** _MD5_H_ */
---- md5.c	2022-10-31 09:55:15.000000000 -0400
-+++ md5.c	2024-01-12 12:59:03.846526000 -0500
-@@ -48,20 +48,18 @@
- #define DD 0x10325476
- 
--static void (*md5_50_variant)();
--static void md5_50f(uint8_t *msg, const unsigned int msgLen);
--static void md5_50s(uint8_t *msg, const unsigned int msgLen);
-+static void (*md5_50_variant)(uint8_t *, size_t msgLen);
- 
- void 
--md5(const uint8_t *msg, const unsigned int msgLen, uint8_t *digest) {
-+md5(const uint8_t *msg, size_t msgLen, uint8_t *digest) {
-   uint32_t x[16];
-   register uint32_t a, b, c, d;
-   uint32_t aa, bb, cc, dd;
--  int n64;
--  int i, j;
--  unsigned int k;
-+  size_t n64, i;
-+  int j;
-+  size_t k;
-   
-   /** compute number of 64-byte blocks
-       (length + pad byte (0x80) + 8 bytes for length) */
--  n64 = ((int)msgLen + 72) / 64;
-+  n64 = (msgLen + 72) / 64;
-   
-   /** initialize a, b, c, d */
-@@ -76,5 +74,5 @@
- 
-     /** grab a 64-byte block */
--    for (j = 0; j < 16 && (signed)k < (signed)msgLen - 3; ++j, k += 4)
-+    for (j = 0; j < 16 && k + 3 < msgLen; ++j, k += 4)
-       x[j] = ((((((unsigned)msg[k+3] << 8) + (unsigned)msg[k+2]) << 8) + (unsigned)msg[k+1]) << 8) + msg[k];
-     if (i == n64 - 1) {
-@@ -198,5 +196,5 @@
- 
- static void
--md5_50s(uint8_t *msg, const unsigned int msgLen) {
-+md5_50s(uint8_t *msg, size_t msgLen) {
-   int i;
-   for(i=0; i<50; i++) { md5(msg, msgLen, msg); }
-@@ -205,5 +203,5 @@
- /** fast version of "for(i=0; i<50; i++) { md5(msg, 16, msg); }" */
- static void 
--md5_50f(uint8_t *msg, const unsigned int msgLen __attribute__((unused))) {
-+md5_50f(uint8_t *msg, size_t msgLen __attribute__((unused))) {
-   register uint32_t a, b, c, d;
-   int i;
-@@ -323,5 +321,5 @@
- 
- void
--md5_50_init(const unsigned int msgLen) {
-+md5_50_init(size_t msgLen) {
-   if(msgLen == 16)
-     md5_50_variant = &md5_50f;
-@@ -331,5 +329,5 @@
- 
- void
--md5_50(uint8_t *msg, const unsigned int msgLen) {
-+md5_50(uint8_t *msg, size_t msgLen) {
-   md5_50_variant(msg, msgLen);
- }


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?69a548a9.1d0ba.6e47b496>