Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 30 Jan 2002 16:13:40 +0100 (CET)
From:      Philippe CASIDY <pcasidy@casidy.com>
To:        FreeBSD-gnats-submit@freebsd.org
Cc:        pcasidy@casidy.com
Subject:   ports/34452: New port emulators/mtf An NT Backup archive reader
Message-ID:  <20020130150940.212E013F@postfix2-1.free.fr>

next in thread | raw e-mail | index | archive | help

>Number:         34452
>Category:       ports
>Synopsis:       New port emulators/mtf An NT Backup archive reader
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 30 07:10:00 PST 2002
>Closed-Date:
>Last-Modified:
>Originator:     Philippe CASIDY
>Release:        FreeBSD 4.5-PRERELEASE i386
>Organization:
>Environment:
System: FreeBSD greatoak.home 4.5-PRERELEASE FreeBSD 4.5-PRERELEASE #22: Tue Jan 15 14:24:38 CET 2002 updater@greatoak.home:/home/nobackup/obj/home/nobackup/src/sys/GREATOAK i386


	
>Description:
	This is a port of the Microsoft Tape Format reader developed by D. Alan Stewart.
	This is one of my first port! :)
>How-To-Repeat:
	
>Fix:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	mtf
#	mtf/Makefile
#	mtf/distinfo
#	mtf/pkg-comment
#	mtf/pkg-descr
#	mtf/pkg-plist
#	mtf/files
#	mtf/files/patch-Makefile
#	mtf/files/patch-mtfread.c
#
echo c - mtf
mkdir -p mtf > /dev/null 2>&1
echo x - mtf/Makefile
sed 's/^X//' >mtf/Makefile << 'END-of-mtf/Makefile'
X# New ports collection makefile for:   mtf
X# Date created:        29 January 2002
X# Whom:                Philippe Casidy <pcasidy@casidy.com>
X#
X# $FreeBSD$
X#
X
XPORTNAME=	mtf
XPORTVERSION=	0.2.1
XCATEGORIES=	emulators
XMASTER_SITES=	http://www.ibiblio.org/pub/Linux/system/backup/
XEXTRACT_SUFX=	.tgz
X
XMAINTAINER=	pcasidy@casidy.com
X
XNO_PACKAGE=ignores cflags
XALL_TARGET=
XINSTALL_TARGET=
X
Xpost-install:
X	${INSTALL_PROGRAM} ${WRKSRC}/mtf ${PREFIX}/bin
X.if !defined(NOPORTDOCS)
X	${MKDIR} ${PREFIX}/share/doc/${PORTNAME}
X	${INSTALL_MAN} ${WRKSRC}/README ${PREFIX}/share/doc/${PORTNAME}
X.endif
X
X.include <bsd.port.mk>
END-of-mtf/Makefile
echo x - mtf/distinfo
sed 's/^X//' >mtf/distinfo << 'END-of-mtf/distinfo'
XMD5 (mtf-0.2.1.tgz) = a6190d8e3162f3aea7bb586c9cf2a98c
END-of-mtf/distinfo
echo x - mtf/pkg-comment
sed 's/^X//' >mtf/pkg-comment << 'END-of-mtf/pkg-comment'
XA Unix reader for the Microsoft Tape Format used by NT Backup
END-of-mtf/pkg-comment
echo x - mtf/pkg-descr
sed 's/^X//' >mtf/pkg-descr << 'END-of-mtf/pkg-descr'
XThis is the port of the Microsoft Tape Format / NT Baclup reader.
XIt is in a "work for me" state.
X
XWWW: http://layton-graphics.com/mtf/
END-of-mtf/pkg-descr
echo x - mtf/pkg-plist
sed 's/^X//' >mtf/pkg-plist << 'END-of-mtf/pkg-plist'
Xbin/mtf
X%%PORTDOCS%%share/doc/mtf/README
X@unexec rmdir %D/share/doc/mtf 2>/dev/null || true
END-of-mtf/pkg-plist
echo c - mtf/files
mkdir -p mtf/files > /dev/null 2>&1
echo x - mtf/files/patch-Makefile
sed 's/^X//' >mtf/files/patch-Makefile << 'END-of-mtf/files/patch-Makefile'
X*** Makefile.ori	Wed Jan 30 11:25:31 2002
X--- Makefile	Wed Jan 30 11:25:52 2002
X*************** CC=gcc
X*** 2,8 ****
X  
X  #ARCH=-mpentiumpro -march=pentiumpro
X  
X! CFLAGS=-Wall -O2 $(DEFINES) $(ARCH)
X  OFILES=mtf.o mtfread.o mtfutil.o
X  
X  .SUFFIXES: .c .o
X--- 2,8 ----
X  
X  #ARCH=-mpentiumpro -march=pentiumpro
X  
X! CFLAGS=-Wall -O2
X  OFILES=mtf.o mtfread.o mtfutil.o
X  
X  .SUFFIXES: .c .o
END-of-mtf/files/patch-Makefile
echo x - mtf/files/patch-mtfread.c
sed 's/^X//' >mtf/files/patch-mtfread.c << 'END-of-mtf/files/patch-mtfread.c'
X*** mtfread.c.ori	Wed Jan 30 11:29:04 2002
X--- mtfread.c	Wed Jan 30 11:38:43 2002
X*************** See mtf.c for version history, contribut
X*** 42,48 ****
X--- 42,52 ----
X  #include <limits.h>
X  #include <sys/stat.h>
X  #include <sys/fcntl.h>
X+ #if defined(BSD)
X+ #include <sys/mount.h>
X+ #else
X  #include <sys/vfs.h>
X+ #endif
X  #include <utime.h>
X  #include <unistd.h>
X  #include <time.h>
X*************** INT32 readTapeBlock(void)
X*** 363,369 ****
X  	{
X  		stream = (MTF_STREAM_HDR*) ((char*) tape + dbHdr->off);
X  		result = skipToNextBlock();
X! 		if (result != 1)
X  		{
X  			fprintf(stderr, "Error traversing to end of descriptor block!\n");
X  			return(-1);
X--- 367,373 ----
X  	{
X  		stream = (MTF_STREAM_HDR*) ((char*) tape + dbHdr->off);
X  		result = skipToNextBlock();
X! 		if (result != 0) /* skipToNextBlock returns 0 upon success -1 otherwise */
X  		{
X  			fprintf(stderr, "Error traversing to end of descriptor block!\n");
X  			return(-1);
X*************** INT32 readFileBlock(void)
X*** 671,677 ****
X  	INT32 result;
X  	char *ptr, *ptr2, filePath[MAXPATHLEN + 1], fullPath[MAXPATHLEN + 1];
X  	char tmpPath[MAXPATHLEN + 1];
X! 	int i, output;
X  	struct tm tbuf;
X  	struct utimbuf utbuf;
X  	UINT32 threshold;
X--- 675,682 ----
X  	INT32 result;
X  	char *ptr, *ptr2, filePath[MAXPATHLEN + 1], fullPath[MAXPATHLEN + 1];
X  	char tmpPath[MAXPATHLEN + 1];
X! 	int i;
X! 	int output=-1; /* Initialized to avoid gcc warning */
X  	struct tm tbuf;
X  	struct utimbuf utbuf;
X  	UINT32 threshold;
END-of-mtf/files/patch-mtfread.c
exit




>Release-Note:
>Audit-Trail:
>Unformatted:

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020130150940.212E013F>