ports/158136: [PATCH] fix x11-fm/xdiskusage to build using clang
Niclas Zeising
niclas.zeising at gmail.com
Tue Jun 21 19:50:15 UTC 2011
>Number: 158136
>Category: ports
>Synopsis: [PATCH] fix x11-fm/xdiskusage to build using clang
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Jun 21 19:50:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Niclas Zeising
>Release: FreeBSD 8.2-RELEASE amd64
>Organization:
>Environment:
System: FreeBSD vincent.daemonic.se 8.2-RELEASE FreeBSD 8.2-RELEASE #0: Wed Apr 20 17:22:47 CEST 2011 root at vincent.daemonic.se:/usr/obj/usr/src/sys/VINCENT amd64
>Description:
x11-fm/xdiskusage doesn't build with clang. It aslo hardcodes the use of g++.
>How-To-Repeat:
>Fix:
Attached patch fixes the build with clang and also makes the port not hardcode the compiler.
--- x11-fm.xdiskusage.clangfix.diff begins here ---
Index: Makefile
===================================================================
RCS file: /home/ncvs/ports/x11-fm/xdiskusage/Makefile,v
retrieving revision 1.30
diff -u -d -r1.30 Makefile
--- Makefile 28 Mar 2010 06:46:01 -0000 1.30
+++ Makefile 21 Jun 2011 19:41:21 -0000
@@ -26,7 +26,7 @@
${REINPLACE_CMD} -e '22,24d' ${WRKSRC}/Makefile
do-build:
- cd ${WRKSRC} && ${GMAKE} CXXFLAGS="`fltk-config --cxxflags`" LDFLAGS="`fltk-config --ldflags`"
+ cd ${WRKSRC} && env CC=${CC} CXX=${CXX} ${GMAKE} CXXFLAGS="`fltk-config --cxxflags`" LDFLAGS="`fltk-config --ldflags`"
do-install:
${INSTALL_PROGRAM} ${WRKSRC}/xdiskusage ${PREFIX}/bin
Index: files/patch-xdiskusage.C
===================================================================
RCS file: /home/ncvs/ports/x11-fm/xdiskusage/files/patch-xdiskusage.C,v
retrieving revision 1.1
diff -u -d -r1.1 patch-xdiskusage.C
--- files/patch-xdiskusage.C 15 Sep 2008 19:50:59 -0000 1.1
+++ files/patch-xdiskusage.C 21 Jun 2011 19:41:21 -0000
@@ -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());
--- x11-fm.xdiskusage.clangfix.diff ends here ---
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list