1 | diff -ruN bcwipe.orig/Portfile bcwipe/Portfile |
---|
2 | --- bcwipe.orig/Portfile Sun Aug 3 20:36:14 2003 |
---|
3 | +++ bcwipe/Portfile Sun Jan 4 18:49:37 2004 |
---|
4 | @@ -2,8 +2,8 @@ |
---|
5 | |
---|
6 | PortSystem 1.0 |
---|
7 | name bcwipe |
---|
8 | -version 1.2-3 |
---|
9 | -distname BCWipe-1.2-3 |
---|
10 | +version 1.3-1 |
---|
11 | +distname BCWipe-1.3-1 |
---|
12 | categories sysutils security |
---|
13 | maintainers daved@nostrum.com |
---|
14 | description Securely erase data from magnetic and solid-state memory. |
---|
15 | @@ -17,11 +17,11 @@ |
---|
16 | homepage http://www.jetico.com/ |
---|
17 | platforms darwin |
---|
18 | master_sites http://www.jetico.com/linux/ |
---|
19 | -checksums md5 d1aba86334a673d2a6f5c43c21fbe5f5 |
---|
20 | +checksums md5 f66050aedb7c24484ea529f800dabbf9 |
---|
21 | worksrcdir bcwipe |
---|
22 | -use_configure no |
---|
23 | +patchfiles patch-Makefile patch-wipe.c |
---|
24 | |
---|
25 | -patch { reinplace "s|\$(root)/\$(MAN_PATH)|\$(DESTDIR)${prefix}/man|" \ |
---|
26 | - ${workdir}/${worksrcdir}/Makefile |
---|
27 | - reinplace "s|\$(root)/usr|\$(DESTDIR)${prefix}|" \ |
---|
28 | - ${workdir}/${worksrcdir}/Makefile } |
---|
29 | +configure { |
---|
30 | + cd ${worksrcpath} |
---|
31 | + reinplace "s|@@prefix@@|${prefix}|g" Makefile |
---|
32 | +} |
---|
33 | diff -ruN bcwipe.orig/files/patch-Makefile bcwipe/files/patch-Makefile |
---|
34 | --- bcwipe.orig/files/patch-Makefile Wed Dec 31 18:00:00 1969 |
---|
35 | +++ bcwipe/files/patch-Makefile Sun Jan 4 18:50:14 2004 |
---|
36 | @@ -0,0 +1,13 @@ |
---|
37 | +--- Makefile.orig Sun Jan 4 18:35:22 2004 |
---|
38 | ++++ Makefile Sun Jan 4 18:36:50 2004 |
---|
39 | +@@ -38,8 +38,8 @@ |
---|
40 | + $(CC) $(CFLAGS) $(DEFS) -o bcwipe wipe.c $(BC_OBJ) |
---|
41 | + |
---|
42 | + install: |
---|
43 | +- $(INSTALL) -m 644 bcwipe.1 $(root)/$(MAN_PATH)/man1/ |
---|
44 | +- $(INSTALL) -o root -m 755 -s bcwipe $(root)/usr/bin/ |
---|
45 | ++ $(INSTALL) -m 644 bcwipe.1 $(DESTDIR)@@prefix@@/share/man/man1/ |
---|
46 | ++ $(INSTALL) -o root -m 755 -s bcwipe $(DESTDIR)@@prefix@@/bin/ |
---|
47 | + |
---|
48 | + clean: |
---|
49 | + rm -f *.o *.ver *~ $(TARGETS) |
---|
50 | diff -ruN bcwipe.orig/files/patch-wipe.c bcwipe/files/patch-wipe.c |
---|
51 | --- bcwipe.orig/files/patch-wipe.c Wed Dec 31 18:00:00 1969 |
---|
52 | +++ bcwipe/files/patch-wipe.c Sun Jan 4 18:34:32 2004 |
---|
53 | @@ -0,0 +1,49 @@ |
---|
54 | +--- wipe.c.orig Sun Jan 4 18:33:06 2004 |
---|
55 | ++++ wipe.c Sun Jan 4 18:34:00 2004 |
---|
56 | +@@ -28,7 +28,6 @@ |
---|
57 | + #include <utime.h> |
---|
58 | + #include <stdlib.h> |
---|
59 | + #include <sys/ioctl.h> |
---|
60 | +-#include <sys/statvfs.h> |
---|
61 | + #include <time.h> |
---|
62 | + #include <ctype.h> |
---|
63 | + #include <sys/mount.h> |
---|
64 | +@@ -650,17 +649,17 @@ |
---|
65 | + |
---|
66 | + off_t get_free_space(char *path) |
---|
67 | + { |
---|
68 | +- struct statvfs sfs; |
---|
69 | ++ struct statfs sfs; |
---|
70 | + int res; |
---|
71 | + |
---|
72 | +- res = statvfs(path,&sfs); |
---|
73 | ++ res = statfs(path,&sfs); |
---|
74 | + if (res != 0) |
---|
75 | + { |
---|
76 | +- fprintf(stderr,"statvfs(%s): %s\n",path,strerror(errno)); |
---|
77 | ++ fprintf(stderr,"statfs(%s): %s\n",path,strerror(errno)); |
---|
78 | + return 0; |
---|
79 | + } |
---|
80 | + |
---|
81 | +- return sfs.f_bfree * sfs.f_frsize; |
---|
82 | ++ return sfs.f_bfree * sfs.f_bsize; |
---|
83 | + |
---|
84 | + } |
---|
85 | + |
---|
86 | +@@ -839,13 +838,13 @@ |
---|
87 | + |
---|
88 | + int can_wipe_all_free_space(char *path) |
---|
89 | + { |
---|
90 | +- struct statvfs sfs; |
---|
91 | ++ struct statfs sfs; |
---|
92 | + int res; |
---|
93 | + |
---|
94 | +- res = statvfs(path,&sfs); |
---|
95 | ++ res = statfs(path,&sfs); |
---|
96 | + if (res != 0) |
---|
97 | + { |
---|
98 | +- fprintf(stderr,"statvfs(%s): %s\n",path,strerror(errno)); |
---|
99 | ++ fprintf(stderr,"statfs(%s): %s\n",path,strerror(errno)); |
---|
100 | + return 0; |
---|
101 | + } |
---|
102 | + |
---|