[ghc-xmonad-contrib] fix build with X11-1.6.1 which now provides getAtomName

Jens Petersen petersen at fedoraproject.org
Tue Mar 19 04:53:25 UTC 2013


commit bab015079d3100e625d32785a33969430a74b067
Author: Jens Petersen <petersen at redhat.com>
Date:   Tue Mar 19 13:53:15 2013 +0900

    fix build with X11-1.6.1 which now provides getAtomName
    
    patch from upstream

 ghc-xmonad-contrib.spec                           |    9 +++++-
 xmonad-contrib-0.11-DebugEvents-getAtomName.patch |   30 +++++++++++++++++++++
 2 files changed, 38 insertions(+), 1 deletions(-)
---
diff --git a/ghc-xmonad-contrib.spec b/ghc-xmonad-contrib.spec
index 910beac..163fd9c 100644
--- a/ghc-xmonad-contrib.spec
+++ b/ghc-xmonad-contrib.spec
@@ -18,7 +18,7 @@ your own extensions.
 
 Name:           ghc-%{pkg_name}
 Version:        0.11
-Release:        2%{?dist}
+Release:        3%{?dist}
 Summary:        %{common_summary}
 
 License:        BSD
@@ -28,6 +28,7 @@ Patch0:         xmonad-contrib-use_xft-flag.patch
 Patch1:         xmonad-contrib-0.10-xft-fonts.patch
 Patch2:         xmonad-contrib-0.10-ewmh-set-NET_WM_STATE.patch
 Patch4:         xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch
+Patch5:         xmonad-contrib-0.11-DebugEvents-getAtomName.patch
 
 BuildRequires:  ghc-Cabal-devel
 BuildRequires:  ghc-rpm-macros
@@ -57,6 +58,9 @@ BuildRequires:  ghc-xmonad-devel
 %patch1 -p1 -b .orig-misc-fixed
 %patch2 -p1 -b .orig-NET_WM_STATE
 %patch4 -p1 -b .orig-rescale
+%patch5 -p1 -b .orig-getAtomName
+
+cabal-tweak-dep-ver X11 "=1.6" "=1.6.1"
 
 
 %build
@@ -80,6 +84,9 @@ BuildRequires:  ghc-xmonad-devel
 
 
 %changelog
+* Tue Mar 19 2013 Jens Petersen <petersen at redhat.com> - 0.11-3
+- fix build with X11-1.6.1
+
 * Wed Feb 13 2013 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.11-2
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
 
diff --git a/xmonad-contrib-0.11-DebugEvents-getAtomName.patch b/xmonad-contrib-0.11-DebugEvents-getAtomName.patch
new file mode 100644
index 0000000..1e49c7a
--- /dev/null
+++ b/xmonad-contrib-0.11-DebugEvents-getAtomName.patch
@@ -0,0 +1,30 @@
+--- xmonad-contrib-0.11/XMonad/Hooks/DebugEvents.hs~	2013-01-01 10:32:44.000000000 +0900
++++ xmonad-contrib-0.11/XMonad/Hooks/DebugEvents.hs	2013-03-19 13:48:30.678663498 +0900
+@@ -42,27 +42,12 @@
+ import           Data.Maybe                                  (fromMaybe)
+ import           Data.Monoid
+ import           Foreign
+-import           Foreign.C.String
+ import           Foreign.C.Types
+ import           Numeric                                     (showHex)
+ import           System.Exit
+ import           System.IO
+ import           System.Process
+ 
+--- this should move into X11
+-foreign import ccall unsafe "XGetAtomName"
+-  xGetAtomName :: Display -> Atom -> IO CString
+-
+-getAtomName     :: Display -> Atom -> IO (Maybe String)
+-getAtomName d a =  do
+-  n <- xGetAtomName d a
+-  if n == nullPtr
+-    then return Nothing
+-    else do
+-      n' <- peekCString n
+-      xFree n
+-      return $ Just n'
+-
+ -- | Event hook to dump all received events.  You should probably not use this
+ --   unconditionally; it will produce massive amounts of output.
+ debugEventsHook   :: Event -> X All


More information about the scm-commits mailing list