the Fink project is an effort to port
popular Unix programs to Mac OS X
Package: mtools
Version: 4.0.10
Revision: 1
Maintainer: None
Source: mirror:gnu:%n/%n-%v.tar.bz2
Source-MD5: 750c2beba968a5d46dbaae24551a82b9
PatchFile: %n.patch
PatchFile-MD5: d15a91c3680a5baa205198329c556f11
PatchScript: <<
%{default_script}
perl -pi -e 's,/usr/local/etc,%p/etc,g' mtools.texi mtools.5
perl -pi -e 's,/etc/mtools.conf,%p\1,g' mtools.1
<<
BuildDepends: <<
fink (>= 0.24.12-1),
libiconv-dev,
x11-dev
<<
Depends: <<
libiconv,
x11
<<
ConfigureParams: --mandir=%i/share/man --infodir=%i/share/info ac_cv_path_INSTALL_INFO="" --x-i=/usr/X11R6/include --x-l=/usr/X11R6/lib
InstallScript: <<
make install prefix=%i
mkdir -p %i/etc
cp mtools.conf %i/etc
<<
DocFiles: COPYING README Release.notes
ConfFiles: %p/etc/mtools.conf
InfoDocs: mtools.info
Description: Collection of tools to manipulate MSDOS files
DescDetail: <<
Mtools is a collection of programs to allow unix systems to read, write,
and manipulate files on an MSDOS filesystem. Each program attempts to
emulate the MSDOS eqivalent command as closely as practical.
<<
DescPackaging: <<
Originally packaged by Matt Stephenson.
dmacks: patched to use fink-installed conf file (and adjusted docs
accordingly).
<<
DescPort: <<
There are darwin-versioned and CPU-dependent -D flags determined in
configure and passed via Makefile, but none of the values we get have
any effect.
Patch out the #define Free() that is the same as in
<<
License: GPL
Homepage: http://mtools.linux.lu
diff -Nurd -x'*~' mtools-4.0.1.orig/Makefile.in mtools-4.0.1/Makefile.in
--- mtools-4.0.1.orig/Makefile.in 2008-11-01 16:26:52.000000000 -0400
+++ mtools-4.0.1/Makefile.in 2008-12-09 12:01:49.000000000 -0500
@@ -127,7 +127,7 @@
X_LIBS = @X_LIBS@
X_EXTRA_LIBS = @X_EXTRA_LIBS@
X_PRE_LIBS = @X_PRE_LIBS@
-CFLAGS = $(CPPFLAGS) $(DEFS) $(MYCFLAGS) -fno-strict-aliasing -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
-CXXFLAGS = $(CPPFLAGS) $(DEFS) $(MYCXXFLAGS) -I. @extraincludedir@ -I@srcdir@ $(USERCFLAGS)
+CFLAGS = -I. -I@srcdir@ $(CPPFLAGS) $(DEFS) $(MYCFLAGS) -fno-strict-aliasing @extraincludedir@ $(USERCFLAGS)
+CXXFLAGS = -I. -I@srcdir@ $(CPPFLAGS) $(DEFS) $(MYCXXFLAGS) @extraincludedir@ $(USERCFLAGS)
LINK = $(CC) $(LDFLAGS) $(USERLDFLAGS) @extralibdir@
ALLLIBS = $(USERLDLIBS) $(MACHDEPLIBS) $(SHLIB) $(LIBS)
@@ -143,7 +143,7 @@
# $(CXX) $(CXXFLAGS) -c $<
mtools: $(OBJS1)
- $(LINK) $(OBJS1) -o $@ $(ALLLIBS)
+ $(LINK) $(OBJS1) -o $@ $(ALLLIBS) -liconv
mkmanifest: $(OBJS2)
$(LINK) $(OBJS2) -o $@ $(ALLLIBS)
diff -Nurd -x'*~' mtools-4.0.1.orig/config.c mtools-4.0.1/config.c
--- mtools-4.0.1.orig/config.c 2008-11-28 17:24:37.000000000 -0500
+++ mtools-4.0.1/config.c 2008-12-09 11:51:32.000000000 -0500
@@ -707,13 +707,7 @@
memcpy(devices, const_devices,
nr_const_devices*sizeof(struct device));
- (void) ((parse(CONF_FILE,1) |
- parse(LOCAL_CONF_FILE,1) |
- parse(SYS_CONF_FILE,1)) ||
- (parse(OLD_CONF_FILE,1) |
- parse(OLD_LOCAL_CONF_FILE,1)));
- /* the old-name configuration files only get executed if none of the
- * new-name config files were used */
+ parse(SYS_CONF_FILE,1);
homedir = get_homedir();
if ( homedir ){
diff -Nurd -x'*~' mtools-4.0.1.orig/mformat.c mtools-4.0.1/mformat.c
--- mtools-4.0.1.orig/mformat.c 2008-12-07 15:39:13.000000000 -0500
+++ mtools-4.0.1/mformat.c 2008-12-09 11:51:32.000000000 -0500
@@ -419,7 +419,7 @@
if ( Fs->num_clus < FAT16 && Fs->fat_bits > 16 ){
fprintf(stderr,"Too few clusters for this fat size."
- " Please choose a 16-bit fat in your /etc/mtools.conf"
+ " Please choose a 16-bit fat in your SYSCONFDIR/mtools.conf"
" or .mtoolsrc file\n");
exit(1);
}
@@ -1061,7 +1061,7 @@
sprintf(errmsg,
"Unknown geometry "
"(You must tell the complete geometry "
- "of the disk, \neither in /etc/mtools.conf or "
+ "of the disk, \neither in SYSCONFDIR/mtools.conf or "
"on the command line) ");
continue;
}
diff -Nurd -x'*~' mtools-4.0.1.orig/mtools.h mtools-4.0.1/mtools.h
--- mtools-4.0.1.orig/mtools.h 2008-11-01 15:46:28.000000000 -0400
+++ mtools-4.0.1/mtools.h 2008-12-09 11:51:39.000000000 -0500
@@ -180,7 +180,9 @@
#define New(type) ((type*)(calloc(1,sizeof(type))))
#define Grow(adr,n,type) ((type*)(realloc((char *)adr,n*sizeof(type))))
+#ifndef Free
#define Free(adr) (free((char *)adr));
+#endif
#define NewArray(size,type) ((type*)(calloc((size),sizeof(type))))
void mattrib(int argc, char **argv, int type);
diff -Nurd -x'*~' mtools-4.0.1.orig/mtools.texi mtools-4.0.1/mtools.texi
--- mtools-4.0.1.orig/mtools.texi 2008-12-07 15:38:40.000000000 -0500
+++ mtools-4.0.1/mtools.texi 2008-12-09 11:53:44.000000000 -0500
@@ -113,7 +113,7 @@
Mtools is sufficient to give access to MS-DOS filesystems. For
instance, commands such as @code{mdir a:} work on the @code{a:} floppy
without any preliminary mounting or initialization (assuming the default
-@file{/etc/mtools.conf} works on your machine). With mtools, one can
+@file{/usr/local/etc/mtools.conf} works on your machine). With mtools, one can
change floppies too without unmounting and mounting.
@@ -647,9 +647,6 @@
@file{/usr/local/etc/mtools.conf} is the system-wide configuration file,
and @file{~/.mtoolsrc} is the user's private configuration file.
-On some systems, the system-wide configuration file is called
-@file{/etc/default/mtools.conf} instead.
-
@node general syntax, default values, config file location, Configuration
@subsection General configuration file syntax
@@ -1179,11 +1176,6 @@
@item
@file{/usr/local/etc/mtools.conf}
@item
-@file{/etc/mtools}
-This is for backwards compatibility only, and is only parsed if
-@file{mtools.conf}
-doesn't exist.
-@item
@file{~/.mtoolsrc}.
@item
@file{$MTOOLSRC} (file pointed by the @code{MTOOLSRC} environmental
diff -Nurd -x'*~' mtools-4.0.1.orig/mtoolsPaths.h mtools-4.0.1/mtoolsPaths.h
--- mtools-4.0.1.orig/mtoolsPaths.h 2002-05-01 05:49:04.000000000 -0400
+++ mtools-4.0.1/mtoolsPaths.h 2008-12-09 11:51:39.000000000 -0500
@@ -6,23 +6,8 @@
* only a very low probability of conflicting.
*/
-
-#define CONF_FILE "/etc/mtools.conf"
-
-
-#define OLD_CONF_FILE "/etc/mtools"
-
-
-
-#define LOCAL_CONF_FILE "/etc/default/mtools.conf"
-/* Use this if you like to keep the configuration file in a non-standard
- * place such as /etc/default, /opt/etc, /usr/etc, /usr/local/etc ...
- */
-
#define SYS_CONF_FILE SYSCONFDIR "/mtools.conf"
-#define OLD_LOCAL_CONF_FILE "/etc/default/mtools"
-
#define CFG_FILE1 "/.mtoolsrc"