Skip to content
Permalink
Browse files

Bug: https://trac.macports.org/ticket/1379

Submitted by:   daved@nostrum.com (maintainer)
Reviewed by:    mww@

update to version 1.3.1, including needed patches

git-svn-id: https://svn.macports.org/repository/macports/trunk/dports@4485 d073be05-634f-4543-b044-5fe20cf6d1d6
  • Loading branch information
Markus W. Weißmann
Markus W. Weißmann committed Jan 6, 2004
1 parent 5890dfd commit bedfb2b29adf66566d3447dbb5f02614a880c860
Showing with 71 additions and 9 deletions.
  1. +9 −9 sysutils/bcwipe/Portfile
  2. +13 −0 sysutils/bcwipe/files/patch-Makefile.diff
  3. +49 −0 sysutils/bcwipe/files/patch-wipe.c.diff
@@ -1,9 +1,9 @@
# $Id: Portfile,v 1.2 2003/08/04 01:36:14 eric Exp $
# $Id: Portfile,v 1.3 2004/01/06 14:25:12 mww Exp $

PortSystem 1.0
name bcwipe
version 1.2-3
distname BCWipe-1.2-3
version 1.3-1
distname BCWipe-1.3-1
categories sysutils security
maintainers daved@nostrum.com
description Securely erase data from magnetic and solid-state memory.
@@ -17,11 +17,11 @@ long_description The BCWipe software is intended to give you a \
homepage http://www.jetico.com/
platforms darwin
master_sites http://www.jetico.com/linux/
checksums md5 d1aba86334a673d2a6f5c43c21fbe5f5
checksums md5 f66050aedb7c24484ea529f800dabbf9
worksrcdir bcwipe
use_configure no
patchfiles patch-Makefile.diff \
patch-wipe.c.diff

patch { reinplace "s|\$(root)/\$(MAN_PATH)|\$(DESTDIR)${prefix}/man|" \
${workdir}/${worksrcdir}/Makefile
reinplace "s|\$(root)/usr|\$(DESTDIR)${prefix}|" \
${workdir}/${worksrcdir}/Makefile }
configure {
reinplace "s|@@prefix@@|${prefix}|g" ${worksrcpath}/Makefile
}
@@ -0,0 +1,13 @@
--- Makefile Mon Aug 18 07:43:45 2003
+++ Makefile.new Tue Jan 6 15:16:47 2004
@@ -38,8 +38,8 @@
$(CC) $(CFLAGS) $(DEFS) -o bcwipe wipe.c $(BC_OBJ)

install:
- $(INSTALL) -m 644 bcwipe.1 $(root)/$(MAN_PATH)/man1/
- $(INSTALL) -o root -m 755 -s bcwipe $(root)/usr/bin/
+ $(INSTALL) -m 644 bcwipe.1 $(DESTDIR)/opt/local/share/man/man1/
+ $(INSTALL) -m 755 -s bcwipe $(DESTDIR)/opt/local/bin/

clean:
rm -f *.o *.ver *~ $(TARGETS)
@@ -0,0 +1,49 @@
--- wipe.c.orig Sun Jan 4 18:33:06 2004
+++ wipe.c Sun Jan 4 18:34:00 2004
@@ -28,7 +28,6 @@
#include <utime.h>
#include <stdlib.h>
#include <sys/ioctl.h>
-#include <sys/statvfs.h>
#include <time.h>
#include <ctype.h>
#include <sys/mount.h>
@@ -650,17 +649,17 @@

off_t get_free_space(char *path)
{
- struct statvfs sfs;
+ struct statfs sfs;
int res;

- res = statvfs(path,&sfs);
+ res = statfs(path,&sfs);
if (res != 0)
{
- fprintf(stderr,"statvfs(%s): %s\n",path,strerror(errno));
+ fprintf(stderr,"statfs(%s): %s\n",path,strerror(errno));
return 0;
}

- return sfs.f_bfree * sfs.f_frsize;
+ return sfs.f_bfree * sfs.f_bsize;

}

@@ -839,13 +838,13 @@

int can_wipe_all_free_space(char *path)
{
- struct statvfs sfs;
+ struct statfs sfs;
int res;

- res = statvfs(path,&sfs);
+ res = statfs(path,&sfs);
if (res != 0)
{
- fprintf(stderr,"statvfs(%s): %s\n",path,strerror(errno));
+ fprintf(stderr,"statfs(%s): %s\n",path,strerror(errno));
return 0;
}

0 comments on commit bedfb2b

Please sign in to comment.
You can’t perform that action at this time.