From 5fa96be09df88f5199027736800d3acb7aa4a5ea Mon Sep 17 00:00:00 2001 From: bcallah Date: Tue, 16 Apr 2013 15:27:03 +0000 Subject: [PATCH] Update x11/fluxbox to 1.3.5 ok gonzalo@ --- x11/fluxbox/Makefile | 8 +- x11/fluxbox/distinfo | 4 +- x11/fluxbox/patches/patch-src_FbTk_FbTime_cc | 16 -- .../patches/patch-src_FbTk_TextureRender_cc | 51 ----- x11/fluxbox/patches/patch-src_FbTk_Timer_cc | 189 ------------------ x11/fluxbox/patches/patch-src_FbTk_Timer_hh | 24 --- x11/fluxbox/patches/patch-src_Makefile_in | 28 +-- x11/fluxbox/patches/patch-src_Window_cc | 36 ---- x11/fluxbox/patches/patch-util_fbsetbg | 29 --- .../patch-util_fluxbox-generate_menu_in | 25 +-- x11/fluxbox/pkg/PLIST | 4 +- 11 files changed, 27 insertions(+), 387 deletions(-) delete mode 100644 x11/fluxbox/patches/patch-src_FbTk_FbTime_cc delete mode 100644 x11/fluxbox/patches/patch-src_FbTk_TextureRender_cc delete mode 100644 x11/fluxbox/patches/patch-src_FbTk_Timer_cc delete mode 100644 x11/fluxbox/patches/patch-src_FbTk_Timer_hh delete mode 100644 x11/fluxbox/patches/patch-src_Window_cc delete mode 100644 x11/fluxbox/patches/patch-util_fbsetbg diff --git a/x11/fluxbox/Makefile b/x11/fluxbox/Makefile index aab05fc9707..ed0cfcdb872 100644 --- a/x11/fluxbox/Makefile +++ b/x11/fluxbox/Makefile @@ -1,10 +1,8 @@ -# $OpenBSD: Makefile,v 1.73 2013/03/21 08:48:56 ajacoutot Exp $ +# $OpenBSD: Makefile,v 1.74 2013/04/16 15:27:03 bcallah Exp $ COMMENT= window manager based on the original Blackbox code -DISTNAME= fluxbox-1.3.3 - -REVISION= 3 +DISTNAME= fluxbox-1.3.5 CATEGORIES= x11 @@ -20,7 +18,7 @@ PERMIT_PACKAGE_CDROM= Yes MODULES= converters/libiconv WANTLIB= ICE Imlib2 SM X11 Xext Xft Xinerama \ - Xpm Xrandr Xrender c expat fontconfig \ + Xpm Xrandr Xrender c fontconfig \ freetype fribidi m stdc++ z CONFIGURE_STYLE= gnu diff --git a/x11/fluxbox/distinfo b/x11/fluxbox/distinfo index 9c181540e8a..ea5b77c2343 100644 --- a/x11/fluxbox/distinfo +++ b/x11/fluxbox/distinfo @@ -1,2 +1,2 @@ -SHA256 (fluxbox-1.3.3.tar.gz) = LqpVlZJOn9saQ4zILFhRW/sbPZqAvOT4nQ+lmugZ7n4= -SIZE (fluxbox-1.3.3.tar.gz) = 1074561 +SHA256 (fluxbox-1.3.5.tar.gz) = mdaID4VS/SqP9M38eqev9Y8K4EqWLMrEEt0mzYhFW5c= +SIZE (fluxbox-1.3.5.tar.gz) = 1125565 diff --git a/x11/fluxbox/patches/patch-src_FbTk_FbTime_cc b/x11/fluxbox/patches/patch-src_FbTk_FbTime_cc deleted file mode 100644 index 9c5b389a037..00000000000 --- a/x11/fluxbox/patches/patch-src_FbTk_FbTime_cc +++ /dev/null @@ -1,16 +0,0 @@ -$OpenBSD: patch-src_FbTk_FbTime_cc,v 1.1 2013/01/11 08:11:26 dcoppa Exp $ - -Compile fix: forgotten parentheses around value -(upstream git commit f587cc9e7e8c40bce778ffc0811a3a6c29107b85) - ---- src/FbTk/FbTime.cc.orig Thu Jan 10 11:32:48 2013 -+++ src/FbTk/FbTime.cc Thu Jan 10 11:36:11 2013 -@@ -71,7 +71,7 @@ uint64_t _now() { - initial = false; - mach_timebase_info_data_t info; - if (mach_timebase_info(&info) == 0) { -- micro_scale *= static_castinfo.numer / static_cast(info.denom); -+ micro_scale *= static_cast(info.numer) / static_cast(info.denom); - } - } - diff --git a/x11/fluxbox/patches/patch-src_FbTk_TextureRender_cc b/x11/fluxbox/patches/patch-src_FbTk_TextureRender_cc deleted file mode 100644 index 0892d7ebbb5..00000000000 --- a/x11/fluxbox/patches/patch-src_FbTk_TextureRender_cc +++ /dev/null @@ -1,51 +0,0 @@ -$OpenBSD: patch-src_FbTk_TextureRender_cc,v 1.4 2013/01/21 09:49:20 dcoppa Exp $ - -Fix bug: actually invert a given Texture (stupid typo) -(upstream git commit bf5da7f1b6e87f574774558700d066d9cff1f436) - -Bugfix: ensure textures have the correct size before applying 'bevel' -(upstream git commit 239e895826b2f843bc50cc6fef8108db174c33e8) - ---- src/FbTk/TextureRender.cc.orig Mon Dec 10 18:26:54 2012 -+++ src/FbTk/TextureRender.cc Mon Jan 21 10:21:35 2013 -@@ -264,7 +264,7 @@ void invertRGB(unsigned int w, unsigned int h, FbTk::R - FbTk::RGBA* r = rgba + (w * h); - - for (--r; l < r; ++l, --r) { // swapping 32bits (RGBA) at ones. -- std::swap(*((unsigned int*)r), *(unsigned int*)r); -+ std::swap(*((unsigned int*)l), *(unsigned int*)r); - } - } - -@@ -916,25 +916,25 @@ Pixmap TextureRender::renderSolid(const FbTk::Texture - - if (texture.type() & Texture::INTERLACED) { - lgc.setForeground(texture.colorTo()); -- register unsigned int i = 0; -- for (; i < height; i += 2) -+ unsigned int i; -+ for (i = 0; i < height; i += 2) - pixmap.drawLine(lgc.gc(), 0, i, width - 1, i); - - } - - lgc.setForeground(texture.loColor()); - -- if (texture.type() & Texture::BEVEL1) { -+ if (height > 1 && width > 1 && texture.type() & Texture::BEVEL1) { - if (texture.type() & Texture::RAISED) { - drawBevelRectangle(pixmap, lgc.gc(), hgc.gc(), 0, height - 1, width -1 , 0); - } else if (texture.type() & Texture::SUNKEN) { - drawBevelRectangle(pixmap, hgc.gc(), lgc.gc(), 0, height - 1, width - 1, 0); - } -- } else if (texture.type() & Texture::BEVEL2) { -+ } else if (width > 2 && height > 2 && texture.type() & Texture::BEVEL2) { - if (texture.type() & Texture::RAISED) { -- drawBevelRectangle(pixmap, lgc.gc(), hgc.gc(), 1, height - 3, width - 3, 1); -+ drawBevelRectangle(pixmap, lgc.gc(), hgc.gc(), 1, height - 2, width - 2, 1); - } else if (texture.type() & Texture::SUNKEN) { -- drawBevelRectangle(pixmap, hgc.gc(), lgc.gc(), 1, height - 3, width - 3, 1); -+ drawBevelRectangle(pixmap, hgc.gc(), lgc.gc(), 1, height - 2, width - 2, 1); - } - } - diff --git a/x11/fluxbox/patches/patch-src_FbTk_Timer_cc b/x11/fluxbox/patches/patch-src_FbTk_Timer_cc deleted file mode 100644 index 037f1eae412..00000000000 --- a/x11/fluxbox/patches/patch-src_FbTk_Timer_cc +++ /dev/null @@ -1,189 +0,0 @@ -$OpenBSD: patch-src_FbTk_Timer_cc,v 1.3 2013/02/04 09:19:44 dcoppa Exp $ - -Fix regression regarding timers with equal end-time -(upstream git commit 3e4ee48bf16be6925b7c35ab8bd73bd962c674d8) - -Fix bug: handle the list of Timers not in-place -(upstream git commit 4d307dcd10af9d817ff5c05fc40ae7487564cb31) -See: http://sourceforge.net/tracker/?func=detail&aid=3590078&group_id=35398&atid=413960 - -Simplifies and fix bugs in FbTk::Timer -(upstream git commit 33161595f482d0dad950ce127b6016eefe8ea691) - ---- src/FbTk/Timer.cc.orig Mon Dec 10 18:26:54 2012 -+++ src/FbTk/Timer.cc Mon Feb 4 10:06:09 2013 -@@ -52,62 +52,47 @@ - #endif - - #include -+#include - #include - - - namespace { - - struct TimerCompare { -- bool operator() (const FbTk::Timer* a, const FbTk::Timer* b) { -- return a->getEndTime() < b->getEndTime(); -+ // stable sort order and allows multiple timers to have -+ // the same end-time -+ bool operator() (const FbTk::Timer* a, const FbTk::Timer* b) const { -+ uint64_t ae = a->getEndTime(); -+ uint64_t be = b->getEndTime(); -+ return (ae < be) || (ae == be && a < b); - } - }; - typedef std::set TimerList; - - TimerList s_timerlist; - -- --/// add a timer to the static list --void addTimer(FbTk::Timer *timer) { -- -- assert(timer); -- int interval = timer->getInterval(); -- -- // interval timers have their timeout change every time they are started! -- if (interval != 0) { -- timer->setTimeout(interval * FbTk::FbTime::IN_SECONDS); -- } -- -- s_timerlist.insert(timer); - } - --/// remove a timer from the static list --void removeTimer(FbTk::Timer *timer) { - -- assert(timer); -- s_timerlist.erase(timer); --} -- -- --} -- -- - namespace FbTk { - --Timer::Timer():m_timing(false), m_once(false), m_interval(0) { -+Timer::Timer() : -+ m_once(false), -+ m_interval(0), -+ m_start(0) { - - } - - Timer::Timer(const RefCount > &handler): - m_handler(handler), -- m_timing(false), - m_once(false), -- m_interval(0) { -+ m_interval(0), -+ m_start(0) { - } - - - Timer::~Timer() { -- if (isTiming()) stop(); -+ stop(); - } - - -@@ -130,19 +115,31 @@ void Timer::setCommand(const RefCount > &cm - - void Timer::start() { - -- m_start = FbTk::FbTime::now(); -- - // only add Timers that actually DO something -- if ((! m_timing || m_interval != 0) && m_handler) { -- m_timing = true; -- ::addTimer(this); -+ if ( ( ! isTiming() || m_interval > 0 ) && m_handler) { -+ -+ // in case start() gets triggered on a started -+ // timer with 'm_interval != 0' we have to remove -+ // it from s_timerlist before restarting it -+ stop(); -+ -+ m_start = FbTk::FbTime::now(); -+ -+ // interval timers have their timeout change every -+ // time they are started! -+ if (m_interval != 0) { -+ m_timeout = m_interval * FbTk::FbTime::IN_SECONDS; -+ } -+ s_timerlist.insert(this); - } - } - - - void Timer::stop() { -- m_timing = false; -- ::removeTimer(this); -+ if (isTiming()) { -+ s_timerlist.erase(this); -+ m_start = 0; -+ } - } - - uint64_t Timer::getEndTime() const { -@@ -195,32 +192,41 @@ void Timer::updateTimers(int fd) { - return; - } - -- now = FbTime::now(); -- for (it = s_timerlist.begin(); it != s_timerlist.end(); ) { -+ // stoping / restarting the timers modifies the list in an upredictable -+ // way. to avoid problems such as infinite loops we save the current -+ // (ordered) list of timers into a list and work on it. - -- // t->fireTimeout() might add timers to the list -- // this invalidates 'it'. thus we store the current timer -- Timer* t = *it; -- if (now < t->getEndTime()) { -+ static std::vector timeouts; -+ -+ now = FbTime::now(); -+ for (it = s_timerlist.begin(); it != s_timerlist.end(); ++it ) { -+ if (now < (*it)->getEndTime()) { - break; - } -+ timeouts.push_back(*it); -+ } - -- t->fireTimeout(); -+ size_t i; -+ const size_t ts = timeouts.size(); -+ for (i = 0; i < ts; ++i) { - -- // find the iterator to the timer again -- // and continue working on the list -- it = s_timerlist.find(t); -- it++; -- s_timerlist.erase(t); -+ FbTk::Timer& t = *timeouts[i]; - -- if (! t->doOnce()) { // restart the current timer -- t->m_timing = false; -- t->start(); -- } else { -- t->stop(); -+ // first we stop the timer to remove it -+ // from s_timerlist -+ t.stop(); -+ -+ // then we call the handler which might (re)start 't' -+ // on it's own -+ t.fireTimeout(); -+ -+ // restart 't' if needed -+ if (!t.doOnce() && !t.isTiming()) { -+ t.start(); - } - } - -+ timeouts.clear(); - } - - diff --git a/x11/fluxbox/patches/patch-src_FbTk_Timer_hh b/x11/fluxbox/patches/patch-src_FbTk_Timer_hh deleted file mode 100644 index 1dd3c03c9f7..00000000000 --- a/x11/fluxbox/patches/patch-src_FbTk_Timer_hh +++ /dev/null @@ -1,24 +0,0 @@ -$OpenBSD: patch-src_FbTk_Timer_hh,v 1.1 2013/01/21 09:49:20 dcoppa Exp $ - -Simplifies and fix bugs in FbTk::Timer -(upstream git commit 33161595f482d0dad950ce127b6016eefe8ea691) - ---- src/FbTk/Timer.hh.orig Mon Dec 10 18:26:54 2012 -+++ src/FbTk/Timer.hh Mon Jan 21 10:25:31 2013 -@@ -61,7 +61,7 @@ class Timer { (public) - - static void updateTimers(int file_descriptor); - -- int isTiming() const { return m_timing; } -+ int isTiming() const { return (m_start > 0); } - int getInterval() const { return m_interval; } - - int doOnce() const { return m_once; } -@@ -77,7 +77,6 @@ class Timer { (public) - private: - RefCount > m_handler; ///< what to do on a timeout - -- bool m_timing; ///< clock running? - bool m_once; ///< do timeout only once? - int m_interval; ///< Is an interval-only timer (e.g. clock), in seconds - diff --git a/x11/fluxbox/patches/patch-src_Makefile_in b/x11/fluxbox/patches/patch-src_Makefile_in index 5a9719f5193..5c30ecf8b6b 100644 --- a/x11/fluxbox/patches/patch-src_Makefile_in +++ b/x11/fluxbox/patches/patch-src_Makefile_in @@ -1,10 +1,10 @@ -$OpenBSD: patch-src_Makefile_in,v 1.3 2013/01/11 08:11:26 dcoppa Exp $ +$OpenBSD: patch-src_Makefile_in,v 1.4 2013/04/16 15:27:03 bcallah Exp $ Don't check for git revision, this is a stable release ---- src/Makefile.in.orig Thu Jan 10 10:43:17 2013 -+++ src/Makefile.in Thu Jan 10 10:45:51 2013 -@@ -932,7 +932,6 @@ defaults.hh: Makefile +--- src/Makefile.in.orig Sun Apr 7 18:10:55 2013 ++++ src/Makefile.in Sun Apr 7 18:12:55 2013 +@@ -933,7 +933,6 @@ defaults.hh: Makefile defaults.cc: force @( \ @@ -12,16 +12,16 @@ Don't check for git revision, this is a stable release echo '// This file is generated from Makefile. Do not edit!'; \ echo '#include "defaults.hh"'; \ echo ''; \ -@@ -941,10 +940,8 @@ defaults.cc: force +@@ -942,11 +941,7 @@ defaults.cc: force echo '}'; \ echo ''; \ echo 'const char* gitrevision() {'; \ -- echo ' return "'`cat $$GITDIR/$$(cat $$GITDIR/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 "this_is_tar_ball_build";'; \ -+ echo '}' ) > defaults.cc - - force: ; - +- if test -r $$GITDIR/HEAD; then \ +- echo ' return "'`cat $$GITDIR/$$(cat $$GITDIR/HEAD | cut -f 2 -d ' ')`'";'; \ +- else \ +- echo ' return "this_is_tar_ball_build";'; \ +- fi; \ ++ echo ' return "this_is_tar_ball_build";'; \ + echo '}' ) > defaults_tmp.cc + @if ! cmp defaults_tmp.cc defaults.cc ; then cp defaults_tmp.cc defaults.cc; fi + @rm defaults_tmp.cc diff --git a/x11/fluxbox/patches/patch-src_Window_cc b/x11/fluxbox/patches/patch-src_Window_cc deleted file mode 100644 index 61ba251e51e..00000000000 --- a/x11/fluxbox/patches/patch-src_Window_cc +++ /dev/null @@ -1,36 +0,0 @@ -$OpenBSD: patch-src_Window_cc,v 1.8 2013/01/11 08:11:26 dcoppa Exp $ - -Reduce lagging behind of windows on slower displays -(upstream git commit 79fe2fca1de5140f538e68f6981b27cf7f917e7a) - ---- src/Window.cc.orig Sat Oct 29 15:46:15 2011 -+++ src/Window.cc Mon Aug 27 11:52:37 2012 -@@ -2393,6 +2393,7 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me - Fluxbox::instance()->keys()->doAction(me.type, me.state, m_last_pressed_button, context, &winClient(), me.time); - - if (moving) { -+ XEvent e; - - // Warp to next or previous workspace?, must have moved sideways some - int moved_x = me.x_root - m_last_resize_x; -@@ -2428,7 +2429,6 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me - if (new_id != cur_id) { - - // remove motion events from queue to avoid repeated warps -- XEvent e; - while (XCheckTypedEvent(display, MotionNotify, &e)) { - // might as well update the y-coordinate - m_last_resize_y = e.xmotion.y_root; -@@ -2453,6 +2453,12 @@ void FluxboxWindow::motionNotifyEvent(XMotionEvent &me - - // dx = current left side, dy = current top - doSnapping(dx, dy); -+ -+ // do not update display if another motion event is already pending -+ if (XCheckTypedEvent(display, MotionNotify, &e)) { -+ XPutBackEvent(display, &e); -+ return; -+ } - - if (!screen().doOpaqueMove()) { - parent().drawRectangle(screen().rootTheme()->opGC(), diff --git a/x11/fluxbox/patches/patch-util_fbsetbg b/x11/fluxbox/patches/patch-util_fbsetbg deleted file mode 100644 index 35aa7f38ab3..00000000000 --- a/x11/fluxbox/patches/patch-util_fbsetbg +++ /dev/null @@ -1,29 +0,0 @@ -$OpenBSD: patch-util_fbsetbg,v 1.1 2013/01/11 08:11:26 dcoppa Exp $ - -Remove bashisms -(upstream git commit dcdfdfd56b5dbb6453062ad60876647b11433f18) - ---- util/fbsetbg.orig Mon Dec 10 18:26:53 2012 -+++ util/fbsetbg Thu Jan 10 11:45:28 2013 -@@ -505,7 +505,11 @@ if [ "$option" = random ]; then - randomnumber=`random_number` - # some shells don't support $RANDOM - elif [ -z "$RANDOM" ]; then -- randomnumber=`(echo $$ ;time ps; w ; date )2>&1 | cksum | cut -f1 -d' '` -+ if [ -r /dev/urandom ]; then -+ randomnumber=`hexdump -n 2 -e '/2 "%u"' /dev/urandom` -+ else -+ randomnumber=`(echo $$; ps; w; date) 2>&1 | cksum | cut -f1 -d' '` -+ fi - else - randomnumber="$RANDOM" - fi -@@ -526,7 +530,7 @@ fi - - - if [ ! -r "$wallpaper" ]; then -- if [ "$ignore_missing_wallpaper" == "true" ]; then -+ if [ "$ignore_missing_wallpaper" = "true" ]; then - exit 0 - fi - message "Can't find wallpaper $wallpaper" diff --git a/x11/fluxbox/patches/patch-util_fluxbox-generate_menu_in b/x11/fluxbox/patches/patch-util_fluxbox-generate_menu_in index 25983637bec..209c52e9769 100644 --- a/x11/fluxbox/patches/patch-util_fluxbox-generate_menu_in +++ b/x11/fluxbox/patches/patch-util_fluxbox-generate_menu_in @@ -1,4 +1,4 @@ -$OpenBSD: patch-util_fluxbox-generate_menu_in,v 1.9 2013/01/11 08:11:26 dcoppa Exp $ +$OpenBSD: patch-util_fluxbox-generate_menu_in,v 1.10 2013/04/16 15:27:03 bcallah Exp $ Adapt to our non-GNU grep @@ -8,29 +8,14 @@ Remove bashisms Default browswer variable can be empty (upstream git commit be2c52a146a013ebbfb708073317c337986371ff) ---- util/fluxbox-generate_menu.in.orig Mon Dec 10 18:26:53 2012 -+++ util/fluxbox-generate_menu.in Thu Jan 10 12:43:23 2013 -@@ -330,8 +330,8 @@ searchForIcon(){ +--- util/fluxbox-generate_menu.in.orig Sun Apr 7 18:18:38 2013 ++++ util/fluxbox-generate_menu.in Sun Apr 7 18:19:53 2013 +@@ -330,7 +330,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 -- echo -e "\"${entry_exec}\" \t <${entry_icon}>" >> $ICONMAPPING + if ! grep -q "^.${entry_exec}.[[:space:]]*<.*/${icon_base}\....>" $ICONMAPPING 2> /dev/null; then -+ printf "\"${entry_exec}\" \t <${entry_icon}>\n" >> $ICONMAPPING + printf "\"${entry_exec}\" \t <${entry_icon}>\n" >> $ICONMAPPING else : echo "# mapping already exists for ${entry_exec}" >> $ICONMAPPING - fi -@@ -1530,7 +1530,11 @@ else - done - fi - DEFAULT_BROWSERNAME=`echo $DEFAULT_BROWSER|awk '{print $1}'` --DEFAULT_BROWSERNAME=`basename $DEFAULT_BROWSERNAME` -+if [ "x$DEFAULT_BROWSERNAME" != "x" ]; then -+ DEFAULT_BROWSERNAME=`basename $DEFAULT_BROWSERNAME` -+else -+ DEFAULT_BROWSERNAME="firefox" -+fi - - if [ -z "$LAUNCHER" ]; then - LAUNCHER=@pkgprefix@fbrun@pkgsuffix@@EXEEXT@ diff --git a/x11/fluxbox/pkg/PLIST b/x11/fluxbox/pkg/PLIST index 45c6cc75a5c..1297232bc53 100644 --- a/x11/fluxbox/pkg/PLIST +++ b/x11/fluxbox/pkg/PLIST @@ -1,4 +1,4 @@ -@comment $OpenBSD: PLIST,v 1.17 2013/01/11 08:11:26 dcoppa Exp $ +@comment $OpenBSD: PLIST,v 1.18 2013/04/16 15:27:03 bcallah Exp $ @bin bin/fbrun bin/fbsetbg @bin bin/fbsetroot @@ -87,6 +87,8 @@ share/fluxbox/nls/fr_FR.ISO-8859-15/ share/fluxbox/nls/fr_FR.ISO-8859-15/fluxbox.cat share/fluxbox/nls/fr_FR.UTF-8/ share/fluxbox/nls/fr_FR.UTF-8/fluxbox.cat +share/fluxbox/nls/he_IL.UTF-8/ +share/fluxbox/nls/he_IL.UTF-8/fluxbox.cat share/fluxbox/nls/it_IT.ISO-8859-1/ share/fluxbox/nls/it_IT.ISO-8859-1/fluxbox.cat share/fluxbox/nls/it_IT.UTF-8/