View | Details | Raw Unified | Return to bug 272676
Collapse All | Expand All

(-)b/archivers/dzip/Makefile (-22 / +11 lines)
Lines 1-40 Link Here
1
PORTNAME=	dzip
1
PORTNAME=	dzip
2
PORTVERSION=	2.9
2
DISTVERSIONPREFIX=	v
3
DISTVERSION=	3.1
3
CATEGORIES=	archivers games
4
CATEGORIES=	archivers games
4
MASTER_SITES=	http://speeddemosarchive.com/dzip/
5
5
DISTNAME=	dz${PORTVERSION:S/.//g}src
6
PATCH_SITES=	https://github.com/kugelrund/${PORTNAME}/commit/
7
PATCHFILES=	92839ee4563a8a374ea45768a32cadd89432efc7.patch:-p1
6
8
7
MAINTAINER=	danfe@FreeBSD.org
9
MAINTAINER=	danfe@FreeBSD.org
8
COMMENT=	File compression utility specializing in Quake demo compression
10
COMMENT=	File compression utility specializing in Quake demo compression
9
WWW=		https://speeddemosarchive.com/dzip/
11
WWW=		https://github.com/kugelrund/dzip
10
11
LICENSE=	ZLIB
12
12
13
USES=		cpe dos2unix zip
13
LICENSE=	MPL20
14
LICENSE_FILE=	${WRKSRC}/LICENSE
14
15
16
USES=		cmake compiler:c++11-lang cpe
15
CPE_VENDOR=	evan_wagner
17
CPE_VENDOR=	evan_wagner
16
18
17
NO_WRKSUBDIR=	yes
19
USE_GITHUB=	yes
18
MAKEFILE=	${WRKSRC}/Makefile.linux
20
GH_ACCOUNT=	kugelrund
19
MAKE_ARGS=	CC="${CC}" CFLAGS="${CFLAGS}"
20
ALL_TARGET=	${PORTNAME}
21
21
22
PLIST_FILES=	bin/${PORTNAME}
22
PLIST_FILES=	bin/${PORTNAME}
23
PORTDOCS=	Readme
23
PORTDOCS=	Readme
24
24
25
OPTIONS_DEFINE=	DOCS
25
OPTIONS_DEFINE=	DOCS
26
26
27
post-extract: .SILENT
28
	${REINPLACE_CMD} -e 's/ifdef BIG_ENDIAN/if BYTE_ORDER == BIG_ENDIAN/' \
29
		-e 's/ifndef BIG_ENDIAN/if BYTE_ORDER == LITTLE_ENDIAN/' \
30
			${WRKSRC}/dzip.h ${WRKSRC}/conmain.c
31
	${REINPLACE_CMD} -e '4s,^,#include <machine/endian.h>,' \
32
		${WRKSRC}/dzip.h
33
	${REINPLACE_CMD} -e '21d;23d' ${WRKSRC}/dzipcon.h
34
35
do-install:
36
	${INSTALL_PROGRAM} ${WRKSRC}/${PORTNAME} ${STAGEDIR}/${PREFIX}/bin
37
38
do-install-DOCS-on:
27
do-install-DOCS-on:
39
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
28
	@${MKDIR} ${STAGEDIR}${DOCSDIR}
40
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
29
	${INSTALL_DATA} ${PORTDOCS:S,^,${WRKSRC}/,} ${STAGEDIR}${DOCSDIR}
(-)b/archivers/dzip/distinfo (-2 / +5 lines)
Lines 1-2 Link Here
1
SHA256 (dz29src.zip) = de858f6a811096ebd099301cb4acd21eaf9eb1b3f95c1b21ec9e910bcf6f0f17
1
TIMESTAMP = 1690098385
2
SIZE (dz29src.zip) = 100354
2
SHA256 (kugelrund-dzip-v3.1_GH0.tar.gz) = 9f057e35ef5ddda1a0911b8f877a41b2934669377cb053b45364ddb72716b520
3
SIZE (kugelrund-dzip-v3.1_GH0.tar.gz) = 117213
4
SHA256 (92839ee4563a8a374ea45768a32cadd89432efc7.patch) = 32e0dc9fccc9da646b377f8a11622fb9e66833c425b5cf9c25d816099a2d17fa
5
SIZE (92839ee4563a8a374ea45768a32cadd89432efc7.patch) = 1684
(-)b/archivers/dzip/files/patch-crc32.c (+29 lines)
Added Link Here
1
--- crc32.c.orig	2023-07-23 08:10:00 UTC
2
+++ crc32.c
3
@@ -1,10 +1,12 @@
4
+#include <stdint.h>
5
+
6
 unsigned long crctable[256];
7
 unsigned long crcval;
8
 
9
-unsigned long crc_reflect(unsigned long x, int bits)
10
+unsigned long crc_reflect(uint32_t x, int bits)
11
 {
12
-	int i;
13
-	unsigned long v = 0, b = 1UL << (bits - 1);
14
+	uint32_t i;
15
+	uint32_t v = 0, b = 1 << (bits - 1);
16
 
17
 	for (i = 0; i < bits; i++)
18
 	{
19
@@ -16,8 +18,8 @@ unsigned long crc_reflect(unsigned long x, int bits)
20
 
21
 void crc_init(void)
22
 {
23
-	unsigned long crcpol = 0x04c11db7;
24
-	unsigned long i, j, k;
25
+	uint32_t crcpol = 0x04c11db7;
26
+	uint32_t i, j, k;
27
 
28
 	for (i = 0; i < 256; i++)
29
 	{
(-)b/archivers/dzip/files/patch-delete.c (+13 lines)
Added Link Here
1
--- delete.c.orig	2023-07-23 08:13:50 UTC
2
+++ delete.c
3
@@ -87,9 +87,7 @@ void dzDeleteFiles (uInt *list, uInt num, void (*Progr
4
 
5
 int intcmp (const void *arg1, const void *arg2)
6
 {
7
-	const uInt lhs = *(const uInt*)arg1;
8
-	const uInt rhs = *(const uInt*)arg2;
9
-	if (lhs < rhs) return -1;
10
+	if (*(uInt *)arg1 < *(uInt *)arg2) return -1;
11
 	return 1;
12
 }
13
 
(-)b/archivers/dzip/files/patch-dzip.h (+10 lines)
Added Link Here
1
--- dzip.h.orig	2023-07-23 07:59:50 UTC
2
+++ dzip.h
3
@@ -1,6 +1,7 @@
4
 #include <stdint.h>
5
 #include <stdio.h>
6
 #include <stdlib.h>
7
+#include <machine/endian.h>
8
 #include <string.h>
9
 
10
 #include <zlib.h>
(-)b/archivers/dzip/files/patch-dzipcon.h (+12 lines)
Added Link Here
1
--- dzipcon.h.orig	2023-07-23 08:01:13 UTC
2
+++ dzipcon.h
3
@@ -18,9 +18,7 @@
4
 	#include <unistd.h>
5
 
6
 	/* adjust if target platform supports large files */
7
-	#ifndef sparc
8
 	#define stat64 stat
9
-	#endif
10
 
11
 	#define CreateDir(x) mkdir(x->name, 0x1ff)
12
 

Return to bug 272676