mpq-tools: update to mpq-tools-0.4.2

Changelog:

2008-05-16 14:49  babyface

	* mpq-tools 0.4.2 release

2008-05-16 14:32  babyface

	* NEWS, configure.ac: updated files

2008-05-14 21:16  babyface

	* src/mpq-extract.c, src/mpq-info.c: fixed segmentation fault on
	  32-bit with enabled largefile support

2008-04-29 21:42  babyface

	* configure.ac: added autoconf macro AC_FUNC_FSEEKO to define the
	  macro _LARGEFILE_SOURCE only on systems where it is required for
	  largefile support

2008-04-27 22:42  babyface

	* src/mpq-extract.c: added support for changed parameter layout in
	  function libmpq__file_read()

2008-04-27 22:28  babyface

	* src/mpq-extract.c: updated to the latest API

2008-04-24 20:22  babyface

	* configure.ac: added autoconf macro AC_SYS_LARGEFILE

2008-04-24 19:17  babyface

	* src/mpq-extract.c, src/mpq-info.c: fixed segmentation fault if
	  macro _LARGEFILE_SOURCE is defined the off_t return values
	  becomes unsigned long long int

2008-04-23 23:07  babyface

	* src/mpq-extract.c: there is no need to call libmpq__file_open()
	  and libmpq__file_close() for showing file information

2008-04-22 00:22  babyface

	* src/mpq-extract.c, src/mpq-info.c: added support for new API
	  starting file numbering from 0 instead of 1 and replaced
	  get_filename() hack with libmpq__file_name()

2008-04-21 21:07  babyface

	* src/mpq-extract.c, src/mpq-info.c: added support for archives and
	  files with 2gb or more, added support for latest API and replaced
	  the lowlevel file operations with <stdio.h> calls to make the
	  code more portable and conforming to ANSI-C

2008-04-16 11:03  babyface

	* AUTHORS: added forrestv to the developers cause of his
	  development work for mpq-tools

2008-04-16 09:54  tilman

	* src/mpq-extract.c, src/mpq-info.c: Propery include config.h.

2008-04-16 09:54  tilman

	* src/mpq-extract.c, src/mpq-info.c: Include limits.h to get
	  PATH_MAX.

2008-04-12 20:12  forrestv

	* src/mpq-extract.c, src/mpq-info.c: Update to new _archive_open

2008-04-09 19:40  forrestv

	* src/mpq-extract.c, src/mpq-info.c: Updated to current libmpq API.

2008-04-02 19:01  babyface

	* mpq-tools 0.4.1 release

2008-04-02 19:00  babyface

	* NEWS: initial checkin

2008-04-02 19:00  babyface

	* AUTHORS: added tilman to the developers cause of his development
	  work for mpq-tools

2008-04-02 12:39  tilman

	* src/mpq-extract.c: mpq-extract now handles situations where
	  libmpq__file_name() returns NULL.

	  In that case, mpq-extract creates a dummy filename like
	  "fileNNNNN.xxx".

2008-04-02 12:19  tilman

	* src/mpq-extract.c: mpq-extract now accepts file numbers instead
	  of file names.

	  eg you now have to run "mpq-extract -l foo.mpq 13" to get
	  information
	  about the 13th file in the archive.

2008-04-02 10:50  tilman

	* src/mpq-info.c: Only call libmpq__archive_close() if an archive
	  was opened.

	  It's invalid to call libmpq__archive_close() if
	  libmpq__archive_open) failed.

2008-04-02 06:24  tilman

	* src/mpq-extract.c: Abort if we aren't given any action.

2008-04-02 06:24  tilman

	* src/mpq-extract.c: Renamed 'option' to 'action' for clarity.

2008-04-01 18:35  tilman

	* src/mpq-extract.c, src/mpq-info.c: Initialize and shutdown
	  libmpq.

2008-03-31 21:01  babyface

	* src/mpq-extract.c: fixed a segmentation fault by adding
	  libmpq__file_open() and libmpq__file_close() around the
	  libmpq__file_info()

2008-03-31 15:26  babyface

	* FAQ: fixed typo

2008-03-31 15:24  babyface

	* AUTHORS, COPYING, FAQ, INSTALL, Makefile.am, README, THANKS,
	  TODO, autogen.sh, configure.ac, doc, doc/Makefile.am, doc/man1,
	  doc/man1/Makefile.am, doc/man1/mpq-extract.1,
	  doc/man1/mpq-info.1, src, src/Makefile.am, src/mpq-extract.c,
	  src/mpq-info.c: initial checkin

2008-03-31 13:46  babyface

	* created tags directory

2008-03-31 13:46  babyface

	* created trunk directory
This commit is contained in:
Yorick Hardy 2019-11-05 23:11:16 +02:00
parent 4c2ab940f2
commit c3e48fef17
7 changed files with 11 additions and 170 deletions

View File

@ -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"

View File

@ -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

View File

@ -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

View File

@ -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 <linux/limits.h>
+#include <limits.h>
#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 */

View File

@ -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. */

View File

@ -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 */

View File

@ -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;
}
}
}