summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf/checksums.ini4
-rw-r--r--recipes/mtools/files/no-x11.patch19
-rw-r--r--recipes/mtools/files/plainio.patch13
-rw-r--r--recipes/mtools/files/use-sg_io.patch80
-rw-r--r--recipes/mtools/mtools-native_4.0.10.bb (renamed from recipes/mtools/mtools-native_3.9.11.bb)0
-rw-r--r--recipes/mtools/mtools_4.0.10.bb (renamed from recipes/mtools/mtools_3.9.11.bb)7
6 files changed, 101 insertions, 22 deletions
diff --git a/conf/checksums.ini b/conf/checksums.ini
index 77b4b4f6e3..447957e8a9 100644
--- a/conf/checksums.ini
+++ b/conf/checksums.ini
@@ -16902,6 +16902,10 @@ sha256=af083a73425d664d4607ef6c6564fd9319a0e47ee7c105259a45356cb834690e
md5=3e68b857b4e1f3a6521d1dfefbd30a36
sha256=af083a73425d664d4607ef6c6564fd9319a0e47ee7c105259a45356cb834690e
+[http://ftp.gnu.org/gnu/mtools/mtools-4.0.10.tar.bz2]
+md5=750c2beba968a5d46dbaae24551a82b9
+sha256=860fee13acb39365bd28763070e24011ea55f381f96714d2841937525aa02ded
+
[http://downloads.sourceforge.net/mtpaint/mtpaint-3.02.tar.bz2]
md5=828013176f135fc24ffdf16a011c51e6
sha256=991a1376dc23d0663d45b3b395c0e5c5542fee3906a120889583d67f854f5206
diff --git a/recipes/mtools/files/no-x11.patch b/recipes/mtools/files/no-x11.patch
deleted file mode 100644
index 300f43f000..0000000000
--- a/recipes/mtools/files/no-x11.patch
+++ /dev/null
@@ -1,19 +0,0 @@
----
- Makefile.in | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- mtools-3.9.9.orig/Makefile.in
-+++ mtools-3.9.9/Makefile.in
-@@ -128,11 +128,11 @@ X_EXTRA_LIBS = @X_EXTRA_LIBS@
- X_PRE_LIBS = @X_PRE_LIBS@
- CFLAGS = $(CPPFLAGS) $(DEFS) $(MYCFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
- CXXFLAGS = $(CPPFLAGS) $(DEFS) $(MYCXXFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
- LINK = $(CC) $(LDFLAGS) $(USERLDFLAGS) @extralibdir@
- ALLLIBS = $(USERLDLIBS) $(MACHDEPLIBS) $(SHLIB) $(LIBS)
--X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) -lXau -lX11 $(LIBS)
-+X_LDFLAGS = $(X_EXTRA_LIBS) $(X_LIBS) $(X_PRE_LIBS) $(LIBS)
- X_CCFLAGS = $(X_CFLAGS) $(CFLAGS)
-
- all: mtools $(LINKS) mkmanifest @FLOPPYD@
-
- %.o: %.c
diff --git a/recipes/mtools/files/plainio.patch b/recipes/mtools/files/plainio.patch
new file mode 100644
index 0000000000..b4bd1d6615
--- /dev/null
+++ b/recipes/mtools/files/plainio.patch
@@ -0,0 +1,13 @@
+01_plainio.dpatch by Martin Pitt <mpitt@debian.org>
+Fixes garbage output of mtype under certain circumstances; closes #217413
+
+--- mtools-3.9.9/plain_io.c 2003-02-16 17:18:58.000000000 +0100
++++ mtools-3.9.9/plain_io.c 2004-01-14 00:56:11.000000000 +0100
+@@ -524,6 +524,7 @@
+ printOom();
+ return 0;
+ }
++ memset((void*)This, 0, sizeof(SimpleFile_t));
+ This->scsi_sector_size = 512;
+ This->seekable = 1;
+ #ifdef OS_hpux
diff --git a/recipes/mtools/files/use-sg_io.patch b/recipes/mtools/files/use-sg_io.patch
new file mode 100644
index 0000000000..33867deb1a
--- /dev/null
+++ b/recipes/mtools/files/use-sg_io.patch
@@ -0,0 +1,80 @@
+08.scsi.c.dpatch by Thomas Richter <thor@mail.math.tu-berlin.de>
+#393878 mzip unreliable on 2.6.18
+
+--- mtools-3.9.10/scsi.c 2002-11-02 13:09:28.000000000 +0100
++++ mtools-3.9.10/scsi.c 2006-10-17 21:11:01.000000000 +0200
+@@ -37,12 +37,7 @@
+ #endif
+
+ #ifdef OS_linux
+-#define SCSI_IOCTL_SEND_COMMAND 1
+-struct scsi_ioctl_command {
+- int inlen;
+- int outlen;
+- char cmd[5008];
+-};
++#include <scsi/sg.h>
+ #endif
+
+ #ifdef _SCO_DS
+--- mtools-3.9.10/scsi.c 2007-05-26 19:02:56.000000000 +1000
++++ mtools-3.9.10/scsi.c 2008-04-08 20:30:16.000000000 +1000
+@@ -148,37 +148,33 @@ int scsi_cmd(int fd, unsigned char *cdb,
+ return 0;
+
+ #elif defined OS_linux
+- struct scsi_ioctl_command my_scsi_cmd;
++ struct sg_io_hdr scsi_cmd;
+
++ /*
++ ** Init the command
++ */
++ memset(&scsi_cmd,0,sizeof(scsi_cmd));
++ scsi_cmd.interface_id = 'S';
++ scsi_cmd.dxfer_direction = (mode == SCSI_IO_READ)?(SG_DXFER_FROM_DEV):(SG_DXFER_TO_DEV);
++ scsi_cmd.cmd_len = cmdlen;
++ scsi_cmd.mx_sb_len = 0;
++ scsi_cmd.dxfer_len = len;
++ scsi_cmd.dxferp = data;
++ scsi_cmd.cmdp = cdb;
++ scsi_cmd.timeout = ~0; /* where is MAX_UINT defined??? */
++
++#if DEBUG
++ printf("CMD(%d): %02x%02x%02x%02x%02x%02x %sdevice\n",cmdlen,cdb[0],cdb[1],cdb[2],cdb[3],cdb[4],cdb[5],
++ (mode==SCSI_IO_READ)?("<-"):("->"));
++ printf("DATA : len = %d\n",len);
++#endif
+
+- memcpy(my_scsi_cmd.cmd, cdb, cmdlen); /* copy command */
+-
+- switch (mode) {
+- case SCSI_IO_READ:
+- my_scsi_cmd.inlen = 0;
+- my_scsi_cmd.outlen = len;
+- break;
+- case SCSI_IO_WRITE:
+- my_scsi_cmd.inlen = len;
+- my_scsi_cmd.outlen = 0;
+- memcpy(my_scsi_cmd.cmd + cmdlen,data,len);
+- break;
+- }
+-
+- if (ioctl(fd, SCSI_IOCTL_SEND_COMMAND, &my_scsi_cmd) < 0) {
++ if (ioctl(fd, SG_IO,&scsi_cmd) < 0) {
+ perror("scsi_io");
+ return -1;
+ }
+
+- switch (mode) {
+- case SCSI_IO_READ:
+- memcpy(data, &my_scsi_cmd.cmd[0], len);
+- break;
+- case SCSI_IO_WRITE:
+- break;
+- }
+-
+- return 0; /* where to get scsi status? */
++ return 0;
+
+ #elif (defined _SCO_DS) && (defined SCSIUSERCMD)
+ struct scsicmd my_scsi_cmd;
diff --git a/recipes/mtools/mtools-native_3.9.11.bb b/recipes/mtools/mtools-native_4.0.10.bb
index c82f7404eb..c82f7404eb 100644
--- a/recipes/mtools/mtools-native_3.9.11.bb
+++ b/recipes/mtools/mtools-native_4.0.10.bb
diff --git a/recipes/mtools/mtools_3.9.11.bb b/recipes/mtools/mtools_4.0.10.bb
index 4d1822f0d7..5b7f0cd890 100644
--- a/recipes/mtools/mtools_3.9.11.bb
+++ b/recipes/mtools/mtools_4.0.10.bb
@@ -1,16 +1,17 @@
# mtools OE build file
# Copyright (C) 2004-2006, Advanced Micro Devices, Inc. All Rights Reserved
+# Copyright (C) 2009, O.S. Systems Software Ltda. All Rights Reserved
# Released under the MIT license (see packages/COPYING)
DESCRIPTION="Mtools is a collection of utilities for accessing MS-DOS disks from Unix without mounting them."
HOMEPAGE="http://mtools.linux.lu"
LICENSE="GPL"
-PR = "r4"
-SRC_URI="http://mtools.linux.lu/mtools-${PV}.tar.gz \
+SRC_URI="http://ftp.gnu.org/gnu/mtools/mtools-${PV}.tar.bz2 \
file://m486.patch;patch=1 \
file://mtools-makeinfo.patch;patch=1 \
- file://no-x11.patch;patch=1"
+ file://plainio.patch;patch=1 \
+ file://use-sg_io.patch;patch=1"
S = "${WORKDIR}/mtools-${PV}"