From owner-freebsd-ports-bugs@FreeBSD.ORG Thu Dec 6 22:10:01 2007 Return-Path: Delivered-To: freebsd-ports-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7C9F016A421 for ; Thu, 6 Dec 2007 22:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 3116213C465 for ; Thu, 6 Dec 2007 22:10:01 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id lB6MA0P6068224 for ; Thu, 6 Dec 2007 22:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id lB6MA0Di068223; Thu, 6 Dec 2007 22:10:00 GMT (envelope-from gnats) Resent-Date: Thu, 6 Dec 2007 22:10:00 GMT Resent-Message-Id: <200712062210.lB6MA0Di068223@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-ports-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, "Pietro Cerutti" Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DF4DE16A417 for ; Thu, 6 Dec 2007 22:05:22 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from cpanel03.rubas-s03.net (cpanel03.rubas-s03.net [195.182.222.73]) by mx1.freebsd.org (Postfix) with ESMTP id 5CB9613C457 for ; Thu, 6 Dec 2007 22:05:22 +0000 (UTC) (envelope-from gahr@gahr.ch) Received: from [80.218.191.236] (helo=gahrtop.localhost) by cpanel03.rubas-s03.net with esmtpa (Exim 4.68) (envelope-from ) id 1J0OqO-0006ZO-NX for FreeBSD-gnats-submit@freebsd.org; Thu, 06 Dec 2007 23:05:21 +0100 Received: from gahrtop.localhost (localhost [127.0.0.1]) by gahrtop.localhost (Postfix) with ESMTP id 855537306B for ; Thu, 6 Dec 2007 23:04:06 +0100 (CET) Message-Id: <1196978646.19954@gahrtop.localhost> Date: Thu, 6 Dec 2007 23:04:06 +0100 From: "Pietro Cerutti" To: "FreeBSD gnats submit" X-Send-Pr-Version: gtk-send-pr 0.4.8 Cc: Subject: ports/118472: [patch] x11-wm/jewel unbreak fix build with GCC 4.2 + adopt maintainship X-BeenThere: freebsd-ports-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Ports bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Dec 2007 22:10:01 -0000 >Number: 118472 >Category: ports >Synopsis: [patch] x11-wm/jewel unbreak fix build with GCC 4.2 + adopt maintainship >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Dec 06 22:10:00 UTC 2007 >Closed-Date: >Last-Modified: >Originator: Pietro Cerutti >Release: FreeBSD 8.0-CURRENT i386 >Organization: >Environment: System: FreeBSD 8.0-CURRENT #15: Thu Dec 6 12:47:48 CET 2007 root@gahrtop.localhost:/usr/obj/usr/src/sys/MSI1034 >Description: The following patch: - fixes some GCC 4.2 errors (namespace, forward-declarations, ...) - cleans all warnings - refactor Makefile (pkg-plist, PORTDOCS, post-patch) - set maintainship to me Tested on: 8.0-CURRENT i386 7.0-BETA3 sparc64 >How-To-Repeat: cd /usr/ports/x11-wm/jewel && make >Fix: --- _jewel.diff begins here --- --- Makefile.orig 2007-12-06 22:56:35.000000000 +0100 +++ Makefile 2007-12-06 22:56:22.000000000 +0100 @@ -8,52 +8,40 @@ PORTNAME= jewel PORTVERSION= 0.12.41 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-wm MASTER_SITES= http://mjr.towers.org.uk/comp/ -MAINTAINER= ports@FreeBSD.org +MAINTAINER= gahr@gahr.ch COMMENT= Window manager based on aewm++ -ALL_TARGET= jewel -DOCDIR= share/doc/${PORTNAME} +ALL_TARGET= all DOCS= Changelog Changelog.DLR Changelog.jewel INSTALL LICENSE README MAN1= jewel.1x -PLIST= ${WRKDIR}/pkg-plist -USE_X_PREFIX= yes USE_GMAKE= yes -.include - -.if ${OSVERSION} >= 700042 -BROKEN= Broken with gcc 4.2 -.endif - post-patch: - @${MV} ${WRKSRC}/Makefile ${WRKSRC}/Makefile.orig - @${SED} -e "s,^CC,#CC,g ; s,^CFLAGS,#CFLAGS,g ; \ - s,^prefix,#prefix,g ; s,prefix,PREFIX,g ; \ - s,/usr/X11R6,${X11BASE},g ; \ - s,CC,CXX,g ; s,CFLAGS,CXXFLAGS,g" < ${WRKSRC}/Makefile.orig \ - > ${WRKSRC}/Makefile - -pre-install: - ${ECHO_CMD} bin/jewel > ${PLIST} -.if !defined(NOPORTDOCS) -.for ii in ${DOCS} - ${ECHO_CMD} ${DOCDIR}/${ii} >> ${PLIST} -.endfor - ${ECHO_CMD} @dirrm ${DOCDIR} >> ${PLIST} -.endif + @${REINPLACE_CMD} -e 's|^CC|#CC|g; \ + s|^CFLAGS|#CFLAGS|g; \ + s|^prefix|#prefix|g; \ + s|prefix|PREFIX|g; \ + s|/usr/X11R6|${X11BASE}|g; \ + s|CC|CXX|g; \ + s|CFLAGS|CXXFLAGS|g' \ + ${WRKSRC}/Makefile do-install: ${INSTALL_PROGRAM} ${WRKSRC}/jewel ${PREFIX}/bin/jewel - ${INSTALL_MAN} ${WRKSRC}/jewel.1x ${PREFIX}/man/man1 + ${INSTALL_PROGRAM} ${WRKSRC}/goodies/appbar/appbar ${PREFIX}/bin/jewel-appbar + ${INSTALL_PROGRAM} ${WRKSRC}/goodies/fspanel/fspanel ${PREFIX}/bin/jewel-fspanel + ${INSTALL_PROGRAM} ${WRKSRC}/goodies/setrootimage/setrootimage ${PREFIX}/bin/jewel-setrootimage + ${INSTALL_PROGRAM} ${WRKSRC}/goodies/xsession/xsession ${PREFIX}/bin/jewel-xsession + ${INSTALL_MAN} ${WRKSRC}/${MAN1} ${PREFIX}/man/man1 .if !defined(NOPORTDOCS) - ${MKDIR} ${PREFIX}/${DOCDIR} + ${MKDIR} ${DOCSDIR} .for ii in ${DOCS} - ${INSTALL_DATA} ${WRKSRC}/${ii} ${PREFIX}/${DOCDIR} + ${INSTALL_DATA} ${WRKSRC}/${ii} ${DOCSDIR}/ .endfor .endif -.include +.include --- /dev/null 2007-12-06 22:28:28.000000000 +0100 +++ pkg-plist 2007-12-06 22:02:53.000000000 +0100 @@ -0,0 +1,12 @@ +bin/jewel +bin/jewel-appbar +bin/jewel-fspanel +bin/jewel-setrootimage +bin/jewel-xsession +%%PORTDOCS%%%%DOCSDIR%%/Changelog +%%PORTDOCS%%%%DOCSDIR%%/Changelog.DLR +%%PORTDOCS%%%%DOCSDIR%%/Changelog.jewel +%%PORTDOCS%%%%DOCSDIR%%/INSTALL +%%PORTDOCS%%%%DOCSDIR%%/LICENSE +%%PORTDOCS%%%%DOCSDIR%%/README +%%PORTDOCS%%@dirrm %%DOCSDIR%% --- /dev/null 2007-12-06 22:28:28.000000000 +0100 +++ files/patch-goodies-appbar_icon.cc 2007-12-06 21:15:31.000000000 +0100 @@ -0,0 +1,29 @@ +--- goodies/appbar/icon.cc.orig 2007-12-06 21:09:37.000000000 +0100 ++++ goodies/appbar/icon.cc 2007-12-06 21:15:12.000000000 +0100 +@@ -35,7 +35,7 @@ + + #include "icon.hh" + +-char * default_icon_xpm[] = { ++const char * default_icon_xpm[] = { + "16 16 16 1", + " c None", + ". c #323232", +@@ -101,7 +101,7 @@ + + if(! XpmCreatePixmapFromData(dpy, + icon_win, +- default_icon_xpm, ++ (char **)default_icon_xpm, + &icon_pixmap, + &icon_pixmap_mask, + &icon_pixmap_attr)==XpmSuccess) +@@ -165,7 +165,7 @@ + + if(! XpmCreatePixmapFromData(dpy, + icon_win, +- default_icon_xpm, ++ (char **)default_icon_xpm, + &icon_pixmap, + &icon_pixmap_mask, + &icon_pixmap_attr)==XpmSuccess) --- /dev/null 2007-12-06 22:28:28.000000000 +0100 +++ files/patch-goodies-appbar_icon.hh 2007-12-06 21:15:58.000000000 +0100 @@ -0,0 +1,11 @@ +--- goodies/appbar/icon.hh.orig 2007-12-06 21:10:35.000000000 +0100 ++++ goodies/appbar/icon.hh 2007-12-06 21:12:21.000000000 +0100 +@@ -43,8 +43,6 @@ + #include + #include + +-extern char * default_icon_xpm[]; +- + class Icon + { + private: --- /dev/null 2007-12-06 22:28:28.000000000 +0100 +++ files/patch-goodies-appbar_main.cc 2007-12-06 20:49:03.000000000 +0100 @@ -0,0 +1,12 @@ +--- goodies/appbar/main.cc.orig 2007-12-06 20:48:09.000000000 +0100 ++++ goodies/appbar/main.cc 2007-12-06 20:48:46.000000000 +0100 +@@ -33,6 +33,9 @@ + * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + */ + ++#include ++using namespace std; ++ + #include "appbar.hh" + + int main(int argc, char* argv[]) --- /dev/null 2007-12-06 22:28:28.000000000 +0100 +++ files/patch-goodies-appbar_scanner.cc 2007-12-06 20:50:41.000000000 +0100 @@ -0,0 +1,29 @@ +--- goodies/appbar/scanner.cc.orig 2007-12-06 20:49:35.000000000 +0100 ++++ goodies/appbar/scanner.cc 2007-12-06 20:50:28.000000000 +0100 +@@ -156,7 +156,7 @@ + { + s_token.empty(); + +- while(char_class[character]==type) ++ while(char_class[(int) character]==type) + { + s_token += character; + +@@ -177,7 +177,7 @@ + if (!spaces) { + char_class[' ']=whitespace; + +- while(char_class[character]==whitespace) ++ while(char_class[(int)character]==whitespace) + { + if( inputFile.eof() ) return; + +@@ -192,7 +192,7 @@ + } + } + +- if (! inputFile.eof() ) { concat( char_class[character] ); } ++ if (! inputFile.eof() ) { concat( char_class[(int)character] ); } + } + + bool Scanner::match( std::string m ) --- /dev/null 2007-12-06 22:37:41.000000000 +0100 +++ files/patch-goodies-fspanel_fspanel.c 2007-12-06 22:37:18.000000000 +0100 @@ -0,0 +1,12 @@ +--- goodies/fspanel/fspanel.c.orig 2007-12-06 22:35:02.000000000 +0100 ++++ goodies/fspanel/fspanel.c 2007-12-06 22:37:02.000000000 +0100 +@@ -393,7 +393,8 @@ + + void scale_icon (task *tk) + { +- int xx, yy, x, y, w, h, d, bw; ++ int xx, yy, x, y; ++ unsigned int w, h, d, bw; + Pixmap pix, mk = None; + XGCValues gcv; + GC mgc=None; --- /dev/null 2007-12-06 22:28:28.000000000 +0100 +++ files/patch-goodies-setrootimage_image.hh 2007-12-06 21:35:02.000000000 +0100 @@ -0,0 +1,10 @@ +--- goodies/setrootimage/image.hh.orig 2007-12-06 21:28:22.000000000 +0100 ++++ goodies/setrootimage/image.hh 2007-12-06 21:34:53.000000000 +0100 +@@ -27,6 +27,7 @@ + #include + + #include ++using namespace std; + + class BImageControl; + class BImage; --- /dev/null 2007-12-06 22:28:28.000000000 +0100 +++ files/patch-goodies-setrootimage_setrootimage.cc 2007-12-06 21:24:46.000000000 +0100 @@ -0,0 +1,41 @@ +--- goodies/setrootimage/setrootimage.cc.orig 2007-12-06 21:20:21.000000000 +0100 ++++ goodies/setrootimage/setrootimage.cc 2007-12-06 21:24:15.000000000 +0100 +@@ -31,6 +31,9 @@ + * Released under the GNU GPL license + * www.gnu.org + */ ++#include ++using namespace std; ++ + #include + #include + #include +@@ -56,10 +59,11 @@ + temp_blue[1] = the_color[i]; + } + +- color.red = strtol(temp_red,0,16); ++ color.pixel = 0; ++ color.red = strtol(temp_red,0,16); + color.green = strtol(temp_green,0,16); + color.blue = strtol(temp_blue,0,16); +- ++ + return color; + } + +@@ -86,10 +90,10 @@ + Pixmap root_pix = None; + BColor to, from; + +- char* opt_color="no color"; +- char* opt_from="708090"; +- char* opt_to="ffffff"; +- char* opt_display=""; ++ char* opt_color=(char *)"no color"; ++ char* opt_from=(char *)"708090"; ++ char* opt_to=(char *)"ffffff"; ++ char* opt_display=(char *)""; + + int width=0; + int height=0; --- /dev/null 2007-12-06 22:28:28.000000000 +0100 +++ files/patch-windowmanager.cc 2007-12-06 20:47:24.000000000 +0100 @@ -0,0 +1,77 @@ +--- windowmanager.cc.orig 2007-12-06 20:41:35.000000000 +0100 ++++ windowmanager.cc 2007-12-06 20:47:01.000000000 +0100 +@@ -51,24 +51,24 @@ + // Set the global window manager object to this please =) + wm = this; + +- window_manager_name="jewel"; ++ window_manager_name=(char *)"jewel"; + + // Make the default options equal something +- opt_font = DEF_FONT; +- opt_fm = DEF_FM; +- opt_fg = DEF_FG; +- opt_fc = DEF_FC; +- opt_bg = DEF_BG; +- opt_bd = DEF_BD; +- opt_tj = TEXT_JUSTIFY; +- opt_wm = WIRE_MOVE; +- opt_es = EDGE_SNAP; +- opt_newkey = DEF_NEWKEY; +- opt_new1 = DEF_NEW1; +- opt_new2 = DEF_NEW2; ++ opt_font = (char *)DEF_FONT; ++ opt_fm = (char *)DEF_FM; ++ opt_fg = (char *)DEF_FG; ++ opt_fc = (char *)DEF_FC; ++ opt_bg = (char *)DEF_BG; ++ opt_bd = (char *)DEF_BD; ++ opt_tj = (char *)TEXT_JUSTIFY; ++ opt_wm = (char *)WIRE_MOVE; ++ opt_es = (char *)EDGE_SNAP; ++ opt_newkey = (char *)DEF_NEWKEY; ++ opt_new1 = (char *)DEF_NEW1; ++ opt_new2 = (char *)DEF_NEW2; + opt_bw = DEF_BW; + opt_display=NULL; +- maxDesktops=MAX_DESKTOPS; ++ maxDesktops=MAX_DESKTOPS; + + // These macro's are nice to test values passed in + // the command line arguments +@@ -1557,21 +1557,21 @@ + // find the client in the list... + it = find(clientList->begin(), clientList->end(), c); + +- if ( it == NULL || it == clientList->end()) { ++ if ( it == clientList->end()) { + it = clientList->begin(); + } + + do { + cycles++; +- if ( it != clientList->end() && it != NULL ) { ++ if ( it == clientList->end() ) { ++ it = clientList->begin(); ++ } ++ else { + it++; + if ( it == clientList->end() ) { + it = clientList->begin(); + } + } +- else { +- it = clientList->begin(); +- } + } while (cycles < clientList->size() && (shouldSkipThisWindow((*it)->getAppWindow()) || (*it)->isIconified() || (*it)->belongsToWhichDesktop() != currentDesktop)); + + #ifdef DEBUG +@@ -1588,7 +1588,7 @@ + + // if we found a suitable "next client", raise and focus + // it; otherwise, leave focus where it is +- if ( cycles < clientList->size() && it != NULL && it != clientList->end() && !shouldSkipThisWindow((*it)->getAppWindow()) && !(*it)->isIconified() && (*it)->belongsToWhichDesktop() == currentDesktop && !shouldSkipThisWindow((*it)->getAppWindow())) { ++ if ( cycles < clientList->size() && !(it == clientList->end()) && !shouldSkipThisWindow((*it)->getAppWindow()) && !(*it)->isIconified() && (*it)->belongsToWhichDesktop() == currentDesktop && !shouldSkipThisWindow((*it)->getAppWindow())) { + c = *it; + c->raise(); + setFocusedClient(c); --- /dev/null 2007-12-06 22:55:00.000000000 +0100 +++ files/patch-goodies-xsession_Makefile 2007-12-06 22:51:38.000000000 +0100 @@ -0,0 +1,16 @@ +--- goodies/xsession//Makefile.orig 2007-12-06 22:50:47.000000000 +0100 ++++ goodies/xsession//Makefile 2007-12-06 22:51:06.000000000 +0100 +@@ -1,10 +1,12 @@ + # Taken from fspanel Makefile by MJR + + CC = gcc +-C_FLAGS = -DNOSTDLIB -DHAVE_XPM -Wall -I$(XROOT)/include -m386 -malign-loops=2 -malign-jumps=2 -malign-functions=2 ++C_FLAGS = -DNOSTDLIB -DHAVE_XPM -Wall -I$(XROOT)/include -falign-loops=2 -falign-jumps=2 -falign-functions=2 + L_FLAGS = -O1 -Xlinker -s -L$(XROOT)/lib -lX11 -lXpm + PROGNAME = xsession + ++all: $(PROGNAME) ++ + $(PROGNAME): Makefile xsession.c + $(CC) $(C_FLAGS) $(L_FLAGS) xsession.c -o $(PROGNAME) + @ls -l $(PROGNAME) --- /dev/null 2007-12-06 22:55:00.000000000 +0100 +++ files/patch-goodies-fspanel_Makefile 2007-12-06 22:50:16.000000000 +0100 @@ -0,0 +1,21 @@ +--- goodies/fspanel/Makefile.orig 2007-12-06 22:49:22.000000000 +0100 ++++ goodies/fspanel/Makefile 2007-12-06 22:49:58.000000000 +0100 +@@ -1,8 +1,10 @@ + CC = gcc +-C_FLAGS = -DNOSTDLIB -DHAVE_XPM -Wall -I$(XROOT)/include -m386 -malign-loops=2 -malign-jumps=2 -malign-functions=2 ++C_FLAGS = -DNOSTDLIB -DHAVE_XPM -Wall -I$(XROOT)/include -falign-loops=2 -falign-jumps=2 -falign-functions=2 + L_FLAGS = -O1 -Xlinker -s -L$(XROOT)/lib -lX11 -lXpm + PROGNAME = fspanel + ++all: $(PROGNAME) ++ + $(PROGNAME): Makefile fspanel.c fspanel.h icon.xpm + $(CC) $(C_FLAGS) $(L_FLAGS) fspanel.c -o $(PROGNAME) + @ls -l $(PROGNAME) +@@ -14,4 +16,4 @@ + cp -r $(PROGNAME) $(DESTDIR)$(prefix)/bin + + uninstall: +- rm $(DESTDIR)$(prefix)/bin/$(PROGNAME) +\ No newline at end of file ++ rm $(DESTDIR)$(prefix)/bin/$(PROGNAME) --- _jewel.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted: