summaryrefslogtreecommitdiff
path: root/x11-fm
diff options
context:
space:
mode:
authorEmanuel Haupt <ehaupt@FreeBSD.org>2011-06-21 23:13:11 +0000
committerEmanuel Haupt <ehaupt@FreeBSD.org>2011-06-21 23:13:11 +0000
commitbdd46fe0d99a5dd3023c95b9ca110135929f8723 (patch)
treeeaa3b42ca7462fcb3fc0da7b8a914823c5cb3e22 /x11-fm
parentFix build with clang by making the port respect CC. While we're here add an (diff)
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>
Notes
Notes: svn path=/head/; revision=276043
Diffstat (limited to 'x11-fm')
-rw-r--r--x11-fm/xdiskusage/Makefile11
-rw-r--r--x11-fm/xdiskusage/files/patch-xdiskusage.C26
2 files changed, 31 insertions, 6 deletions
diff --git a/x11-fm/xdiskusage/Makefile b/x11-fm/xdiskusage/Makefile
index fbef0fddf3f5..766dfb74b6c7 100644
--- a/x11-fm/xdiskusage/Makefile
+++ b/x11-fm/xdiskusage/Makefile
@@ -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
diff --git a/x11-fm/xdiskusage/files/patch-xdiskusage.C b/x11-fm/xdiskusage/files/patch-xdiskusage.C
index 7a24da6f7b3f..2da95c129959 100644
--- a/x11-fm/xdiskusage/files/patch-xdiskusage.C
+++ b/x11-fm/xdiskusage/files/patch-xdiskusage.C
@@ -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());