Make port build with clang. While we're here add an additional distfile

mirror and get rid of custom do-build target.

PR:		158136
Submitted by:	Niclas Zeising <niclas.zeising@gmail.com>
This commit is contained in:
Emanuel Haupt 2011-06-21 23:13:11 +00:00
parent f53471895d
commit bdd46fe0d9
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=276043
2 changed files with 31 additions and 6 deletions

View File

@ -9,7 +9,8 @@ PORTNAME= xdiskusage
PORTVERSION= 1.48
PORTREVISION= 6
CATEGORIES= x11-fm
MASTER_SITES= http://xdiskusage.sourceforge.net/
MASTER_SITES= http://xdiskusage.sourceforge.net/ \
http://www.gnu-darwin.org/distfiles/
EXTRACT_SUFX= .tgz
MAINTAINER= ports@FreeBSD.org
@ -19,15 +20,17 @@ LIB_DEPENDS= fltk.1:${PORTSDIR}/x11-toolkits/fltk
USE_GMAKE= yes
CXXFLAGS+= `fltk-config --cxxflags`
LDFLAGS+= `fltk-config --ldflags`
MAKE_ENV+= LDFLAGS="${LDFLAGS}"
PLIST_FILES= bin/xdiskusage
MAN1= xdiskusage.1
post-patch:
${REINPLACE_CMD} -e '22,24d' ${WRKSRC}/Makefile
do-build:
cd ${WRKSRC} && ${GMAKE} CXXFLAGS="`fltk-config --cxxflags`" LDFLAGS="`fltk-config --ldflags`"
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xdiskusage ${PREFIX}/bin
${INSTALL_MAN} ${WRKSRC}/xdiskusage.1 ${MANPREFIX}/man/man1

View File

@ -1,5 +1,27 @@
--- xdiskusage.C.orig 2008-09-15 19:21:03.000000000 +0000
+++ xdiskusage.C 2008-09-15 19:23:54.000000000 +0000
--- xdiskusage.C.orig 2004-09-21 07:23:14.000000000 +0200
+++ xdiskusage.C 2011-06-21 21:34:20.000000000 +0200
@@ -392,8 +392,8 @@
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));
- if (i < 0) {
+ int j = readlink(pathbuf, p, 1024-(p-pathbuf));
+ if (j < 0) {
if (errno != EINVAL) {
strcat(pathbuf, ": no such file");
fl_alert(pathbuf);
@@ -401,8 +401,8 @@
}
break;
}
- if (*p == '/') {memmove(pathbuf, p, i); p = pathbuf;}
- p[i] = 0;
+ if (*p == '/') {memmove(pathbuf, p, j); p = pathbuf;}
+ p[j] = 0;
path = pathbuf;
}
}
@@ -988,7 +988,7 @@
void OutputWindow::sort_cb(Fl_Widget* o, void*v) {
OutputWindow* d = (OutputWindow*)(o->window());