On Thu, 14 Apr 2011, Landry Breuil wrote:

> On Thu, Apr 14, 2011 at 10:48:05AM +0200, David Coppa wrote:
> > On Wed, 13 Apr 2011, David Coppa wrote:
> > 
> > > Hi, 
> > > 
> > > This diff updates fluxbox to its latest version, 1.3.1.
> > > 
> > > Tested on i386 and sparc64.
> > > 
> > > "mandoc -Tlint" still reports a lot of errors, thus USE_GROFF must 
> > > remain.
> > > 
> > > I've already sent upstream the fix for sparc64 and I'm waiting for 
> > > an answer...
> > > 
> > > Comments? OKs?
> 
> You might want to dig the archives, iirc an update to 1.0 was never
> commited because of issues with malloc.conf flags...

Good news!
The use-after-free crash on restart/exit has been fixed: now fluxbox
runs fine with both MALLOC_OPTIONS "J" and "S".

I've bumped AUTOCONF_VERSION to 2.67, added comments to patches, and
added three other patches to fix different crashes/malfunctions.

Here's the final diff. OK to commit?

ciao,
Dav

Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/fluxbox/Makefile,v
retrieving revision 1.50
diff -u -p -r1.50 Makefile
--- Makefile    22 Nov 2010 08:36:56 -0000      1.50
+++ Makefile    19 Apr 2011 13:18:59 -0000
@@ -2,9 +2,7 @@
 
 COMMENT=               window manager based on the original Blackbox code
 
-VERSION=               0.9.15.1
-DISTNAME=              fluxbox-${VERSION}
-REVISION=              3
+DISTNAME=              fluxbox-1.3.1
 
 CATEGORIES=            x11
 
@@ -20,21 +18,26 @@ PERMIT_PACKAGE_FTP= Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
 
-WANTLIB=               ICE SM X11 Xext Xft Xinerama Xpm Xrandr Xrender \
-                       Xau Xdmcp expat fontconfig freetype stdc++ m c z \
-                       pthread-stubs xcb Imlib2
+MODULES=               converters/libiconv
+
+WANTLIB=               ICE Imlib2 SM X11 Xau Xdmcp Xext Xft Xinerama \
+                       Xpm Xrandr Xrender c expat fontconfig freetype \
+                       fribidi m pthread-stubs stdc++ xcb z
 
 CONFIGURE_STYLE=       autoconf
-AUTOCONF_VERSION=      2.59
-CONFIGURE_ARGS=                --enable-xinerama --enable-imlib2
+AUTOCONF_VERSION=      2.67
+CONFIGURE_ENV=         CPPFLAGS="-I${LOCALBASE}/include" \
+                       LDFLAGS="-L${LOCALBASE}/lib"
 
 USE_LIBTOOL=           Yes
+USE_GMAKE=             Yes
 USE_GROFF =            Yes
 
 NO_REGRESS=            Yes
 
 SEPARATE_BUILD=                simple
 
-LIB_DEPENDS=           graphics/imlib2
+LIB_DEPENDS=           devel/fribidi \
+                       graphics/imlib2
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/x11/fluxbox/distinfo,v
retrieving revision 1.23
diff -u -p -r1.23 distinfo
--- distinfo    5 Apr 2007 17:36:19 -0000       1.23
+++ distinfo    19 Apr 2011 13:18:59 -0000
@@ -1,5 +1,5 @@
-MD5 (fluxbox-0.9.15.1.tar.gz) = hq+mVwqH1oRQKoIKPxdeNw==
-RMD160 (fluxbox-0.9.15.1.tar.gz) = usCPchNn38HX2kkfKGvRnfzYES4=
-SHA1 (fluxbox-0.9.15.1.tar.gz) = oiuKZ5f69O2wO2Y4L+FNgiEqGhE=
-SHA256 (fluxbox-0.9.15.1.tar.gz) = qQiYo5W7MEs+9vhlo1qhFKnIgyvST2nNsGNKImQd384=
-SIZE (fluxbox-0.9.15.1.tar.gz) = 944863
+MD5 (fluxbox-1.3.1.tar.gz) = +dh5Y+lXAm96pL56FfwVQQ==
+RMD160 (fluxbox-1.3.1.tar.gz) = mxj6C2h4FOU27klf211FldUcV+k=
+SHA1 (fluxbox-1.3.1.tar.gz) = zZ63bfHD4Ymoz6gTLp5YBdO+9gQ=
+SHA256 (fluxbox-1.3.1.tar.gz) = AJQVZz/Ki4soZpFVeBR32xo1ja2qvm+Tv7HtCHvfo20=
+SIZE (fluxbox-1.3.1.tar.gz) = 1094727
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile_in   19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Fix building with SEPARATE_BUILD
+
+--- Makefile.in.orig   Sun Feb 27 18:40:24 2011
++++ Makefile.in        Mon Apr 18 19:50:45 2011
+@@ -223,7 +223,7 @@ top_srcdir = @top_srcdir@
+ SUBDIRS = doc nls src util data
+ MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in
+ ACLOCAL_AMFLAGS = -I .
+-EXTRA_DIST = acinclude.m4 3rd/vim/* 3rd/vim/syntax/*
++EXTRA_DIST = acinclude.m4 $(top_srcdir)/3rd/vim/* 
$(top_srcdir)/3rd/vim/syntax/*
+ all: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+ 
Index: patches/patch-configure_in
===================================================================
RCS file: patches/patch-configure_in
diff -N patches/patch-configure_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_in  19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Fix for our (older) fribidi port
+
+--- configure.in.orig  Sun Feb 27 18:40:00 2011
++++ configure.in       Tue Apr 19 14:08:07 2011
+@@ -613,7 +613,7 @@ if test "x$enableval" = "xyes"; then
+               AC_MSG_CHECKING([for fribidi/fribidi.h])
+               AC_TRY_COMPILE(
+ #include <fribidi/fribidi.h>
+-      , fribidi_version_info,
++      , FRIBIDI_VERSION,
+                       AC_MSG_RESULT([yes])
+                       AC_DEFINE(HAVE_FRIBIDI, [1], [Define to 1 if you have 
FRIBIDI])
+                       LIBS="$LIBS -lfribidi",
Index: patches/patch-data_Makefile_in
===================================================================
RCS file: patches/patch-data_Makefile_in
diff -N patches/patch-data_Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-data_Makefile_in      19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,29 @@
+$OpenBSD$
+
+Fix building with SEPARATE_BUILD
+
+--- data/Makefile.in.orig      Sun Feb 27 18:40:21 2011
++++ data/Makefile.in   Mon Apr 18 19:49:49 2011
+@@ -590,19 +590,19 @@ all-local:               menu init apps
+ install-pkgdataDATA:
+       @echo "Installing menu file in $(DESTDIR)$(DEFAULT_MENU)"
+       $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_MENU))
+-      $(INSTALL_DATA) $(srcdir)/menu $(DESTDIR)$(DEFAULT_MENU)
++      $(INSTALL_DATA) $(builddir)/menu $(DESTDIR)$(DEFAULT_MENU)
+       @echo "Installing keys file in $(DESTDIR)$(DEFAULT_KEYS)"
+       $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_KEYS))
+       $(INSTALL_DATA) $(srcdir)/keys $(DESTDIR)$(DEFAULT_KEYS)
+       @echo "Installing apps file in $(DESTDIR)$(DEFAULT_APPS)"
+       $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_APPS))
+-      $(INSTALL_DATA) $(srcdir)/apps $(DESTDIR)$(DEFAULT_APPS)
++      $(INSTALL_DATA) $(builddir)/apps $(DESTDIR)$(DEFAULT_APPS)
+       @echo "Installing overlay file in $(DESTDIR)$(DEFAULT_OVERLAY)"
+       $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_OVERLAY))
+       $(INSTALL_DATA) $(srcdir)/overlay $(DESTDIR)$(DEFAULT_OVERLAY)
+       @echo "Installing init file in $(DESTDIR)$(DEFAULT_INIT)"
+       $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_INIT))
+-      $(INSTALL_DATA) $(srcdir)/init $(DESTDIR)$(DEFAULT_INIT)
++      $(INSTALL_DATA) $(builddir)/init $(DESTDIR)$(DEFAULT_INIT)
+       @echo "Installing windowmenu file in $(DESTDIR)$(DEFAULT_WINDOWMENU)"
+       $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_WINDOWMENU))
+       $(INSTALL_DATA) $(srcdir)/windowmenu $(DESTDIR)$(DEFAULT_WINDOWMENU)
Index: patches/patch-data_README_style
===================================================================
RCS file: patches/patch-data_README_style
diff -N patches/patch-data_README_style
--- patches/patch-data_README_style     25 Jan 2006 03:57:44 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-data_README_style,v 1.1 2006/01/25 03:57:44 david Exp $
---- data/README.style.orig     Mon Nov 15 14:40:53 2004
-+++ data/README.style  Mon Jan 23 03:19:26 2006
-@@ -315,7 +315,7 @@ handleWidth:                    4
- menuFont:                       lucidasans-10
- titleFont:                      lucidasans-bold-10
- 
--rootCommand:                    bsetroot -mod 4 4 -fg rgb:6/6/5c -bg grey20
-+rootCommand:                    fbsetroot -mod 4 4 -fg rgb:6/6/5c -bg grey20
- ...
- 
- Alright!  Our style is finished.  Let's see how the sucker looks.  First we
Index: patches/patch-data_styles_MerleyKay
===================================================================
RCS file: patches/patch-data_styles_MerleyKay
diff -N patches/patch-data_styles_MerleyKay
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-data_styles_MerleyKay 19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Fix typo in 'MerleyKay' style
+(commit 1237f83207ebb976deafade9f1b9cb452c38b467)
+
+--- data/styles/MerleyKay.orig Wed Apr 13 20:34:58 2011
++++ data/styles/MerleyKay      Wed Apr 13 20:35:28 2011
+@@ -5,7 +5,7 @@
+ # by Pax, thanks!)
+ # update: added *.tab.* stuff to make fluxbox look real cool :)
+ 
+-toolbar:                             Raised Gradient Veritcal
++toolbar:                             Raised Gradient Vertical
+ toolbar.color:                       rgb:62/70/85
+ toolbar.colorTo:                     rgb:56/66/75
+ 
Index: patches/patch-src_ClientMenu_cc
===================================================================
RCS file: patches/patch-src_ClientMenu_cc
diff -N patches/patch-src_ClientMenu_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_ClientMenu_cc     19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,27 @@
+$OpenBSD$
+
+Fix a crash when deiconifying apps
+(commit a53017cc3bad26906b99ac473513a10847c40bc0)
+
+--- src/ClientMenu.cc.orig     Tue Apr 19 11:28:50 2011
++++ src/ClientMenu.cc  Tue Apr 19 11:30:51 2011
+@@ -52,15 +52,17 @@ class ClientMenuItem: public FbTk::MenuItem { (public)
+             return;
+ 
+         // this MenuItem object can get destroyed as a result of focus(), so 
we
+-        // must get a local copy of the parent menu
++        // must get a local copy of anything we want to use here
++        // AFTER ~ClientMenuItem() is called.
+         FbTk::Menu *parent = menu();
++        FocusControl& focus_control = m_client.screen().focusControl();
+ 
+         m_client.focus();
+         fbwin->raise();
+         if ((mods & ControlMask) == 0) {
+             // Ignore any focus changes due to this menu closing
+             // (even in StrictMouseFocus mode)
+-            m_client.screen().focusControl().ignoreAtPointer(true);
++            focus_control.ignoreAtPointer(true);
+             parent->hide();
+         }
+     }
Index: patches/patch-src_FbTk_FbString_cc
===================================================================
RCS file: patches/patch-src_FbTk_FbString_cc
diff -N patches/patch-src_FbTk_FbString_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_FbTk_FbString_cc  19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,24 @@
+$OpenBSD$
+
+Fixes for our (older) fribidi port
+
+--- src/FbTk/FbString.cc.orig  Wed Apr 13 12:12:03 2011
++++ src/FbTk/FbString.cc       Wed Apr 13 12:12:45 2011
+@@ -85,7 +85,7 @@ FbTk::FbString makeVisualFromLogical(const FbTk::FbStr
+         result.reserve(S4);
+ 
+     us.resize(S);
+-    FriBidiStrIndex len = fribidi_charset_to_unicode(FRIBIDI_CHAR_SET_UTF8,
++    FriBidiStrIndex len = fribidi_charset_to_unicode(FRIBIDI_CHARSET_UTF8,
+             const_cast<char*>(src.c_str()), S - 1,
+             &us[0]);
+ 
+@@ -93,7 +93,7 @@ FbTk::FbString makeVisualFromLogical(const FbTk::FbStr
+     fribidi_log2vis(&us[0], len, &base, &out_us[0], NULL, NULL, NULL);
+ 
+     result.resize(S4);
+-    len = fribidi_unicode_to_charset(FRIBIDI_CHAR_SET_UTF8, &out_us[0], len, 
&result[0]);
++    len = fribidi_unicode_to_charset(FRIBIDI_CHARSET_UTF8, &out_us[0], len, 
&result[0]);
+     result.resize(len); // trim to currently used chars
+ 
+     return result;
Index: patches/patch-src_IconbarTool_cc
===================================================================
RCS file: patches/patch-src_IconbarTool_cc
diff -N patches/patch-src_IconbarTool_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_IconbarTool_cc    19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+Fix icon width with vertical toolbar
+(commit b1d70e2c92c15d79ff0128d932b4e245c706a634)
+
+--- src/IconbarTool.cc.orig    Tue Apr 19 11:36:37 2011
++++ src/IconbarTool.cc Tue Apr 19 11:38:04 2011
+@@ -307,7 +307,7 @@ void IconbarTool::move(int x, int y) {
+ 
+ void IconbarTool::resize(unsigned int width, unsigned int height) {
+     m_icon_container.resize(width, height);
+-    m_icon_container.setMaxTotalSize(m_icon_container.orientation() == 
FbTk::ROT0 || m_icon_container.orientation() ? width : height);
++    m_icon_container.setMaxTotalSize(m_icon_container.orientation() == 
FbTk::ROT0 || m_icon_container.orientation() == FbTk::ROT180 ? width : height);
+     renderTheme();
+ }
+ 
+@@ -315,7 +315,7 @@ void IconbarTool::moveResize(int x, int y,
+                              unsigned int width, unsigned int height) {
+ 
+     m_icon_container.moveResize(x, y, width, height);
+-    m_icon_container.setMaxTotalSize(m_icon_container.orientation() == 
FbTk::ROT0 || m_icon_container.orientation() ? width : height);
++    m_icon_container.setMaxTotalSize(m_icon_container.orientation() == 
FbTk::ROT0 || m_icon_container.orientation() == FbTk::ROT180 ? width : height);
+     renderTheme();
+ }
+ 
Index: patches/patch-src_Makefile_in
===================================================================
RCS file: patches/patch-src_Makefile_in
diff -N patches/patch-src_Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Makefile_in       19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+Don't check for git revision, this is a stable release
+
+--- src/Makefile.in.orig       Sun Feb 27 18:40:24 2011
++++ src/Makefile.in    Mon Apr 18 20:04:45 2011
+@@ -905,10 +905,8 @@ defaults.cc: force
+               echo '}'; \
+               echo ''; \
+               echo 'const char* gitrevision() {'; \
+-              echo '  return "'`cat ../.git/$$(cat ../.git/HEAD | cut -f 2 -d 
' ')`'";';\
+-              echo '}' ) > defaults_tmp.cc
+-      @if ! cmp defaults_tmp.cc defaults.cc ; then cp defaults_tmp.cc 
defaults.cc; fi
+-      @rm defaults_tmp.cc
++              echo '  return "";';\
++              echo '}' ) > defaults.cc
+ 
+ force: ;
+ 
Index: patches/patch-src_Screen_cc
===================================================================
RCS file: patches/patch-src_Screen_cc
diff -N patches/patch-src_Screen_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Screen_cc 19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,58 @@
+$OpenBSD$
+
+Use 'unsigned long' to feed XChangeProperty: fix crash at startup
+on sparc64 (commit 870d4d02ee9085f1d0910db3f6e6838749d6a1ce)
+
+Fix a use-after-free crash on restart/exit
+(commit 0b6c860fa0067c73216209878ed1ae46f541f571)
+
+--- src/Screen.cc.orig Tue Apr 19 11:33:07 2011
++++ src/Screen.cc      Tue Apr 19 11:33:51 2011
+@@ -361,7 +361,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
+ 
+     // we're going to manage the screen, so now add our pid
+ #ifdef HAVE_GETPID
+-    pid_t bpid = getpid();
++    unsigned long bpid = static_cast<unsigned long>(getpid());
+ 
+     rootWindow().changeProperty(fluxbox->getFluxboxPidAtom(), XA_CARDINAL,
+                                 sizeof(pid_t) * 8, PropModeReplace,
+@@ -504,6 +504,8 @@ BScreen::~BScreen() {
+     if (! managed)
+         return;
+ 
++    m_configmenu.reset(0);
++
+     m_toolbar.reset(0);
+ 
+     FbTk::EventManager *evm = FbTk::EventManager::instance();
+@@ -573,6 +575,10 @@ BScreen::~BScreen() {
+     // slit must be destroyed before headAreas (Struts)
+     m_slit.reset(0);
+ 
++    delete m_rootmenu.release();
++    delete m_workspacemenu.release();
++    delete m_windowmenu.release();
++
+     // TODO fluxgen: check if this is the right place
+     for (size_t i = 0; i < m_head_areas.size(); i++)
+         delete m_head_areas[i];
+@@ -1468,7 +1474,8 @@ void BScreen::rereadWindowMenu() {
+ 
+ void BScreen::addConfigMenu(const FbTk::FbString &label, FbTk::Menu &menu) {
+     m_configmenu_list.push_back(make_pair(label, &menu));
+-    setupConfigmenu(*m_configmenu.get());
++    if (m_configmenu.get())
++      setupConfigmenu(*m_configmenu.get());
+ }
+ 
+ void BScreen::removeConfigMenu(FbTk::Menu &menu) {
+@@ -1479,7 +1486,7 @@ void BScreen::removeConfigMenu(FbTk::Menu &menu) {
+     if (erase_it != m_configmenu_list.end())
+         m_configmenu_list.erase(erase_it);
+ 
+-    if (!isShuttingdown())
++    if (!isShuttingdown() && m_configmenu.get())
+         setupConfigmenu(*m_configmenu.get());
+ 
+ }
Index: patches/patch-src_Toolbar_cc
===================================================================
RCS file: patches/patch-src_Toolbar_cc
diff -N patches/patch-src_Toolbar_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Toolbar_cc        19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+
+Fix: toolbar placement from menu not saved correctly into configfile
+(commit bb2ce5df8a814f9b858b6919356f7d37f10e6b9f)
+
+--- src/Toolbar.cc.orig        Tue Apr 19 11:26:52 2011
++++ src/Toolbar.cc     Tue Apr 19 11:28:26 2011
+@@ -101,8 +101,8 @@ const ToolbarPlacementString placement_strings[] = {
+     { Toolbar::LEFTBOTTOM, "LeftBottom" },
+     { Toolbar::LEFTCENTER, "LeftCenter" },
+     { Toolbar::LEFTTOP, "LeftTop" },
+-    { Toolbar::RIGHTCENTER, "RightCenter" },
+     { Toolbar::RIGHTBOTTOM, "RightBottom" },
++    { Toolbar::RIGHTCENTER, "RightCenter" },
+     { Toolbar::RIGHTTOP, "RightTop" }
+ };
+ 
+@@ -116,7 +116,7 @@ getString() const {
+ 
+     size_t i = (m_value == FbTk::Util::clamp(m_value, Toolbar::TOPLEFT, 
Toolbar::RIGHTTOP)
+                 ? m_value 
+-                : Toolbar::DEFAULT) - 1;
++                : Toolbar::DEFAULT) - Toolbar::TOPLEFT;
+     return placement_strings[i].str;
+ }
+ 
Index: patches/patch-util_fluxbox-generate_menu_in
===================================================================
RCS file: /cvs/ports/x11/fluxbox/patches/patch-util_fluxbox-generate_menu_in,v
retrieving revision 1.6
diff -u -p -r1.6 patch-util_fluxbox-generate_menu_in
--- patches/patch-util_fluxbox-generate_menu_in 25 Jan 2006 03:57:44 -0000      
1.6
+++ patches/patch-util_fluxbox-generate_menu_in 19 Apr 2011 13:18:59 -0000
@@ -1,12 +1,15 @@
 $OpenBSD: patch-util_fluxbox-generate_menu_in,v 1.6 2006/01/25 03:57:44 david 
Exp $
---- util/fluxbox-generate_menu.in.orig Thu Aug 25 11:52:50 2005
-+++ util/fluxbox-generate_menu.in      Mon Jan 23 03:36:56 2006
-@@ -343,7 +343,7 @@ searchForIcon(){
+
+Adapt to our non-GNU grep
+
+--- util/fluxbox-generate_menu.in.orig Thu Sep  9 14:39:18 2010
++++ util/fluxbox-generate_menu.in      Tue Apr 19 14:19:02 2011
+@@ -308,7 +308,7 @@ searchForIcon(){
      # echo "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" 
      if [ -f "$entry_icon" ]; then
      # if icon exists and entry does not already exists, add it
 -        if ! grep -q -m 1 
"^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" $ICONMAPPING 2> /dev/null; 
then
-+        if ! grep -q "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" 
$ICONMAPPING 2> /dev/null; then
++        if ! grep -q "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" 
$ICONMAPPING 2>/dev/null | head -n 1; then
              echo -e "\"${entry_exec}\" \t <${entry_icon}>" >> $ICONMAPPING
          else 
              : echo "#    mapping already exists for ${entry_exec}" >> 
$ICONMAPPING
Index: patches/patch-util_fluxbox-update_configs_cc
===================================================================
RCS file: patches/patch-util_fluxbox-update_configs_cc
diff -N patches/patch-util_fluxbox-update_configs_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-util_fluxbox-update_configs_cc        19 Apr 2011 13:18:59 
-0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Fix building with SEPARATE_BUILD
+
+--- util/fluxbox-update_configs.cc.orig        Sat Sep 18 17:51:51 2010
++++ util/fluxbox-update_configs.cc     Mon Apr 18 17:28:19 2011
+@@ -24,7 +24,7 @@
+ #include "../src/FbTk/StringUtil.hh"
+ #include "../src/FbTk/FileUtil.hh"
+ 
+-#include "defaults.hh"
++#include "../src/defaults.hh"
+ 
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/x11/fluxbox/pkg/PLIST,v
retrieving revision 1.15
diff -u -p -r1.15 PLIST
--- pkg/PLIST   25 Jan 2006 03:57:44 -0000      1.15
+++ pkg/PLIST   19 Apr 2011 13:18:59 -0000
@@ -1,20 +1,28 @@
 @comment $OpenBSD: PLIST,v 1.15 2006/01/25 03:57:44 david Exp $
-bin/fbrun
+@bin bin/fbrun
 bin/fbsetbg
-bin/fbsetroot
-bin/fluxbox
+@bin bin/fbsetroot
+@bin bin/fluxbox
 bin/fluxbox-generate_menu
+@bin bin/fluxbox-remote
+@bin bin/fluxbox-update_configs
 bin/startfluxbox
 @man man/man1/fbrun.1
 @man man/man1/fbsetbg.1
 @man man/man1/fbsetroot.1
+@man man/man1/fluxbox-remote.1
 @man man/man1/fluxbox.1
-@man man/man1/fluxstyle.1
 @man man/man1/startfluxbox.1
+@man man/man5/fluxbox-apps.5
+@man man/man5/fluxbox-keys.5
+@man man/man5/fluxbox-menu.5
+@man man/man5/fluxbox-style.5
 share/fluxbox/
+share/fluxbox/apps
 share/fluxbox/init
 share/fluxbox/keys
 share/fluxbox/menu
+share/fluxbox/overlay
 share/fluxbox/styles/
 share/fluxbox/styles/Artwiz
 share/fluxbox/styles/BlueFlux/
@@ -42,9 +50,6 @@ share/fluxbox/styles/BlueFlux/pixmaps/to
 share/fluxbox/styles/BlueFlux/pixmaps/toolbar_label.xpm
 share/fluxbox/styles/BlueFlux/theme.cfg
 share/fluxbox/styles/BlueNight
-share/fluxbox/styles/Carbondioxide
-share/fluxbox/styles/Clean
-share/fluxbox/styles/Cthulhain
 share/fluxbox/styles/Emerge/
 share/fluxbox/styles/Emerge/pixmaps/
 share/fluxbox/styles/Emerge/pixmaps/bullet.xpm
@@ -71,13 +76,96 @@ share/fluxbox/styles/LemonSpace
 share/fluxbox/styles/Makro
 share/fluxbox/styles/MerleyKay
 share/fluxbox/styles/Meta
-share/fluxbox/styles/Minimal
 share/fluxbox/styles/Nyz
 share/fluxbox/styles/Operation
 share/fluxbox/styles/Outcomes
-share/fluxbox/styles/Rampage
 share/fluxbox/styles/Results
 share/fluxbox/styles/Shade
-share/fluxbox/styles/Spiff
 share/fluxbox/styles/Twice
+share/fluxbox/styles/arch/
+share/fluxbox/styles/arch/pixmaps/
+share/fluxbox/styles/arch/pixmaps/bullet.xpm
+share/fluxbox/styles/arch/pixmaps/closefcs.xpm
+share/fluxbox/styles/arch/pixmaps/closepr.xpm
+share/fluxbox/styles/arch/pixmaps/closeufcs.xpm
+share/fluxbox/styles/arch/pixmaps/frame.xpm
+share/fluxbox/styles/arch/pixmaps/gripfcs.xpm
+share/fluxbox/styles/arch/pixmaps/maxfcs.xpm
+share/fluxbox/styles/arch/pixmaps/maxpr.xpm
+share/fluxbox/styles/arch/pixmaps/maxufcs.xpm
+share/fluxbox/styles/arch/pixmaps/menuiconfcs.xpm
+share/fluxbox/styles/arch/pixmaps/menuiconpr.xpm
+share/fluxbox/styles/arch/pixmaps/menuiconufcs.xpm
+share/fluxbox/styles/arch/pixmaps/minfcs.xpm
+share/fluxbox/styles/arch/pixmaps/minpr.xpm
+share/fluxbox/styles/arch/pixmaps/minufcs.xpm
+share/fluxbox/styles/arch/pixmaps/selected.xpm
+share/fluxbox/styles/arch/pixmaps/shadefcs.xpm
+share/fluxbox/styles/arch/pixmaps/shadepr.xpm
+share/fluxbox/styles/arch/pixmaps/shadeufcs.xpm
+share/fluxbox/styles/arch/pixmaps/stickfcs.xpm
+share/fluxbox/styles/arch/pixmaps/stickpr.xpm
+share/fluxbox/styles/arch/pixmaps/stickufcs.xpm
+share/fluxbox/styles/arch/pixmaps/stuckfcs.xpm
+share/fluxbox/styles/arch/pixmaps/stuckufcs.xpm
+share/fluxbox/styles/arch/pixmaps/tbarfcs.xpm
+share/fluxbox/styles/arch/pixmaps/tbarufcs.xpm
+share/fluxbox/styles/arch/pixmaps/unselected.xpm
+share/fluxbox/styles/arch/pixmaps/unshadefcs.xpm
+share/fluxbox/styles/arch/pixmaps/unshadepr.xpm
+share/fluxbox/styles/arch/pixmaps/unshadeufcs.xpm
+share/fluxbox/styles/arch/theme.cfg
+share/fluxbox/styles/bloe/
+share/fluxbox/styles/bloe/pixmaps/
+share/fluxbox/styles/bloe/pixmaps/bullet.xpm
+share/fluxbox/styles/bloe/pixmaps/closefcs.xpm
+share/fluxbox/styles/bloe/pixmaps/closepr.xpm
+share/fluxbox/styles/bloe/pixmaps/closeufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/frame.xpm
+share/fluxbox/styles/bloe/pixmaps/maxfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/maxpr.xpm
+share/fluxbox/styles/bloe/pixmaps/maxufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/menuiconfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/menuiconpr.xpm
+share/fluxbox/styles/bloe/pixmaps/menuiconufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/minfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/minpr.xpm
+share/fluxbox/styles/bloe/pixmaps/minufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/selected.xpm
+share/fluxbox/styles/bloe/pixmaps/shadefcs.xpm
+share/fluxbox/styles/bloe/pixmaps/shadepr.xpm
+share/fluxbox/styles/bloe/pixmaps/shadeufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/stickfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/stickpr.xpm
+share/fluxbox/styles/bloe/pixmaps/stickufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/stuckfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/stuckufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/tbarfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/tbarufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/unselected.xpm
+share/fluxbox/styles/bloe/pixmaps/unshadefcs.xpm
+share/fluxbox/styles/bloe/pixmaps/unshadepr.xpm
+share/fluxbox/styles/bloe/pixmaps/unshadeufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/windowlabelfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/windowlabelufcs.xpm
+share/fluxbox/styles/bloe/theme.cfg
+share/fluxbox/styles/bora_black/
+share/fluxbox/styles/bora_black/theme.cfg
+share/fluxbox/styles/bora_blue/
+share/fluxbox/styles/bora_blue/theme.cfg
+share/fluxbox/styles/bora_green/
+share/fluxbox/styles/bora_green/theme.cfg
+share/fluxbox/styles/carp/
+share/fluxbox/styles/carp/theme.cfg
+share/fluxbox/styles/green_tea/
+share/fluxbox/styles/green_tea/theme.cfg
+share/fluxbox/styles/ostrich/
+share/fluxbox/styles/ostrich/theme.cfg
 share/fluxbox/styles/qnx-photon
+share/fluxbox/styles/zimek_bisque/
+share/fluxbox/styles/zimek_bisque/theme.cfg
+share/fluxbox/styles/zimek_darkblue/
+share/fluxbox/styles/zimek_darkblue/theme.cfg
+share/fluxbox/styles/zimek_green/
+share/fluxbox/styles/zimek_green/theme.cfg
+share/fluxbox/windowmenu
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/fluxbox/Makefile,v
retrieving revision 1.50
diff -u -p -r1.50 Makefile
--- Makefile    22 Nov 2010 08:36:56 -0000      1.50
+++ Makefile    19 Apr 2011 13:18:59 -0000
@@ -2,9 +2,7 @@
 
 COMMENT=               window manager based on the original Blackbox code
 
-VERSION=               0.9.15.1
-DISTNAME=              fluxbox-${VERSION}
-REVISION=              3
+DISTNAME=              fluxbox-1.3.1
 
 CATEGORIES=            x11
 
@@ -20,21 +18,26 @@ PERMIT_PACKAGE_FTP= Yes
 PERMIT_DISTFILES_CDROM=        Yes
 PERMIT_DISTFILES_FTP=  Yes
 
-WANTLIB=               ICE SM X11 Xext Xft Xinerama Xpm Xrandr Xrender \
-                       Xau Xdmcp expat fontconfig freetype stdc++ m c z \
-                       pthread-stubs xcb Imlib2
+MODULES=               converters/libiconv
+
+WANTLIB=               ICE Imlib2 SM X11 Xau Xdmcp Xext Xft Xinerama \
+                       Xpm Xrandr Xrender c expat fontconfig freetype \
+                       fribidi m pthread-stubs stdc++ xcb z
 
 CONFIGURE_STYLE=       autoconf
-AUTOCONF_VERSION=      2.59
-CONFIGURE_ARGS=                --enable-xinerama --enable-imlib2
+AUTOCONF_VERSION=      2.67
+CONFIGURE_ENV=         CPPFLAGS="-I${LOCALBASE}/include" \
+                       LDFLAGS="-L${LOCALBASE}/lib"
 
 USE_LIBTOOL=           Yes
+USE_GMAKE=             Yes
 USE_GROFF =            Yes
 
 NO_REGRESS=            Yes
 
 SEPARATE_BUILD=                simple
 
-LIB_DEPENDS=           graphics/imlib2
+LIB_DEPENDS=           devel/fribidi \
+                       graphics/imlib2
 
 .include <bsd.port.mk>
Index: distinfo
===================================================================
RCS file: /cvs/ports/x11/fluxbox/distinfo,v
retrieving revision 1.23
diff -u -p -r1.23 distinfo
--- distinfo    5 Apr 2007 17:36:19 -0000       1.23
+++ distinfo    19 Apr 2011 13:18:59 -0000
@@ -1,5 +1,5 @@
-MD5 (fluxbox-0.9.15.1.tar.gz) = hq+mVwqH1oRQKoIKPxdeNw==
-RMD160 (fluxbox-0.9.15.1.tar.gz) = usCPchNn38HX2kkfKGvRnfzYES4=
-SHA1 (fluxbox-0.9.15.1.tar.gz) = oiuKZ5f69O2wO2Y4L+FNgiEqGhE=
-SHA256 (fluxbox-0.9.15.1.tar.gz) = qQiYo5W7MEs+9vhlo1qhFKnIgyvST2nNsGNKImQd384=
-SIZE (fluxbox-0.9.15.1.tar.gz) = 944863
+MD5 (fluxbox-1.3.1.tar.gz) = +dh5Y+lXAm96pL56FfwVQQ==
+RMD160 (fluxbox-1.3.1.tar.gz) = mxj6C2h4FOU27klf211FldUcV+k=
+SHA1 (fluxbox-1.3.1.tar.gz) = zZ63bfHD4Ymoz6gTLp5YBdO+9gQ=
+SHA256 (fluxbox-1.3.1.tar.gz) = AJQVZz/Ki4soZpFVeBR32xo1ja2qvm+Tv7HtCHvfo20=
+SIZE (fluxbox-1.3.1.tar.gz) = 1094727
Index: patches/patch-Makefile_in
===================================================================
RCS file: patches/patch-Makefile_in
diff -N patches/patch-Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-Makefile_in   19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Fix building with SEPARATE_BUILD
+
+--- Makefile.in.orig   Sun Feb 27 18:40:24 2011
++++ Makefile.in        Mon Apr 18 19:50:45 2011
+@@ -223,7 +223,7 @@ top_srcdir = @top_srcdir@
+ SUBDIRS = doc nls src util data
+ MAINTAINERCLEANFILES = aclocal.m4 config.h.in configure Makefile.in stamp-h.in
+ ACLOCAL_AMFLAGS = -I .
+-EXTRA_DIST = acinclude.m4 3rd/vim/* 3rd/vim/syntax/*
++EXTRA_DIST = acinclude.m4 $(top_srcdir)/3rd/vim/* 
$(top_srcdir)/3rd/vim/syntax/*
+ all: config.h
+       $(MAKE) $(AM_MAKEFLAGS) all-recursive
+ 
Index: patches/patch-configure_in
===================================================================
RCS file: patches/patch-configure_in
diff -N patches/patch-configure_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-configure_in  19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Fix for our (older) fribidi port
+
+--- configure.in.orig  Sun Feb 27 18:40:00 2011
++++ configure.in       Tue Apr 19 14:08:07 2011
+@@ -613,7 +613,7 @@ if test "x$enableval" = "xyes"; then
+               AC_MSG_CHECKING([for fribidi/fribidi.h])
+               AC_TRY_COMPILE(
+ #include <fribidi/fribidi.h>
+-      , fribidi_version_info,
++      , FRIBIDI_VERSION,
+                       AC_MSG_RESULT([yes])
+                       AC_DEFINE(HAVE_FRIBIDI, [1], [Define to 1 if you have 
FRIBIDI])
+                       LIBS="$LIBS -lfribidi",
Index: patches/patch-data_Makefile_in
===================================================================
RCS file: patches/patch-data_Makefile_in
diff -N patches/patch-data_Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-data_Makefile_in      19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,29 @@
+$OpenBSD$
+
+Fix building with SEPARATE_BUILD
+
+--- data/Makefile.in.orig      Sun Feb 27 18:40:21 2011
++++ data/Makefile.in   Mon Apr 18 19:49:49 2011
+@@ -590,19 +590,19 @@ all-local:               menu init apps
+ install-pkgdataDATA:
+       @echo "Installing menu file in $(DESTDIR)$(DEFAULT_MENU)"
+       $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_MENU))
+-      $(INSTALL_DATA) $(srcdir)/menu $(DESTDIR)$(DEFAULT_MENU)
++      $(INSTALL_DATA) $(builddir)/menu $(DESTDIR)$(DEFAULT_MENU)
+       @echo "Installing keys file in $(DESTDIR)$(DEFAULT_KEYS)"
+       $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_KEYS))
+       $(INSTALL_DATA) $(srcdir)/keys $(DESTDIR)$(DEFAULT_KEYS)
+       @echo "Installing apps file in $(DESTDIR)$(DEFAULT_APPS)"
+       $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_APPS))
+-      $(INSTALL_DATA) $(srcdir)/apps $(DESTDIR)$(DEFAULT_APPS)
++      $(INSTALL_DATA) $(builddir)/apps $(DESTDIR)$(DEFAULT_APPS)
+       @echo "Installing overlay file in $(DESTDIR)$(DEFAULT_OVERLAY)"
+       $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_OVERLAY))
+       $(INSTALL_DATA) $(srcdir)/overlay $(DESTDIR)$(DEFAULT_OVERLAY)
+       @echo "Installing init file in $(DESTDIR)$(DEFAULT_INIT)"
+       $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_INIT))
+-      $(INSTALL_DATA) $(srcdir)/init $(DESTDIR)$(DEFAULT_INIT)
++      $(INSTALL_DATA) $(builddir)/init $(DESTDIR)$(DEFAULT_INIT)
+       @echo "Installing windowmenu file in $(DESTDIR)$(DEFAULT_WINDOWMENU)"
+       $(mkinstalldirs) $(DESTDIR)$(dir $(DEFAULT_WINDOWMENU))
+       $(INSTALL_DATA) $(srcdir)/windowmenu $(DESTDIR)$(DEFAULT_WINDOWMENU)
Index: patches/patch-data_README_style
===================================================================
RCS file: patches/patch-data_README_style
diff -N patches/patch-data_README_style
--- patches/patch-data_README_style     25 Jan 2006 03:57:44 -0000      1.1
+++ /dev/null   1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-data_README_style,v 1.1 2006/01/25 03:57:44 david Exp $
---- data/README.style.orig     Mon Nov 15 14:40:53 2004
-+++ data/README.style  Mon Jan 23 03:19:26 2006
-@@ -315,7 +315,7 @@ handleWidth:                    4
- menuFont:                       lucidasans-10
- titleFont:                      lucidasans-bold-10
- 
--rootCommand:                    bsetroot -mod 4 4 -fg rgb:6/6/5c -bg grey20
-+rootCommand:                    fbsetroot -mod 4 4 -fg rgb:6/6/5c -bg grey20
- ...
- 
- Alright!  Our style is finished.  Let's see how the sucker looks.  First we
Index: patches/patch-data_styles_MerleyKay
===================================================================
RCS file: patches/patch-data_styles_MerleyKay
diff -N patches/patch-data_styles_MerleyKay
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-data_styles_MerleyKay 19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,16 @@
+$OpenBSD$
+
+Fix typo in 'MerleyKay' style
+(commit 1237f83207ebb976deafade9f1b9cb452c38b467)
+
+--- data/styles/MerleyKay.orig Wed Apr 13 20:34:58 2011
++++ data/styles/MerleyKay      Wed Apr 13 20:35:28 2011
+@@ -5,7 +5,7 @@
+ # by Pax, thanks!)
+ # update: added *.tab.* stuff to make fluxbox look real cool :)
+ 
+-toolbar:                             Raised Gradient Veritcal
++toolbar:                             Raised Gradient Vertical
+ toolbar.color:                       rgb:62/70/85
+ toolbar.colorTo:                     rgb:56/66/75
+ 
Index: patches/patch-src_ClientMenu_cc
===================================================================
RCS file: patches/patch-src_ClientMenu_cc
diff -N patches/patch-src_ClientMenu_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_ClientMenu_cc     19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,27 @@
+$OpenBSD$
+
+Fix a crash when deiconifying apps
+(commit a53017cc3bad26906b99ac473513a10847c40bc0)
+
+--- src/ClientMenu.cc.orig     Tue Apr 19 11:28:50 2011
++++ src/ClientMenu.cc  Tue Apr 19 11:30:51 2011
+@@ -52,15 +52,17 @@ class ClientMenuItem: public FbTk::MenuItem { (public)
+             return;
+ 
+         // this MenuItem object can get destroyed as a result of focus(), so 
we
+-        // must get a local copy of the parent menu
++        // must get a local copy of anything we want to use here
++        // AFTER ~ClientMenuItem() is called.
+         FbTk::Menu *parent = menu();
++        FocusControl& focus_control = m_client.screen().focusControl();
+ 
+         m_client.focus();
+         fbwin->raise();
+         if ((mods & ControlMask) == 0) {
+             // Ignore any focus changes due to this menu closing
+             // (even in StrictMouseFocus mode)
+-            m_client.screen().focusControl().ignoreAtPointer(true);
++            focus_control.ignoreAtPointer(true);
+             parent->hide();
+         }
+     }
Index: patches/patch-src_FbTk_FbString_cc
===================================================================
RCS file: patches/patch-src_FbTk_FbString_cc
diff -N patches/patch-src_FbTk_FbString_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_FbTk_FbString_cc  19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,24 @@
+$OpenBSD$
+
+Fixes for our (older) fribidi port
+
+--- src/FbTk/FbString.cc.orig  Wed Apr 13 12:12:03 2011
++++ src/FbTk/FbString.cc       Wed Apr 13 12:12:45 2011
+@@ -85,7 +85,7 @@ FbTk::FbString makeVisualFromLogical(const FbTk::FbStr
+         result.reserve(S4);
+ 
+     us.resize(S);
+-    FriBidiStrIndex len = fribidi_charset_to_unicode(FRIBIDI_CHAR_SET_UTF8,
++    FriBidiStrIndex len = fribidi_charset_to_unicode(FRIBIDI_CHARSET_UTF8,
+             const_cast<char*>(src.c_str()), S - 1,
+             &us[0]);
+ 
+@@ -93,7 +93,7 @@ FbTk::FbString makeVisualFromLogical(const FbTk::FbStr
+     fribidi_log2vis(&us[0], len, &base, &out_us[0], NULL, NULL, NULL);
+ 
+     result.resize(S4);
+-    len = fribidi_unicode_to_charset(FRIBIDI_CHAR_SET_UTF8, &out_us[0], len, 
&result[0]);
++    len = fribidi_unicode_to_charset(FRIBIDI_CHARSET_UTF8, &out_us[0], len, 
&result[0]);
+     result.resize(len); // trim to currently used chars
+ 
+     return result;
Index: patches/patch-src_IconbarTool_cc
===================================================================
RCS file: patches/patch-src_IconbarTool_cc
diff -N patches/patch-src_IconbarTool_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_IconbarTool_cc    19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,25 @@
+$OpenBSD$
+
+Fix icon width with vertical toolbar
+(commit b1d70e2c92c15d79ff0128d932b4e245c706a634)
+
+--- src/IconbarTool.cc.orig    Tue Apr 19 11:36:37 2011
++++ src/IconbarTool.cc Tue Apr 19 11:38:04 2011
+@@ -307,7 +307,7 @@ void IconbarTool::move(int x, int y) {
+ 
+ void IconbarTool::resize(unsigned int width, unsigned int height) {
+     m_icon_container.resize(width, height);
+-    m_icon_container.setMaxTotalSize(m_icon_container.orientation() == 
FbTk::ROT0 || m_icon_container.orientation() ? width : height);
++    m_icon_container.setMaxTotalSize(m_icon_container.orientation() == 
FbTk::ROT0 || m_icon_container.orientation() == FbTk::ROT180 ? width : height);
+     renderTheme();
+ }
+ 
+@@ -315,7 +315,7 @@ void IconbarTool::moveResize(int x, int y,
+                              unsigned int width, unsigned int height) {
+ 
+     m_icon_container.moveResize(x, y, width, height);
+-    m_icon_container.setMaxTotalSize(m_icon_container.orientation() == 
FbTk::ROT0 || m_icon_container.orientation() ? width : height);
++    m_icon_container.setMaxTotalSize(m_icon_container.orientation() == 
FbTk::ROT0 || m_icon_container.orientation() == FbTk::ROT180 ? width : height);
+     renderTheme();
+ }
+ 
Index: patches/patch-src_Makefile_in
===================================================================
RCS file: patches/patch-src_Makefile_in
diff -N patches/patch-src_Makefile_in
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Makefile_in       19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+Don't check for git revision, this is a stable release
+
+--- src/Makefile.in.orig       Sun Feb 27 18:40:24 2011
++++ src/Makefile.in    Mon Apr 18 20:04:45 2011
+@@ -905,10 +905,8 @@ defaults.cc: force
+               echo '}'; \
+               echo ''; \
+               echo 'const char* gitrevision() {'; \
+-              echo '  return "'`cat ../.git/$$(cat ../.git/HEAD | cut -f 2 -d 
' ')`'";';\
+-              echo '}' ) > defaults_tmp.cc
+-      @if ! cmp defaults_tmp.cc defaults.cc ; then cp defaults_tmp.cc 
defaults.cc; fi
+-      @rm defaults_tmp.cc
++              echo '  return "";';\
++              echo '}' ) > defaults.cc
+ 
+ force: ;
+ 
Index: patches/patch-src_Screen_cc
===================================================================
RCS file: patches/patch-src_Screen_cc
diff -N patches/patch-src_Screen_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Screen_cc 19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,58 @@
+$OpenBSD$
+
+Use 'unsigned long' to feed XChangeProperty: fix crash at startup
+on sparc64 (commit 870d4d02ee9085f1d0910db3f6e6838749d6a1ce)
+
+Fix a use-after-free crash on restart/exit
+(commit 0b6c860fa0067c73216209878ed1ae46f541f571)
+
+--- src/Screen.cc.orig Tue Apr 19 11:33:07 2011
++++ src/Screen.cc      Tue Apr 19 11:33:51 2011
+@@ -361,7 +361,7 @@ BScreen::BScreen(FbTk::ResourceManager &rm,
+ 
+     // we're going to manage the screen, so now add our pid
+ #ifdef HAVE_GETPID
+-    pid_t bpid = getpid();
++    unsigned long bpid = static_cast<unsigned long>(getpid());
+ 
+     rootWindow().changeProperty(fluxbox->getFluxboxPidAtom(), XA_CARDINAL,
+                                 sizeof(pid_t) * 8, PropModeReplace,
+@@ -504,6 +504,8 @@ BScreen::~BScreen() {
+     if (! managed)
+         return;
+ 
++    m_configmenu.reset(0);
++
+     m_toolbar.reset(0);
+ 
+     FbTk::EventManager *evm = FbTk::EventManager::instance();
+@@ -573,6 +575,10 @@ BScreen::~BScreen() {
+     // slit must be destroyed before headAreas (Struts)
+     m_slit.reset(0);
+ 
++    delete m_rootmenu.release();
++    delete m_workspacemenu.release();
++    delete m_windowmenu.release();
++
+     // TODO fluxgen: check if this is the right place
+     for (size_t i = 0; i < m_head_areas.size(); i++)
+         delete m_head_areas[i];
+@@ -1468,7 +1474,8 @@ void BScreen::rereadWindowMenu() {
+ 
+ void BScreen::addConfigMenu(const FbTk::FbString &label, FbTk::Menu &menu) {
+     m_configmenu_list.push_back(make_pair(label, &menu));
+-    setupConfigmenu(*m_configmenu.get());
++    if (m_configmenu.get())
++      setupConfigmenu(*m_configmenu.get());
+ }
+ 
+ void BScreen::removeConfigMenu(FbTk::Menu &menu) {
+@@ -1479,7 +1486,7 @@ void BScreen::removeConfigMenu(FbTk::Menu &menu) {
+     if (erase_it != m_configmenu_list.end())
+         m_configmenu_list.erase(erase_it);
+ 
+-    if (!isShuttingdown())
++    if (!isShuttingdown() && m_configmenu.get())
+         setupConfigmenu(*m_configmenu.get());
+ 
+ }
Index: patches/patch-src_Toolbar_cc
===================================================================
RCS file: patches/patch-src_Toolbar_cc
diff -N patches/patch-src_Toolbar_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-src_Toolbar_cc        19 Apr 2011 13:18:59 -0000
@@ -0,0 +1,26 @@
+$OpenBSD$
+
+Fix: toolbar placement from menu not saved correctly into configfile
+(commit bb2ce5df8a814f9b858b6919356f7d37f10e6b9f)
+
+--- src/Toolbar.cc.orig        Tue Apr 19 11:26:52 2011
++++ src/Toolbar.cc     Tue Apr 19 11:28:26 2011
+@@ -101,8 +101,8 @@ const ToolbarPlacementString placement_strings[] = {
+     { Toolbar::LEFTBOTTOM, "LeftBottom" },
+     { Toolbar::LEFTCENTER, "LeftCenter" },
+     { Toolbar::LEFTTOP, "LeftTop" },
+-    { Toolbar::RIGHTCENTER, "RightCenter" },
+     { Toolbar::RIGHTBOTTOM, "RightBottom" },
++    { Toolbar::RIGHTCENTER, "RightCenter" },
+     { Toolbar::RIGHTTOP, "RightTop" }
+ };
+ 
+@@ -116,7 +116,7 @@ getString() const {
+ 
+     size_t i = (m_value == FbTk::Util::clamp(m_value, Toolbar::TOPLEFT, 
Toolbar::RIGHTTOP)
+                 ? m_value 
+-                : Toolbar::DEFAULT) - 1;
++                : Toolbar::DEFAULT) - Toolbar::TOPLEFT;
+     return placement_strings[i].str;
+ }
+ 
Index: patches/patch-util_fluxbox-generate_menu_in
===================================================================
RCS file: /cvs/ports/x11/fluxbox/patches/patch-util_fluxbox-generate_menu_in,v
retrieving revision 1.6
diff -u -p -r1.6 patch-util_fluxbox-generate_menu_in
--- patches/patch-util_fluxbox-generate_menu_in 25 Jan 2006 03:57:44 -0000      
1.6
+++ patches/patch-util_fluxbox-generate_menu_in 19 Apr 2011 13:18:59 -0000
@@ -1,12 +1,15 @@
 $OpenBSD: patch-util_fluxbox-generate_menu_in,v 1.6 2006/01/25 03:57:44 david 
Exp $
---- util/fluxbox-generate_menu.in.orig Thu Aug 25 11:52:50 2005
-+++ util/fluxbox-generate_menu.in      Mon Jan 23 03:36:56 2006
-@@ -343,7 +343,7 @@ searchForIcon(){
+
+Adapt to our non-GNU grep
+
+--- util/fluxbox-generate_menu.in.orig Thu Sep  9 14:39:18 2010
++++ util/fluxbox-generate_menu.in      Tue Apr 19 14:19:02 2011
+@@ -308,7 +308,7 @@ searchForIcon(){
      # echo "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" 
      if [ -f "$entry_icon" ]; then
      # if icon exists and entry does not already exists, add it
 -        if ! grep -q -m 1 
"^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" $ICONMAPPING 2> /dev/null; 
then
-+        if ! grep -q "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" 
$ICONMAPPING 2> /dev/null; then
++        if ! grep -q "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" 
$ICONMAPPING 2>/dev/null | head -n 1; then
              echo -e "\"${entry_exec}\" \t <${entry_icon}>" >> $ICONMAPPING
          else 
              : echo "#    mapping already exists for ${entry_exec}" >> 
$ICONMAPPING
Index: patches/patch-util_fluxbox-update_configs_cc
===================================================================
RCS file: patches/patch-util_fluxbox-update_configs_cc
diff -N patches/patch-util_fluxbox-update_configs_cc
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-util_fluxbox-update_configs_cc        19 Apr 2011 13:18:59 
-0000
@@ -0,0 +1,15 @@
+$OpenBSD$
+
+Fix building with SEPARATE_BUILD
+
+--- util/fluxbox-update_configs.cc.orig        Sat Sep 18 17:51:51 2010
++++ util/fluxbox-update_configs.cc     Mon Apr 18 17:28:19 2011
+@@ -24,7 +24,7 @@
+ #include "../src/FbTk/StringUtil.hh"
+ #include "../src/FbTk/FileUtil.hh"
+ 
+-#include "defaults.hh"
++#include "../src/defaults.hh"
+ 
+ #ifdef HAVE_CONFIG_H
+ #include "config.h"
Index: pkg/PLIST
===================================================================
RCS file: /cvs/ports/x11/fluxbox/pkg/PLIST,v
retrieving revision 1.15
diff -u -p -r1.15 PLIST
--- pkg/PLIST   25 Jan 2006 03:57:44 -0000      1.15
+++ pkg/PLIST   19 Apr 2011 13:18:59 -0000
@@ -1,20 +1,28 @@
 @comment $OpenBSD: PLIST,v 1.15 2006/01/25 03:57:44 david Exp $
-bin/fbrun
+@bin bin/fbrun
 bin/fbsetbg
-bin/fbsetroot
-bin/fluxbox
+@bin bin/fbsetroot
+@bin bin/fluxbox
 bin/fluxbox-generate_menu
+@bin bin/fluxbox-remote
+@bin bin/fluxbox-update_configs
 bin/startfluxbox
 @man man/man1/fbrun.1
 @man man/man1/fbsetbg.1
 @man man/man1/fbsetroot.1
+@man man/man1/fluxbox-remote.1
 @man man/man1/fluxbox.1
-@man man/man1/fluxstyle.1
 @man man/man1/startfluxbox.1
+@man man/man5/fluxbox-apps.5
+@man man/man5/fluxbox-keys.5
+@man man/man5/fluxbox-menu.5
+@man man/man5/fluxbox-style.5
 share/fluxbox/
+share/fluxbox/apps
 share/fluxbox/init
 share/fluxbox/keys
 share/fluxbox/menu
+share/fluxbox/overlay
 share/fluxbox/styles/
 share/fluxbox/styles/Artwiz
 share/fluxbox/styles/BlueFlux/
@@ -42,9 +50,6 @@ share/fluxbox/styles/BlueFlux/pixmaps/to
 share/fluxbox/styles/BlueFlux/pixmaps/toolbar_label.xpm
 share/fluxbox/styles/BlueFlux/theme.cfg
 share/fluxbox/styles/BlueNight
-share/fluxbox/styles/Carbondioxide
-share/fluxbox/styles/Clean
-share/fluxbox/styles/Cthulhain
 share/fluxbox/styles/Emerge/
 share/fluxbox/styles/Emerge/pixmaps/
 share/fluxbox/styles/Emerge/pixmaps/bullet.xpm
@@ -71,13 +76,96 @@ share/fluxbox/styles/LemonSpace
 share/fluxbox/styles/Makro
 share/fluxbox/styles/MerleyKay
 share/fluxbox/styles/Meta
-share/fluxbox/styles/Minimal
 share/fluxbox/styles/Nyz
 share/fluxbox/styles/Operation
 share/fluxbox/styles/Outcomes
-share/fluxbox/styles/Rampage
 share/fluxbox/styles/Results
 share/fluxbox/styles/Shade
-share/fluxbox/styles/Spiff
 share/fluxbox/styles/Twice
+share/fluxbox/styles/arch/
+share/fluxbox/styles/arch/pixmaps/
+share/fluxbox/styles/arch/pixmaps/bullet.xpm
+share/fluxbox/styles/arch/pixmaps/closefcs.xpm
+share/fluxbox/styles/arch/pixmaps/closepr.xpm
+share/fluxbox/styles/arch/pixmaps/closeufcs.xpm
+share/fluxbox/styles/arch/pixmaps/frame.xpm
+share/fluxbox/styles/arch/pixmaps/gripfcs.xpm
+share/fluxbox/styles/arch/pixmaps/maxfcs.xpm
+share/fluxbox/styles/arch/pixmaps/maxpr.xpm
+share/fluxbox/styles/arch/pixmaps/maxufcs.xpm
+share/fluxbox/styles/arch/pixmaps/menuiconfcs.xpm
+share/fluxbox/styles/arch/pixmaps/menuiconpr.xpm
+share/fluxbox/styles/arch/pixmaps/menuiconufcs.xpm
+share/fluxbox/styles/arch/pixmaps/minfcs.xpm
+share/fluxbox/styles/arch/pixmaps/minpr.xpm
+share/fluxbox/styles/arch/pixmaps/minufcs.xpm
+share/fluxbox/styles/arch/pixmaps/selected.xpm
+share/fluxbox/styles/arch/pixmaps/shadefcs.xpm
+share/fluxbox/styles/arch/pixmaps/shadepr.xpm
+share/fluxbox/styles/arch/pixmaps/shadeufcs.xpm
+share/fluxbox/styles/arch/pixmaps/stickfcs.xpm
+share/fluxbox/styles/arch/pixmaps/stickpr.xpm
+share/fluxbox/styles/arch/pixmaps/stickufcs.xpm
+share/fluxbox/styles/arch/pixmaps/stuckfcs.xpm
+share/fluxbox/styles/arch/pixmaps/stuckufcs.xpm
+share/fluxbox/styles/arch/pixmaps/tbarfcs.xpm
+share/fluxbox/styles/arch/pixmaps/tbarufcs.xpm
+share/fluxbox/styles/arch/pixmaps/unselected.xpm
+share/fluxbox/styles/arch/pixmaps/unshadefcs.xpm
+share/fluxbox/styles/arch/pixmaps/unshadepr.xpm
+share/fluxbox/styles/arch/pixmaps/unshadeufcs.xpm
+share/fluxbox/styles/arch/theme.cfg
+share/fluxbox/styles/bloe/
+share/fluxbox/styles/bloe/pixmaps/
+share/fluxbox/styles/bloe/pixmaps/bullet.xpm
+share/fluxbox/styles/bloe/pixmaps/closefcs.xpm
+share/fluxbox/styles/bloe/pixmaps/closepr.xpm
+share/fluxbox/styles/bloe/pixmaps/closeufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/frame.xpm
+share/fluxbox/styles/bloe/pixmaps/maxfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/maxpr.xpm
+share/fluxbox/styles/bloe/pixmaps/maxufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/menuiconfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/menuiconpr.xpm
+share/fluxbox/styles/bloe/pixmaps/menuiconufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/minfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/minpr.xpm
+share/fluxbox/styles/bloe/pixmaps/minufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/selected.xpm
+share/fluxbox/styles/bloe/pixmaps/shadefcs.xpm
+share/fluxbox/styles/bloe/pixmaps/shadepr.xpm
+share/fluxbox/styles/bloe/pixmaps/shadeufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/stickfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/stickpr.xpm
+share/fluxbox/styles/bloe/pixmaps/stickufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/stuckfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/stuckufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/tbarfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/tbarufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/unselected.xpm
+share/fluxbox/styles/bloe/pixmaps/unshadefcs.xpm
+share/fluxbox/styles/bloe/pixmaps/unshadepr.xpm
+share/fluxbox/styles/bloe/pixmaps/unshadeufcs.xpm
+share/fluxbox/styles/bloe/pixmaps/windowlabelfcs.xpm
+share/fluxbox/styles/bloe/pixmaps/windowlabelufcs.xpm
+share/fluxbox/styles/bloe/theme.cfg
+share/fluxbox/styles/bora_black/
+share/fluxbox/styles/bora_black/theme.cfg
+share/fluxbox/styles/bora_blue/
+share/fluxbox/styles/bora_blue/theme.cfg
+share/fluxbox/styles/bora_green/
+share/fluxbox/styles/bora_green/theme.cfg
+share/fluxbox/styles/carp/
+share/fluxbox/styles/carp/theme.cfg
+share/fluxbox/styles/green_tea/
+share/fluxbox/styles/green_tea/theme.cfg
+share/fluxbox/styles/ostrich/
+share/fluxbox/styles/ostrich/theme.cfg
 share/fluxbox/styles/qnx-photon
+share/fluxbox/styles/zimek_bisque/
+share/fluxbox/styles/zimek_bisque/theme.cfg
+share/fluxbox/styles/zimek_darkblue/
+share/fluxbox/styles/zimek_darkblue/theme.cfg
+share/fluxbox/styles/zimek_green/
+share/fluxbox/styles/zimek_green/theme.cfg
+share/fluxbox/windowmenu

Reply via email to