diff --git a/mpq-tools/Makefile b/mpq-tools/Makefile index 13402600f1..795aa08c38 100644 --- a/mpq-tools/Makefile +++ b/mpq-tools/Makefile @@ -1,19 +1,18 @@ # $NetBSD: Makefile,v 1.5 2014/10/09 14:06:28 thomasklausner Exp $ # -DISTNAME= mpq-tools-0.3.0 +DISTNAME= mpq-tools-0.4.2 CATEGORIES= archivers -MASTER_SITES= https://babelize.org/download/ +MASTER_SITES= https://libmpq.org/download/ EXTRACT_SUFX= .tar.bz2 MAINTAINER= pkgsrc-users@NetBSD.org -HOMEPAGE= https://babelize.org/ +HOMEPAGE= https://libmpq.org/ COMMENT= Tools for manipulating MPQ (MoPaQ) archives USE_LIBTOOL= yes +USE_TOOLS+= pkg-config GNU_CONFIGURE= yes -INSTALLATION_DIRS= bin include lib share - -.include "../../devel/zlib/buildlink3.mk" +.include "../../wip/libmpq/buildlink3.mk" .include "../../mk/bsd.pkg.mk" diff --git a/mpq-tools/PLIST b/mpq-tools/PLIST index d3c2de44d7..1c1782f1ec 100644 --- a/mpq-tools/PLIST +++ b/mpq-tools/PLIST @@ -1,6 +1,5 @@ @comment $NetBSD: PLIST,v 1.2 2009/10/11 10:44:58 thomasklausner Exp $ bin/mpq-extract bin/mpq-info -include/libmpq/mpq.h -lib/libmpq.la -share/libmpq/db/diablo2/setup.mpq.conf +man/man1/mpq-extract.1 +man/man1/mpq-info.1 diff --git a/mpq-tools/distinfo b/mpq-tools/distinfo index d77037384a..443d8c658e 100644 --- a/mpq-tools/distinfo +++ b/mpq-tools/distinfo @@ -1,9 +1,6 @@ $NetBSD: distinfo,v 1.2 2005/09/28 06:41:30 rillig Exp $ -SHA1 (mpq-tools-0.3.0.tar.bz2) = 5d85f0b43a7afca70f5528b451f66bcf0b6ec114 -RMD160 (mpq-tools-0.3.0.tar.bz2) = f5184090a448d243d19c9c5f9357cdc6d1394326 -Size (mpq-tools-0.3.0.tar.bz2) = 175467 bytes -SHA1 (patch-aa) = 3a6058c27015dd60c10d4b91a32f5aec0ab1a1e4 -SHA1 (patch-ab) = 495678442b6be6469f12cec6b0fe77936cfd383d -SHA1 (patch-ac) = 9b3837dc7277ba481c4a63e624ed1ee5f7ac3a7d -SHA1 (patch-ad) = 198035568b0378cceb3e77e3d81fa4745e69cbc8 +SHA1 (mpq-tools-0.4.2.tar.bz2) = 6ad21f25f474a8ed8d5dfc906244a121b6573bac +RMD160 (mpq-tools-0.4.2.tar.bz2) = 9f6ba9313aa0cea76b9fa024613c80533f3068b2 +SHA512 (mpq-tools-0.4.2.tar.bz2) = df1251bdb0224053bca7e59f288ab725186fcc93e4ee7f334d581a69e207b5d63c7848cbbc5f48bf2f99b8e97d54f383d28b18791903de3f9eaa97bc1e4085de +Size (mpq-tools-0.4.2.tar.bz2) = 82855 bytes diff --git a/mpq-tools/patches/patch-aa b/mpq-tools/patches/patch-aa deleted file mode 100644 index 9bc5b27047..0000000000 --- a/mpq-tools/patches/patch-aa +++ /dev/null @@ -1,13 +0,0 @@ -$NetBSD: patch-aa,v 1.1.1.1 2004/10/23 17:31:31 bencollver Exp $ - ---- libmpq/mpq.h.orig Wed Feb 11 16:45:50 2004 -+++ libmpq/mpq.h -@@ -30,7 +30,7 @@ - #ifndef _MPQ_H - #define _MPQ_H - --#include -+#include - - #define LIBMPQ_MAJOR_VERSION 0 /* Major version number... maybe sometimes we reach version 1 :) */ - #define LIBMPQ_MINOR_VERSION 3 /* Minor version number - increased only for small changes */ diff --git a/mpq-tools/patches/patch-ab b/mpq-tools/patches/patch-ab deleted file mode 100644 index f81f06c169..0000000000 --- a/mpq-tools/patches/patch-ab +++ /dev/null @@ -1,81 +0,0 @@ -$NetBSD: patch-ab,v 1.1.1.1 2004/10/23 17:31:31 bencollver Exp $ - ---- libmpq/common.c.orig Wed Feb 11 16:42:54 2004 -+++ libmpq/common.c -@@ -29,6 +29,10 @@ - #include "libmpq/mpq.h" - #include "libmpq/common.h" - -+#ifndef strnlen -+#define strnlen(x,y) strlen(x) -+#endif -+ - /* - * This function decrypts a MPQ block. - */ -@@ -380,6 +384,8 @@ int libmpq_init_buffer(mpq_archive *mpq_ - int libmpq_read_hashtable(mpq_archive *mpq_a) { - unsigned int bytes = 0; - int rb = 0; -+ mpq_hash *mpq_h_end; -+ mpq_hash *mpq_h; - - /* - * Allocate memory. Note that the block table should be as large as the -@@ -400,8 +406,8 @@ int libmpq_read_hashtable(mpq_archive *m - } - - /* Decrypt hash table and check if it is correctly decrypted */ -- mpq_hash *mpq_h_end = mpq_a->hashtable + mpq_a->header->hashtablesize; -- mpq_hash *mpq_h = NULL; -+ mpq_h_end = mpq_a->hashtable + mpq_a->header->hashtablesize; -+ mpq_h = NULL; - - libmpq_decrypt_hashtable(mpq_a, "(hash table)"); - -@@ -431,6 +437,9 @@ int libmpq_read_hashtable(mpq_archive *m - int libmpq_read_blocktable(mpq_archive *mpq_a) { - unsigned int bytes = 0; - int rb = 0; -+ mpq_block *mpq_b_end; -+ mpq_block *mpq_b; -+ unsigned int archivesize; - - /* - * Allocate memory. Note that the block table should be as large as the -@@ -457,9 +466,9 @@ int libmpq_read_blocktable(mpq_archive * - * e.g. cracked Diablo version. We have to check if block table is - * already decrypted - */ -- mpq_block *mpq_b_end = mpq_a->blocktable + mpq_a->maxblockindex + 1; -- mpq_block *mpq_b = NULL; -- unsigned int archivesize = mpq_a->header->archivesize + mpq_a->mpqpos; -+ mpq_b_end = mpq_a->blocktable + mpq_a->maxblockindex + 1; -+ mpq_b = NULL; -+ archivesize = mpq_a->header->archivesize + mpq_a->mpqpos; - - if (mpq_a->header->offset != mpq_a->blocktable->filepos) { - libmpq_decrypt_blocktable(mpq_a, "(block table)"); -@@ -484,6 +493,9 @@ int libmpq_file_read_block(mpq_archive * - unsigned int bytesread = 0; /* Total number of bytes read */ - unsigned int nblocks; /* Number of blocks to load */ - unsigned int i; -+ unsigned int blockstart; -+ unsigned int blocksize; -+ unsigned int index; - - /* Test parameters. Block position and block size must be block-aligned, block size nonzero */ - if ((blockpos & (mpq_a->blocksize - 1)) || blockbytes == 0) { -@@ -589,9 +601,9 @@ int libmpq_file_read_block(mpq_archive * - mpq_a->filepos = readpos + bytesread; - - /* Block processing part. */ -- unsigned int blockstart = 0; /* Index of block start in work buffer. */ -- unsigned int blocksize = min(blockbytes, mpq_a->blocksize); -- unsigned int index = blocknum; /* Current block index. */ -+ blockstart = 0; /* Index of block start in work buffer. */ -+ blocksize = min(blockbytes, mpq_a->blocksize); -+ index = blocknum; /* Current block index. */ - bytesread = 0; /* Clear read byte counter */ - - /* Walk through all blocks. */ diff --git a/mpq-tools/patches/patch-ac b/mpq-tools/patches/patch-ac deleted file mode 100644 index f8a720db36..0000000000 --- a/mpq-tools/patches/patch-ac +++ /dev/null @@ -1,22 +0,0 @@ -$NetBSD: patch-ac,v 1.1.1.1 2004/10/23 17:31:31 bencollver Exp $ - ---- libmpq/huffman.h.orig Wed Jan 7 14:40:27 2004 -+++ libmpq/huffman.h -@@ -71,7 +71,7 @@ struct huffman_decompress { - union { - unsigned long dcmp_byte; /* 08 - Byte value for decompress (if bitCount <= 7) */ - struct huffman_tree_item *p_item; /* 08 - THTreeItem (if number of bits is greater than 7 */ -- }; -+ } val; - }; - - /* -@@ -97,7 +97,7 @@ struct huffman_tree { - struct huffman_tree_item *items306C[0x102]; /* 306C - huffman_tree_item pointer array */ - struct huffman_decompress qd3474[0x80]; /* 3474 - Array for quick decompression */ - -- unsigned char table1502A630[]; /* Some table to make struct size flexible */ -+ unsigned char *table1502A630; /* Some table to make struct size flexible */ - }; - - #endif /* _HUFFMAN_H */ diff --git a/mpq-tools/patches/patch-ad b/mpq-tools/patches/patch-ad deleted file mode 100644 index def766becf..0000000000 --- a/mpq-tools/patches/patch-ad +++ /dev/null @@ -1,38 +0,0 @@ -$NetBSD: patch-ad,v 1.1.1.1 2004/10/23 17:31:31 bencollver Exp $ - ---- libmpq/huffman.c.orig Fri Jan 16 15:45:19 2004 -+++ libmpq/huffman.c -@@ -715,13 +715,13 @@ int libmpq_huff_do_decompress(struct huf - if (qd->bits > 7) { - is->bit_buf >>= 7; - is->bits -= 7; -- p_item1 = qd->p_item; -+ p_item1 = qd->val.p_item; - found = 1; - } - if (found == 0) { - is->bit_buf >>= qd->bits; - is->bits -= qd->bits; -- dcmp_byte = qd->dcmp_byte; -+ dcmp_byte = qd->val.dcmp_byte; - } - } else { - found = 1; -@@ -748,7 +748,7 @@ int libmpq_huff_do_decompress(struct huf - if (bit_count > 7) { - qd->offs00 = ht->offs0004; - qd->bits = bit_count; -- qd->p_item = p_item2; -+ qd->val.p_item = p_item2; - } else { - unsigned long index = n7bits & (0xFFFFFFFF >> (32 - bit_count)); - unsigned long add = (1 << bit_count); -@@ -756,7 +756,7 @@ int libmpq_huff_do_decompress(struct huf - for (qd = &ht->qd3474[index]; index <= 0x7F; index += add, qd += add) { - qd->offs00 = ht->offs0004; - qd->bits = bit_count; -- qd->dcmp_byte = p_item1->dcmp_byte; -+ qd->val.dcmp_byte = p_item1->dcmp_byte; - } - } - }