summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2011-09-18 18:10:59 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2011-09-18 18:10:59 +0000
commitf6b656b6a0c34f408ce99fb6b6c8192b6eccb99e (patch)
tree1d791245b93a141590ddff1a1c011b5d7bc5c341 /x11-misc/xmobar
parentVersion bump. Requested by Aleksander Alistra Balicki and by Dan Douglas (bug... (diff)
downloadgentoo-2-f6b656b6a0c34f408ce99fb6b6c8192b6eccb99e.tar.gz
gentoo-2-f6b656b6a0c34f408ce99fb6b6c8192b6eccb99e.tar.bz2
gentoo-2-f6b656b6a0c34f408ce99fb6b6c8192b6eccb99e.zip
Removed old.
(Portage version: 2.1.10.11/cvs/Linux x86_64)
Diffstat (limited to 'x11-misc/xmobar')
-rw-r--r--x11-misc/xmobar/ChangeLog6
-rw-r--r--x11-misc/xmobar/files/xmobar-0.9.2-cpu-high-load.patch71
-rw-r--r--x11-misc/xmobar/xmobar-0.11.1.ebuild51
3 files changed, 5 insertions, 123 deletions
diff --git a/x11-misc/xmobar/ChangeLog b/x11-misc/xmobar/ChangeLog
index 982a75f5bdaa..c31b20abfaab 100644
--- a/x11-misc/xmobar/ChangeLog
+++ b/x11-misc/xmobar/ChangeLog
@@ -1,6 +1,10 @@
# ChangeLog for x11-misc/xmobar
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/xmobar/ChangeLog,v 1.12 2011/09/18 18:09:00 slyfox Exp $
+# $Header: /var/cvsroot/gentoo-x86/x11-misc/xmobar/ChangeLog,v 1.13 2011/09/18 18:10:59 slyfox Exp $
+
+ 18 Sep 2011; Sergei Trofimovich <slyfox@gentoo.org>
+ -files/xmobar-0.9.2-cpu-high-load.patch, -xmobar-0.11.1.ebuild:
+ Removed old.
*xmobar-0.13 (18 Sep 2011)
diff --git a/x11-misc/xmobar/files/xmobar-0.9.2-cpu-high-load.patch b/x11-misc/xmobar/files/xmobar-0.9.2-cpu-high-load.patch
deleted file mode 100644
index b2bfcafcfde2..000000000000
--- a/x11-misc/xmobar/files/xmobar-0.9.2-cpu-high-load.patch
+++ /dev/null
@@ -1,71 +0,0 @@
-Sun Aug 16 22:25:20 EEST 2009 Sergei Trofimovich <slyfox@inbox.ru>
- * fixed "Abnormally high cpu load on X" (11 issue in tracker)
-
- Steps to reproduce are described in
- http://code.google.com/p/xmobar/issues/detail?id=11
-
- I've noticed large bunch of XAllocNamedColor calls/sec
- in xmobar ltrace log.
- This patch introduces simple hackish color cachig. It's more PoC,
- than real fix.
-diff -rN -u old-xmobar/XUtil.hsc new-xmobar/XUtil.hsc
---- old-xmobar/XUtil.hsc 2009-08-16 22:26:45.107628493 +0300
-+++ new-xmobar/XUtil.hsc 2009-08-16 22:26:45.126628260 +0300
-@@ -33,12 +33,14 @@
- import Control.Concurrent
- import Control.Monad
- import Control.Monad.Trans
-+import Data.IORef
- import Foreign
- import Graphics.X11.Xlib hiding (textExtents, textWidth)
- import qualified Graphics.X11.Xlib as Xlib (textExtents, textWidth)
- import Graphics.X11.Xlib.Extras
- import System.Posix.Types (Fd(..))
- import System.IO
-+import System.IO.Unsafe (unsafePerformIO)
- #if defined XFT || defined UTF8
- import Foreign.C
- import qualified System.IO.UTF8 as UTF8 (readFile,hGetLine)
-@@ -187,9 +189,31 @@
- initColor dpy c = (initColor' dpy c) `catch`
- (const . return $ DynPixel False (blackPixel dpy $ defaultScreen dpy))
-
-+type ColorCache = [(String, Color)]
-+
-+-- dark magic: enable hack
-+{-# NOINLINE colorCache #-}
-+colorCache :: IORef ColorCache
-+colorCache = unsafePerformIO $ newIORef []
-+
-+getCachedColor :: String -> IO (Maybe Color)
-+getCachedColor color_name = do
-+ result <- lookup color_name `fmap` readIORef colorCache
-+ return result
-+
-+putCachedColor :: String -> Color -> IO ()
-+putCachedColor color_name color_id = do
-+ modifyIORef colorCache $ \cache -> (color_name,color_id) : cache
-+
- initColor' :: Display -> String -> IO DynPixel
- initColor' dpy c = do
-- (c', _) <- allocNamedColor dpy colormap c
-+ cached_color <- getCachedColor c
-+ c' <- do
-+ case cached_color of
-+ Just col -> return col
-+ _ -> do (c'', _) <- allocNamedColor dpy colormap c
-+ putCachedColor c c''
-+ return c''
- return $ DynPixel True (color_pixel c')
- where colormap = defaultColormap dpy (defaultScreen dpy)
-
-@@ -197,7 +221,8 @@
- withColors d cs f = do
- ps <- mapM (io . initColor d) cs
- r <- f $ map pixel ps
-- io $ freeColors d cmap (map pixel $ filter allocated ps) 0
-+ -- there is color leak in 'putCachedColor'. might be freed at xmobar shutdown
-+ -- io $ freeColors d cmap (map pixel $ filter allocated ps) 0
- return r
- where
- cmap = defaultColormap d (defaultScreen d)
diff --git a/x11-misc/xmobar/xmobar-0.11.1.ebuild b/x11-misc/xmobar/xmobar-0.11.1.ebuild
deleted file mode 100644
index 7955ef1f0b9e..000000000000
--- a/x11-misc/xmobar/xmobar-0.11.1.ebuild
+++ /dev/null
@@ -1,51 +0,0 @@
-# Copyright 1999-2010 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/x11-misc/xmobar/xmobar-0.11.1.ebuild,v 1.1 2010/10/04 21:09:26 kolmodin Exp $
-
-EAPI="2"
-CABAL_FEATURES="bin"
-inherit haskell-cabal
-
-DESCRIPTION="A Minimalistic Text Based Status Bar"
-HOMEPAGE="http://code.haskell.org/~arossato/xmobar"
-SRC_URI="http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz"
-
-LICENSE="BSD"
-SLOT="0"
-KEYWORDS="~amd64 ~x86"
-IUSE="xft unicode mail"
-# wifi USE flag disabled due to compilation error with current stable wireless-tools.
-
-DEPEND=">=dev-lang/ghc-6.8.1
- >=dev-haskell/cabal-1.6
- dev-haskell/mtl
- dev-haskell/parsec
- dev-haskell/stm
- dev-haskell/time
- >=dev-haskell/x11-1.3.0
- unicode? ( dev-haskell/utf8-string )
- xft? ( dev-haskell/utf8-string
- dev-haskell/x11-xft )
- mail? ( dev-haskell/hinotify )"
-
-# mpd? ( >dev-haskell/libmpd-0.4 )
-# wifi? ( net-wireless/wireless-tools )
-
-#RDEPEND="mpd? ( media-sound/mpd )"
-RDEPEND=""
-
-src_configure() {
- cabal_src_configure \
- $(cabal_flag xft with_xft) \
- $(cabal_flag unicode with_utf8) \
- $(cabal_flag mail with_inotify)
-
-# $(cabal_flag mpd with_mpd)
-# $(cabal_flag wifi with_iwlib) \
-}
-
-src_install() {
- cabal_src_install
-
- dodoc xmobar.config-sample README
-}