diff options
Diffstat (limited to 'filesystems/mtools')
-rw-r--r-- | filesystems/mtools/Makefile | 58 | ||||
-rw-r--r-- | filesystems/mtools/distinfo | 3 | ||||
-rw-r--r-- | filesystems/mtools/files/patch-Makefile.in | 40 | ||||
-rw-r--r-- | filesystems/mtools/files/patch-configure | 63 | ||||
-rw-r--r-- | filesystems/mtools/files/patch-mtools.texi | 11 | ||||
-rw-r--r-- | filesystems/mtools/files/patch-scsi.c | 29 | ||||
-rw-r--r-- | filesystems/mtools/files/pkg-message.in | 7 | ||||
-rw-r--r-- | filesystems/mtools/pkg-descr | 4 | ||||
-rw-r--r-- | filesystems/mtools/pkg-plist | 60 |
9 files changed, 275 insertions, 0 deletions
diff --git a/filesystems/mtools/Makefile b/filesystems/mtools/Makefile new file mode 100644 index 000000000000..33b2c796964c --- /dev/null +++ b/filesystems/mtools/Makefile @@ -0,0 +1,58 @@ +PORTNAME= mtools +PORTVERSION= 4.0.43 +PORTREVISION= 1 +CATEGORIES= filesystems emulators +MASTER_SITES= GNU + +MAINTAINER= skreuzer@FreeBSD.org +COMMENT= Tools for manipulating MS-DOS disks and images +WWW= https://www.gnu.org/software/mtools/intro.html + +LICENSE= GPLv3 + +CONFLICTS_INSTALL= multimarkdown + +USES= gmake makeinfo tar:lz +GNU_CONFIGURE= yes +CONFIGURE_ENV= ac_cv_header_malloc_h=no +CONFIGURE_ARGS= --enable-xdf +GNU_CONFIGURE_MANPREFIX=${PREFIX}/share + +SUB_FILES= pkg-message + +INFO= mtools + +OPTIONS_DEFINE= ICONV X11 +OPTIONS_DEFAULT=ICONV X11 + +.include <bsd.port.options.mk> + +.if ${PORT_OPTIONS:MICONV} +USES+= iconv +CPPFLAGS+= -I${LOCALBASE}/include +LDFLAGS+= -L${LOCALBASE}/lib ${ICONV_LIB} +LIB_DEPENDS+= libiconv.so:converters/libiconv +.else +CONFIGURE_ENV+= ac_cv_header_iconv_h=no +.endif + +.if ${PORT_OPTIONS:MX11} +USES+= xorg +USE_XORG= x11 sm ice xau +PLIST_SUB+= X11="" +.else +CONFIGURE_ARGS+= --without-x +PLIST_SUB+= X11="@comment " +MAKE_ENV+= WITHOUT_X11=yes +.endif + +post-patch: + @${REINPLACE_CMD} -e '/LOCAL_CONF_FILE/s,/etc/default,${LOCALBASE}/etc,' \ + ${WRKSRC}/mtoolsPaths.h + @${REINPLACE_CMD} -e 's|^\(SAMPLE FILE\)$$|#\1|' \ + ${WRKSRC}/mtools.conf + +post-install: + ${INSTALL_DATA} ${WRKSRC}/mtools.conf ${STAGEDIR}${PREFIX}/etc/mtools.conf.sample + +.include <bsd.port.mk> diff --git a/filesystems/mtools/distinfo b/filesystems/mtools/distinfo new file mode 100644 index 000000000000..fdded9f52cc2 --- /dev/null +++ b/filesystems/mtools/distinfo @@ -0,0 +1,3 @@ +TIMESTAMP = 1679438048 +SHA256 (mtools-4.0.43.tar.lz) = 997ffe4125a19de1fd433ed63f128f7d54bc1a5915f3cdb36da6491ef917f217 +SIZE (mtools-4.0.43.tar.lz) = 383347 diff --git a/filesystems/mtools/files/patch-Makefile.in b/filesystems/mtools/files/patch-Makefile.in new file mode 100644 index 000000000000..1c9d84b0e764 --- /dev/null +++ b/filesystems/mtools/files/patch-Makefile.in @@ -0,0 +1,40 @@ +--- Makefile.in.orig 2022-10-09 09:55:19 UTC ++++ Makefile.in +@@ -72,11 +72,14 @@ INSTALL_INFO = @INSTALL_INFO@ + .SUFFIXES: .o .c + .SUFFIXES: .o .c + +-MAN1 = floppyd.1 floppyd_installtest.1 mattrib.1 mbadblocks.1 mcat.1 \ ++MAN1 = mattrib.1 mbadblocks.1 mcat.1 \ + mcd.1 mcopy.1 mdel.1 mdeltree.1 mdir.1 mdu.1 mformat.1 \ + minfo.1 mkmanifest.1 mlabel.1 mmd.1 mmount.1 mmove.1 mpartition.1 \ + mrd.1 mren.1 mshortname.1 mshowfat.1 mtoolstest.1 mtools.1 mtype.1 \ + mzip.1 ++ifndef WITHOUT_X11 ++MAN1 += floppyd.1 floppyd_installtest.1 ++endif + + MAN1EXT = 1 + MAN1DIR = $(DESTDIR)$(mandir)/man${MAN1EXT} +@@ -119,7 +122,7 @@ privileges.c remap.c scsi_io.c scsi.c signal.c stream. + swap.c unix2dos.s unixdir.c tty.c vfat.c mkmanifest.c \ + @FLOPPYD_IO_SRC@ @XDF_IO_SRC@ + +-SCRIPTS = mcheck mxtar uz tgz mcomp amuFormat.sh ++SCRIPTS = mcheck mxtar mcomp amuFormat.sh + + LINKS=mattrib mcat mcd mcopy mdel mdeltree mdir mdu \ + mformat minfo mlabel mmd mmount mmove mpartition mrd mren mtype \ +@@ -264,11 +267,9 @@ install-links: $(DESTDIR)$(bindir)/mtools + install-scripts: $(DESTDIR)$(bindir)/mtools + @$(top_srcdir)/mkinstalldirs $(DESTDIR)$(bindir) + @for j in $(SCRIPTS) ; do \ +- $(INSTALL_PROGRAM) $(srcdir)/scripts/$$j $(DESTDIR)$(bindir)/$$j ; \ ++ $(BSD_INSTALL_SCRIPT) $(srcdir)/scripts/$$j $(DESTDIR)$(bindir)/$$j ; \ + echo $(DESTDIR)$(bindir)/$$j ; \ + done +- rm -f $(DESTDIR)$(bindir)/lz +- cd $(DESTDIR)$(bindir) && $(LN_S) uz lz + + install-man: + @$(top_srcdir)/mkinstalldirs $(MAN1DIR) diff --git a/filesystems/mtools/files/patch-configure b/filesystems/mtools/files/patch-configure new file mode 100644 index 000000000000..f7dc9e442ebd --- /dev/null +++ b/filesystems/mtools/files/patch-configure @@ -0,0 +1,63 @@ +--- configure.orig 2020-11-28 11:54:35 UTC ++++ configure +@@ -5696,10 +5696,10 @@ host_os3=`echo $host_os2 | sed 's/^\([^0-9]*\)[0-9]*$/ + host_cpu1=`echo $host_cpu | sed 's/\./_/g'` + host_vendor1=`echo $host_vendor | sed 's/\./_/g'` + HOST_ID="-DCPU_$host_cpu1 -DVENDOR_$host_vendor1 -DOS_$host_os1" +-if [ $host_os1 != $host_os2 ] ; then ++if [ "$host_os1" != "$host_os2" ] ; then + HOST_ID="$HOST_ID -DOS_$host_os2" + fi +-if [ $host_os1 != $host_os3 ] && [ $host_os2 != $host_os3 ] ; then ++if [ "$host_os1" != "$host_os3" ] && [ "$host_os2" != "$host_os3" ] ; then + HOST_ID="$HOST_ID -DOS_$host_os3" + fi + +@@ -5725,39 +5725,39 @@ if [ "X$GCC" = "Xyes" ] ; then + esac + CFLAGS="$CFLAGS $Wall" + else +- if [ $host_os3 = hpux ] ; then ++ if [ "$host_os3" = hpux ] ; then + CPPFLAGS="$CPPFLAGS -Ae" + fi + +- if [ $host_os3 = xenix ] ; then ++ if [ "$host_os3" = xenix ] ; then + CFLAGS="$CFLAGS -M2e" + fi + fi + +-if [ $host_os3 = hpux ] ; then ++if [ "$host_os3" = hpux ] ; then + LDFLAGS="$LDFLAGS -z" + fi + +-if [ $host_os3 = xenix ] ; then ++if [ "$host_os3" = xenix ] ; then + LDFLAGS="$LDFLAGS -M2e -i -f 5000" + fi + +-if [ $host_os2 = sysv4 ] ; then ++if [ "$host_os2" = sysv4 ] ; then + SHLIB="-lc -L/usr/ucblib -lucb" + else + SHLIB="" + fi + +-if [ $host_os3 = isc ] ; then ++if [ "$host_os3" = isc ] ; then + CFLAGS="$CFLAGS -D_SYSV3" + SHLIB="-lc_s" + fi + +-if [ $host_os3 = solaris -a x$newVold = xxyes ] ; then ++if [ "$host_os3" = solaris -a x$newVold = xxyes ] ; then + SHLIB="$SHLIB -s -lvolmgt" + fi + +-if [ $host_os3 = nextstep ] ; then ++if [ "$host_os3" = nextstep ] ; then + CFLAGS="$CFLAGS -DBSD" + SHLIB="" + fi diff --git a/filesystems/mtools/files/patch-mtools.texi b/filesystems/mtools/files/patch-mtools.texi new file mode 100644 index 000000000000..02360f495ddc --- /dev/null +++ b/filesystems/mtools/files/patch-mtools.texi @@ -0,0 +1,11 @@ +--- mtools.texi.orig 2020-11-26 23:02:51 UTC ++++ mtools.texi +@@ -39,7 +39,7 @@ mtools - utilities to access DOS disks in Unix. + + @dircategory DOS + @direntry +-* Mtools: (mtools). Mtools: utilities to access DOS disks in Unix. ++* Mtools: (mtools). Mtools: utilities to access DOS disks in Unix. + @end direntry + + diff --git a/filesystems/mtools/files/patch-scsi.c b/filesystems/mtools/files/patch-scsi.c new file mode 100644 index 000000000000..c0338b7ed945 --- /dev/null +++ b/filesystems/mtools/files/patch-scsi.c @@ -0,0 +1,29 @@ +--- scsi.c.orig 2018-12-02 16:23:26 UTC ++++ scsi.c +@@ -62,7 +62,7 @@ + #include <sys/scsicmd.h> + #endif + +-#if (defined(OS_freebsd)) && (__FreeBSD__ >= 2) ++#if (defined(OS_freebsd)) && (__FreeBSD__ >= 3) + #include <camlib.h> + #endif + +@@ -82,7 +82,7 @@ int scsi_max_length(void) + int scsi_open(const char *name, int flag UNUSEDP, int mode UNUSEDP, + void **extra_data UNUSEDP) + { +-#if (defined(OS_freebsd)) && (__FreeBSD__ >= 2) ++#if (defined(OS_freebsd)) && (__FreeBSD__ >= 3) + struct cam_device *cam_dev; + cam_dev = cam_open_device(name, O_RDWR); + *extra_data = (void *) cam_dev; +@@ -245,7 +245,7 @@ int scsi_cmd(int fd, unsigned char *cdb, int cmdlen, s + } + + return 0; +-#elif (defined OS_freebsd) && (__FreeBSD__ >= 2) ++#elif (defined OS_freebsd) && (__FreeBSD__ >= 3) + #define MSG_SIMPLE_Q_TAG 0x20 /* O/O */ + union ccb *ccb; + int flags; diff --git a/filesystems/mtools/files/pkg-message.in b/filesystems/mtools/files/pkg-message.in new file mode 100644 index 000000000000..fb262add717d --- /dev/null +++ b/filesystems/mtools/files/pkg-message.in @@ -0,0 +1,7 @@ +[ +{ type: install + message: <<EOM +Please verify %%PREFIX%%/etc/mtools.conf for your machine. +EOM +} +] diff --git a/filesystems/mtools/pkg-descr b/filesystems/mtools/pkg-descr new file mode 100644 index 000000000000..5ab285231a70 --- /dev/null +++ b/filesystems/mtools/pkg-descr @@ -0,0 +1,4 @@ +Mtools is a collection of utilities for accessing MS-DOS disks and file +system images from Unix without mounting them. It supports Win95-style +long file names, OS/2 XDF-formatted disks, ZIP/JAZ disks, and 2MB disks +(store up to 1992kB on a high-density 3.5" diskette). diff --git a/filesystems/mtools/pkg-plist b/filesystems/mtools/pkg-plist new file mode 100644 index 000000000000..8fe66ac5cb9c --- /dev/null +++ b/filesystems/mtools/pkg-plist @@ -0,0 +1,60 @@ +bin/amuFormat.sh +%%X11%%bin/floppyd +%%X11%%bin/floppyd_installtest +bin/mattrib +bin/mbadblocks +bin/mcat +bin/mcd +bin/mcheck +bin/mcomp +bin/mcopy +bin/mdel +bin/mdeltree +bin/mdir +bin/mdu +bin/mformat +bin/minfo +bin/mkmanifest +bin/mlabel +bin/mmd +bin/mmount +bin/mmove +bin/mpartition +bin/mrd +bin/mren +bin/mshowfat +bin/mtools +bin/mtoolstest +bin/mtype +bin/mxtar +bin/mzip +bin/mshortname +%%X11%%share/man/man1/floppyd.1.gz +%%X11%%share/man/man1/floppyd_installtest.1.gz +share/man/man1/mattrib.1.gz +share/man/man1/mbadblocks.1.gz +share/man/man1/mcat.1.gz +share/man/man1/mcd.1.gz +share/man/man1/mcopy.1.gz +share/man/man1/mdel.1.gz +share/man/man1/mdeltree.1.gz +share/man/man1/mdir.1.gz +share/man/man1/mdu.1.gz +share/man/man1/mformat.1.gz +share/man/man1/minfo.1.gz +share/man/man1/mkmanifest.1.gz +share/man/man1/mlabel.1.gz +share/man/man1/mmd.1.gz +share/man/man1/mmount.1.gz +share/man/man1/mmove.1.gz +share/man/man1/mpartition.1.gz +share/man/man1/mrd.1.gz +share/man/man1/mren.1.gz +share/man/man1/mshowfat.1.gz +share/man/man1/mtools.1.gz +share/man/man1/mtoolstest.1.gz +share/man/man1/mtype.1.gz +share/man/man1/mzip.1.gz +share/man/man1/mshortname.1.gz +share/man/man5/mtools.5.gz +@sample etc/mtools.conf.sample |