xdiskusage stable port information

Package: xdiskusage
Version: 1.48
Revision: 2
Architecture: i386, powerpc
Description: Graphical disk usage utility
DescPort: <<
Makefile is very broken (ignores *FLAGS passed to or set by
./configure, misuses CXX as LD) so patch makeinclude.in (compiled to
makeinclude by ./configure; sucked into Makefile).

Makefile is broken (doesn't create target directories).

Fix some string-handling warnings.
<<
Homepage: http://xdiskusage.sourceforge.net/
License: GPL
Maintainer: Daniel Macks
BuildDepends: <<
fink (>= 0.24.12),
fltk-x11 (>= 1.1.6-11.1),
x11-dev,
xmkmf (>= 1.0.2-3)
<<
Depends: <<
fltk-x11-shlibs (>= 1.1.6-11.1),
x11
<<
GCC: 4.0
Source: http://xdiskusage.sourceforge.net/%n-%v.tgz
Source-MD5: a902aa9d73761ade98256c3cd5c1f533
PatchFile: %n.patch
PatchFile-MD5: 001a21c380018d30663098b5a51e65e7
PatchScript: <<
%{default_script}
perl -pi.BAK -e 's#(\@CXXFLAGS.*)#$1 -I%p/include -L%p/lib#' makeinclude.in
<<
SetLDFLAGS: -Wl,-dylib_file,/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib:/System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib
ConfigureParams: --mandir='${prefix}/share/man'
CompileScript: <<
#!/bin/sh -ev
export PATH=%p/lib/xmkmf/bin:$PATH
export IMAKEINCLUDE=-I%p/lib/X11/config
./configure %c
make
<<
InstallScript: <<
#!/bin/sh -ev
export PATH=%p/lib/xmkmf/bin:$PATH
export IMAKEINCLUDE=-I%p/lib/X11/config
install -d -m0755 %i/bin %i/share/man/man1
make install prefix=%i
<<
DocFiles: README

xdiskusage stable port .patch

diff -Nurd -x'*~' xdiskusage-1.48.orig/xdiskusage.C xdiskusage-1.48/xdiskusage.C
--- xdiskusage-1.48.orig/xdiskusage.C 2004-09-21 01:23:14.000000000 -0400
+++ xdiskusage-1.48/xdiskusage.C 2011-05-15 15:10:21.000000000 -0400
@@ -392,16 +392,16 @@
strncpy(pathbuf, path, 1024);
for (int i=0; i<10; i++) {
char *p = (char*)fl_filename_name(pathbuf);
- int i = readlink(pathbuf, p, 1024-(p-pathbuf));
+ int pathlen = readlink(pathbuf, p, 1024-(p-pathbuf));
if (i < 0) {
if (errno != EINVAL) {
strcat(pathbuf, ": no such file");
- fl_alert(pathbuf);
+ fl_alert("%s", pathbuf);
return 0;
}
break;
}
- if (*p == '/') {memmove(pathbuf, p, i); p = pathbuf;}
+ if (*p == '/') {memmove(pathbuf, p, pathlen); p = pathbuf;}
p[i] = 0;
path = pathbuf;
}
@@ -492,7 +492,7 @@
size_t len = strlen (buffer);
if (buffer[len-1] != '\n')
{
- fprintf (stderr, "%s:%d: line too long, skipping it\n", path, line_no);
+ fprintf (stderr, "%s:%lu: line too long, skipping it\n", path, line_no);
// Read until end of line or EOF.
while (1)
{
@@ -510,7 +510,7 @@
ulong size = strtoul(buffer, &p, 10);
if (!isspace(*p) || p == buffer) {
if (!*p || *p=='#') continue; // ignore blank lines or comments (?)
- fl_alert("%s:%d: does not look like du output: %s", path, line_no, p);
+ fl_alert("%s:%lu: does not look like du output: %s", path, line_no, p);
cancelled = 1;
continue;
}

xdiskusage _unstable_ port .patch