From 5e8cd93f02530b66e591510e850a3a8f3dc45078 Mon Sep 17 00:00:00 2001 From: Martin Wilke Date: Mon, 10 Dec 2007 22:19:13 +0000 Subject: - Fix build with GCC 4.2 - Respect PORTDOCS - Pass maintainership to submitter PR: 118472 Submitted by: Pietro Cerutti Approved by: portmgr (erwin) --- x11-wm/jewel/Makefile | 51 ++++++-------- x11-wm/jewel/files/patch-goodies-appbar_icon.cc | 29 ++++++++ x11-wm/jewel/files/patch-goodies-appbar_icon.hh | 11 ++++ x11-wm/jewel/files/patch-goodies-appbar_main.cc | 12 ++++ x11-wm/jewel/files/patch-goodies-appbar_scanner.cc | 29 ++++++++ x11-wm/jewel/files/patch-goodies-fspanel_Makefile | 21 ++++++ x11-wm/jewel/files/patch-goodies-fspanel_fspanel.c | 12 ++++ .../files/patch-goodies-setrootimage_image.hh | 10 +++ .../patch-goodies-setrootimage_setrootimage.cc | 41 ++++++++++++ x11-wm/jewel/files/patch-goodies-xsession_Makefile | 16 +++++ x11-wm/jewel/files/patch-windowmanager.cc | 77 ++++++++++++++++++++++ x11-wm/jewel/pkg-plist | 12 ++++ 12 files changed, 290 insertions(+), 31 deletions(-) create mode 100644 x11-wm/jewel/files/patch-goodies-appbar_icon.cc create mode 100644 x11-wm/jewel/files/patch-goodies-appbar_icon.hh create mode 100644 x11-wm/jewel/files/patch-goodies-appbar_main.cc create mode 100644 x11-wm/jewel/files/patch-goodies-appbar_scanner.cc create mode 100644 x11-wm/jewel/files/patch-goodies-fspanel_Makefile create mode 100644 x11-wm/jewel/files/patch-goodies-fspanel_fspanel.c create mode 100644 x11-wm/jewel/files/patch-goodies-setrootimage_image.hh create mode 100644 x11-wm/jewel/files/patch-goodies-setrootimage_setrootimage.cc create mode 100644 x11-wm/jewel/files/patch-goodies-xsession_Makefile create mode 100644 x11-wm/jewel/files/patch-windowmanager.cc create mode 100644 x11-wm/jewel/pkg-plist (limited to 'x11-wm') diff --git a/x11-wm/jewel/Makefile b/x11-wm/jewel/Makefile index 869410f003e9..46ecf3bbc27d 100644 --- a/x11-wm/jewel/Makefile +++ b/x11-wm/jewel/Makefile @@ -8,52 +8,41 @@ 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_XLIB= 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 diff --git a/x11-wm/jewel/files/patch-goodies-appbar_icon.cc b/x11-wm/jewel/files/patch-goodies-appbar_icon.cc new file mode 100644 index 000000000000..ca3424376057 --- /dev/null +++ b/x11-wm/jewel/files/patch-goodies-appbar_icon.cc @@ -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) diff --git a/x11-wm/jewel/files/patch-goodies-appbar_icon.hh b/x11-wm/jewel/files/patch-goodies-appbar_icon.hh new file mode 100644 index 000000000000..db8c89c2e30f --- /dev/null +++ b/x11-wm/jewel/files/patch-goodies-appbar_icon.hh @@ -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: diff --git a/x11-wm/jewel/files/patch-goodies-appbar_main.cc b/x11-wm/jewel/files/patch-goodies-appbar_main.cc new file mode 100644 index 000000000000..0562b49be034 --- /dev/null +++ b/x11-wm/jewel/files/patch-goodies-appbar_main.cc @@ -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[]) diff --git a/x11-wm/jewel/files/patch-goodies-appbar_scanner.cc b/x11-wm/jewel/files/patch-goodies-appbar_scanner.cc new file mode 100644 index 000000000000..2f8c3e82336f --- /dev/null +++ b/x11-wm/jewel/files/patch-goodies-appbar_scanner.cc @@ -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 ) diff --git a/x11-wm/jewel/files/patch-goodies-fspanel_Makefile b/x11-wm/jewel/files/patch-goodies-fspanel_Makefile new file mode 100644 index 000000000000..37e4e3ccd13d --- /dev/null +++ b/x11-wm/jewel/files/patch-goodies-fspanel_Makefile @@ -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) diff --git a/x11-wm/jewel/files/patch-goodies-fspanel_fspanel.c b/x11-wm/jewel/files/patch-goodies-fspanel_fspanel.c new file mode 100644 index 000000000000..a99b5b9c5f01 --- /dev/null +++ b/x11-wm/jewel/files/patch-goodies-fspanel_fspanel.c @@ -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; diff --git a/x11-wm/jewel/files/patch-goodies-setrootimage_image.hh b/x11-wm/jewel/files/patch-goodies-setrootimage_image.hh new file mode 100644 index 000000000000..99797d8a990a --- /dev/null +++ b/x11-wm/jewel/files/patch-goodies-setrootimage_image.hh @@ -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; diff --git a/x11-wm/jewel/files/patch-goodies-setrootimage_setrootimage.cc b/x11-wm/jewel/files/patch-goodies-setrootimage_setrootimage.cc new file mode 100644 index 000000000000..709841b22573 --- /dev/null +++ b/x11-wm/jewel/files/patch-goodies-setrootimage_setrootimage.cc @@ -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; diff --git a/x11-wm/jewel/files/patch-goodies-xsession_Makefile b/x11-wm/jewel/files/patch-goodies-xsession_Makefile new file mode 100644 index 000000000000..1f14e2179bd0 --- /dev/null +++ b/x11-wm/jewel/files/patch-goodies-xsession_Makefile @@ -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) diff --git a/x11-wm/jewel/files/patch-windowmanager.cc b/x11-wm/jewel/files/patch-windowmanager.cc new file mode 100644 index 000000000000..1bb1c40cf438 --- /dev/null +++ b/x11-wm/jewel/files/patch-windowmanager.cc @@ -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); diff --git a/x11-wm/jewel/pkg-plist b/x11-wm/jewel/pkg-plist new file mode 100644 index 000000000000..a12c661419a5 --- /dev/null +++ b/x11-wm/jewel/pkg-plist @@ -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%% -- cgit v1.2.3