summaryrefslogtreecommitdiff
path: root/repo/mtools
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
committerdavidovski <david@davidovski.xyz>2023-02-02 14:10:02 +0000
commitf29d569cd33a73da5ad675f43a34ad53c5cc9bc6 (patch)
tree76fe6267f8307e7630fc6f53ff99a9767ad40de0 /repo/mtools
parent05d004dfe0c9a9d898fac8a4a0292ca2a74ca391 (diff)
Work
Diffstat (limited to 'repo/mtools')
-rw-r--r--repo/mtools/fix-uninitialized.patch13
-rw-r--r--repo/mtools/mtools.xibuild38
2 files changed, 51 insertions, 0 deletions
diff --git a/repo/mtools/fix-uninitialized.patch b/repo/mtools/fix-uninitialized.patch
new file mode 100644
index 0000000..5984d5d
--- /dev/null
+++ b/repo/mtools/fix-uninitialized.patch
@@ -0,0 +1,13 @@
+diff --git a/init.c b/init.c
+index af154b7..4040018 100644
+--- a/init.c
++++ b/init.c
+@@ -156,7 +156,7 @@ static Stream_t *try_device(struct device *dev,
+ #endif
+
+ for(retry_write=0; retry_write<2; retry_write++) {
+- Stream_t *Stream;
++ Stream_t *Stream = NULL;
+ int r;
+ int geomFailure=0;
+ if(retry_write)
diff --git a/repo/mtools/mtools.xibuild b/repo/mtools/mtools.xibuild
new file mode 100644
index 0000000..0a684ef
--- /dev/null
+++ b/repo/mtools/mtools.xibuild
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+NAME="mtools"
+DESC="collection of utilities to access MS-DOS disks from Unix without mounting them"
+
+MAKEDEPS="texinfo linux-headers"
+
+PKG_VER=4.0.41
+SOURCE="https://ftp.gnu.org/gnu/mtools/mtools-$PKG_VER.tar.bz2"
+
+ADDITIONAL="
+fix-uninitialized.patch
+"
+
+prepare () {
+ apply_patches
+}
+
+build() {
+ # todo: configure scripts are broken
+ export CFLAGS="$CFLAGS -DOS_linux"
+ ./configure \
+ --prefix=/usr \
+ --mandir=/usr/share/man \
+ --infodir=/usr/share/info \
+ --sysconfdir=/etc/mtools \
+ --without-x
+ make
+}
+
+check() {
+ make check
+}
+
+package() {
+ make -j1 install DESTDIR="$PKG_DEST"
+}
+