diff options
author | Robert Clausecker <fuz@FreeBSD.org> | 2023-04-11 00:22:30 +0000 |
---|---|---|
committer | Robert Clausecker <fuz@FreeBSD.org> | 2023-04-11 23:02:43 +0000 |
commit | 47f2932ebad004446c08db2dc98ceac1822a27e2 (patch) | |
tree | 88167486637d45aa2e06102daf64bf1a96399f4b | |
parent | 59c2682df240ec33474b91e1e72a32056817228b (diff) | |
download | ports-47f2932ebad004446c08db2dc98ceac1822a27e2.tar.gz ports-47f2932ebad004446c08db2dc98ceac1822a27e2.zip |
security/ncrypt: fix build with -fno-common
Move definition of ROUNDS from header to source file.
This fixes the port on FreeBSD 13 and later.
-rw-r--r-- | security/ncrypt/Makefile | 4 | ||||
-rw-r--r-- | security/ncrypt/files/patch-rijndael-alg-fst.c | 11 | ||||
-rw-r--r-- | security/ncrypt/files/patch-rijndael-alg-fst.h | 11 |
3 files changed, 23 insertions, 3 deletions
diff --git a/security/ncrypt/Makefile b/security/ncrypt/Makefile index b9a6f57238f2..8c9a222d0021 100644 --- a/security/ncrypt/Makefile +++ b/security/ncrypt/Makefile @@ -1,5 +1,6 @@ PORTNAME= ncrypt PORTVERSION= 0.8.1 +PORTREVISION= 1 CATEGORIES= security MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-${PORTVERSION:R}/${PORTNAME}-${PORTVERSION:R}.0 @@ -10,9 +11,6 @@ WWW= http://ncrypt.sourceforge.net/ LICENSE= GPLv2 LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN_FreeBSD_13= ld: error: duplicate symbol: ROUNDS -BROKEN_FreeBSD_14= ld: error: duplicate symbol: ROUNDS - USES= tar:tgz GNU_CONFIGURE= yes diff --git a/security/ncrypt/files/patch-rijndael-alg-fst.c b/security/ncrypt/files/patch-rijndael-alg-fst.c new file mode 100644 index 000000000000..f4aaec08628a --- /dev/null +++ b/security/ncrypt/files/patch-rijndael-alg-fst.c @@ -0,0 +1,11 @@ +--- rijndael-alg-fst.c.orig 2023-04-11 00:20:28 UTC ++++ rijndael-alg-fst.c +@@ -9,6 +9,8 @@ + + #include "rijndael-alg-fst.h" + ++int ROUNDS; ++ + #define SC ((BC - 4) >> 1) + + #include "boxes-fst.dat" diff --git a/security/ncrypt/files/patch-rijndael-alg-fst.h b/security/ncrypt/files/patch-rijndael-alg-fst.h new file mode 100644 index 000000000000..7d46cb2c9728 --- /dev/null +++ b/security/ncrypt/files/patch-rijndael-alg-fst.h @@ -0,0 +1,11 @@ +--- rijndael-alg-fst.h.orig 2023-04-11 00:20:14 UTC ++++ rijndael-alg-fst.h +@@ -11,7 +11,7 @@ typedef unsigned char word8; + typedef unsigned short word16; + typedef unsigned int word32; + +-int ROUNDS; ++extern int ROUNDS; + + int rijndaelKeySched (word8 k[MAXKC][4], int keyBits, + word8 rk[MAXROUNDS+1][4][4]); |