aboutsummaryrefslogtreecommitdiff
path: root/emulators/mtools
diff options
context:
space:
mode:
authorMartin Wilke <miwi@FreeBSD.org>2009-01-14 09:12:17 +0000
committerMartin Wilke <miwi@FreeBSD.org>2009-01-14 09:12:17 +0000
commit9747f75669249244fb5814336c65856932bd7d98 (patch)
tree5aedff06f4318da390fe0bcf30b1b2af12e61acf /emulators/mtools
parentecf8a3ad009509ace8278156cde174806cb24f84 (diff)
downloadports-9747f75669249244fb5814336c65856932bd7d98.tar.gz
ports-9747f75669249244fb5814336c65856932bd7d98.zip
Notes
Diffstat (limited to 'emulators/mtools')
-rw-r--r--emulators/mtools/Makefile76
-rw-r--r--emulators/mtools/distinfo9
-rw-r--r--emulators/mtools/files/patch-charsetConv.c10
-rw-r--r--emulators/mtools/files/patch-mformat.c18
-rw-r--r--emulators/mtools/files/patch-sysincludes.h10
-rw-r--r--emulators/mtools/files/pkg-message.in3
-rw-r--r--emulators/mtools/pkg-plist7
7 files changed, 60 insertions, 73 deletions
diff --git a/emulators/mtools/Makefile b/emulators/mtools/Makefile
index 16a4b973ac99..8e1c9dcc6c0b 100644
--- a/emulators/mtools/Makefile
+++ b/emulators/mtools/Makefile
@@ -6,56 +6,64 @@
#
PORTNAME= mtools
-PORTVERSION= 3.9.10
-PORTREVISION= 4
+PORTVERSION= 4.0.1
CATEGORIES= emulators
-MASTER_SITES= ftp://ftp.tux.org/pub/knaff/mtools/ \
+MASTER_SITES= ${MASTER_SITE_SUNSITE} \
http://mtools.linux.lu/
-
-PATCH_SITES= http://mtools.linux.lu/
-PATCHFILES= mtools-3.9.10-20060525.diff.gz
-PATCH_DIST_STRIP= -p1
+MASTER_SITE_SUBDIR= utils/disk-management
MAINTAINER= ports@FreeBSD.org
COMMENT= A collection of tools for manipulating MSDOS files
+USE_BZIP2= yes
+USE_GMAKE= yes
GNU_CONFIGURE= yes
-.if !defined(WITHOUT_X11)
-USE_XORG= x11 sm ice xau
-CONFIGURE_ARGS= --enable-xdf --enable-floppyd
-PLIST_SUB= WITH_X11=""
-.else
-CONFIGURE_ARGS= --enable-xdf --disable-floppyd
-PLIST_SUB= WITH_X11="@comment "
-.endif
+CONFIGURE_ENV= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" \
+ ac_cv_header_malloc_h=no
+CONFIGURE_ARGS= --enable-xdf
-USE_GMAKE= yes
-INFO= mtools
+SUB_FILES= pkg-message
-MAN1= mattrib.1 mbadblocks.1 mcat.1 mcd.1 mclasserase.1 mcopy.1 mdel.1 mdeltree.1 \
- mdir.1 mdu.1 mformat.1 mkmanifest.1 minfo.1 mlabel.1 mmd.1 mmount.1 \
- mmove.1 mpartition.1 mrd.1 mren.1 mshowfat.1 \
- mtoolstest.1 mtools.1 mtype.1 mzip.1
+MAN1= mattrib.1 mbadblocks.1 mcat.1 mcd.1 mclasserase.1 mcopy.1 \
+ mdel.1 mdeltree.1 mdir.1 mdu.1 mformat.1 mkmanifest.1 \
+ minfo.1 mlabel.1 mmd.1 mmount.1 mmove.1 mpartition.1 \
+ mrd.1 mren.1 mshowfat.1 mtoolstest.1 mtools.1 mtype.1 \
+ mzip.1
MAN5= mtools.5
+INFO= mtools
+
+.if defined(WITHOUT_ICONV)
+CONFIGURE_ENV+= ac_cv_header_iconv_h=no
+.else
+USE_ICONV= yes
+CPPFLAGS+= -I${LOCALBASE}/include
+LDFLAGS+= -L${LOCALBASE}/lib -liconv
+.endif
-.if !defined(WITHOUT_X11)
+.if defined(WITHOUT_X11)
+CONFIGURE_ARGS+= --without-x
+PLIST_SUB= X11="@comment "
+.else
+USE_XORG= x11 sm ice xau
+PLIST_SUB= X11=""
MAN1+= floppyd.1 floppyd_installtest.1
.endif
post-patch:
- @cd ${WRKSRC}; for f in config.c mformat.c mtools.5 mtools.texi; do \
- ${MV} -f $$f $$f.orig; \
- ${SED} -e s:/etc/mtools.conf:${PREFIX}/etc/mtools.conf: \
- < $$f.orig > $$f; done
- @cd ${WRKSRC}/scripts; for f in ocopy xcopy; do \
- if [ ! -f $$f -a -f $$f.orig ]; then ${CP} -p $$f.orig $$f ; fi \
- done
+.for file in mformat.c
+ @${REINPLACE_CMD} -e 's|/etc/mtools.conf|${PREFIX}/etc/mtools.conf|g' \
+ ${WRKSRC}/${file}
+.endfor
+.for file in mtools.5 mtools.texi
+ @${REINPLACE_CMD} -e 's|/usr/local/etc/|${PREFIX}/etc/|g' \
+ ${WRKSRC}/${file}
+.endfor
post-install:
-# mwrite has been removed by author, but we'll keep it just a bit longer
- @cd ${PREFIX}/bin && ${LN} -sf mtools mwrite
- @${LN} -sf ${PREFIX}/man/man1/mcopy.1.gz ${PREFIX}/man/man1/mwrite.1.gz
- @${INSTALL_DATA} ${WRKSRC}/mtools.conf ${PREFIX}/etc/mtools.conf.sample
- @${ECHO} "Please verify ${PREFIX}/etc/mtools.conf for your machine."
+ ${INSTALL_DATA} ${WRKSRC}/mtools.conf ${PREFIX}/etc/mtools.conf.sample
+.if !exists(${PREFIX}/etc/mtools.conf)
+ @cd ${PREFIX}/etc && ${CP} -f mtools.conf.sample mtools.conf
+.endif
+ @${CAT} ${PKGMESSAGE}
.include <bsd.port.mk>
diff --git a/emulators/mtools/distinfo b/emulators/mtools/distinfo
index 34d22688f4c6..41d3a90b381e 100644
--- a/emulators/mtools/distinfo
+++ b/emulators/mtools/distinfo
@@ -1,6 +1,3 @@
-MD5 (mtools-3.9.10-20060525.diff.gz) = e4f40b3c76cb343bdb9aa18b8523fc27
-MD5 (mtools-3.9.10.tar.gz) = 19bc1f06e9c5865b8ad20b1ddd976f5f
-SHA256 (mtools-3.9.10-20060525.diff.gz) = dc03d7212808e3f91c685b09fabd5fb9b21f2e08bb861cf86d33cd82564ef432
-SHA256 (mtools-3.9.10.tar.gz) = 88d3213a5c9613bc9926e7c968df1c3503266d2e9e8aa2c3da5bd18d673613d6
-SIZE (mtools-3.9.10-20060525.diff.gz) = 10040
-SIZE (mtools-3.9.10.tar.gz) = 387208
+MD5 (mtools-4.0.1.tar.bz2) = 4c91d1f26a201e3e7d440e125764790c
+SHA256 (mtools-4.0.1.tar.bz2) = 6ceb7d087b7acb9308f523571eee0ce2788c913c9a2f01a3b03979bb6eb705a9
+SIZE (mtools-4.0.1.tar.bz2) = 272909
diff --git a/emulators/mtools/files/patch-charsetConv.c b/emulators/mtools/files/patch-charsetConv.c
new file mode 100644
index 000000000000..4b27b6adb235
--- /dev/null
+++ b/emulators/mtools/files/patch-charsetConv.c
@@ -0,0 +1,10 @@
+--- charsetConv.c.orig 2008-11-19 06:33:11.000000000 +0900
++++ charsetConv.c 2008-12-09 00:38:26.000000000 +0900
+@@ -5,7 +5,6 @@
+ #include "msdos.h"
+ #include "mtools.h"
+
+-#include <iconv.h>
+ #include <stdio.h>
+ #include <errno.h>
+ #include <stdlib.h>
diff --git a/emulators/mtools/files/patch-mformat.c b/emulators/mtools/files/patch-mformat.c
deleted file mode 100644
index e2a97f25b6a2..000000000000
--- a/emulators/mtools/files/patch-mformat.c
+++ /dev/null
@@ -1,18 +0,0 @@
---- mformat.c~ Sat May 27 07:09:45 2006
-+++ mformat.c Sat May 27 07:24:05 2006
-@@ -689,6 +689,7 @@
- exit(1);
- }
-
-+#ifdef OS_linux
- static int get_block_geom(int fd, struct MT_STAT *buf, struct device *dev,
- char *errmsg) {
- struct hd_geometry geom;
-@@ -733,6 +734,7 @@
- size = dev->tracks * dev->heads * dev->sectors + dev->hidden;
- return 0;
- }
-+#endif
-
- void mformat(int argc, char **argv, int dummy)
- {
diff --git a/emulators/mtools/files/patch-sysincludes.h b/emulators/mtools/files/patch-sysincludes.h
deleted file mode 100644
index 91b45332cf33..000000000000
--- a/emulators/mtools/files/patch-sysincludes.h
+++ /dev/null
@@ -1,10 +0,0 @@
---- sysincludes.h~ Wed May 1 12:17:51 2002
-+++ sysincludes.h Wed Nov 16 23:57:42 2005
-@@ -239,7 +239,6 @@
- #endif
-
- #ifdef HAVE_MALLOC_H
--# include <malloc.h>
- #endif
-
- #ifdef HAVE_SIGNAL_H
diff --git a/emulators/mtools/files/pkg-message.in b/emulators/mtools/files/pkg-message.in
new file mode 100644
index 000000000000..a2d4f00fd4cb
--- /dev/null
+++ b/emulators/mtools/files/pkg-message.in
@@ -0,0 +1,3 @@
+************************************************************
+Please verify %%PREFIX%%/etc/mtools.conf for your machine.
+************************************************************
diff --git a/emulators/mtools/pkg-plist b/emulators/mtools/pkg-plist
index db4def25a52d..4424c02d9a6c 100644
--- a/emulators/mtools/pkg-plist
+++ b/emulators/mtools/pkg-plist
@@ -1,6 +1,6 @@
-%%WITH_X11%%bin/floppyd
-%%WITH_X11%%bin/floppyd_installtest
bin/amuFormat.sh
+%%X11%%bin/floppyd
+%%X11%%bin/floppyd_installtest
bin/mattrib
bin/mbadblocks
bin/mcat
@@ -27,11 +27,8 @@ bin/mshowfat
bin/mtools
bin/mtoolstest
bin/mtype
-bin/mwrite
bin/mxtar
bin/mzip
@unexec if cmp -s %D/etc/mtools.conf %D/etc/mtools.conf.sample; then rm -f %D/etc/mtools.conf; fi
etc/mtools.conf.sample
@exec if [ ! -f %D/etc/mtools.conf ]; then cp %B/%f %D/etc/mtools.conf; fi
-@exec ln -fs %D/man/man1/mcopy.1.gz %D/man/man1/mwrite.1.gz
-@unexec rm %D/man/man1/mwrite.1.gz