From 46bdfc699e1c08b6ca8126da0ae3e3e4e2438558 Mon Sep 17 00:00:00 2001 From: Jens Petersen Date: Sat, 17 Nov 2012 13:39:23 +0900 Subject: [PATCH] add upstream ICCCMFocus patch for WM_TAKE_FOCUS move to core (#874855) - use a patch for use_xft flag - update packaging with cabal-rpm --- ghc-xmonad-contrib.spec | 36 +++++++++++-------- xmonad-contrib-0.10-takeFocus-core.patch | 45 ++++++++++++++++++++++++ xmonad-contrib-use_xft-flag.patch | 10 ++++++ 3 files changed, 76 insertions(+), 15 deletions(-) create mode 100644 xmonad-contrib-0.10-takeFocus-core.patch create mode 100644 xmonad-contrib-use_xft-flag.patch diff --git a/ghc-xmonad-contrib.spec b/ghc-xmonad-contrib.spec index fb037f1..07e5ea9 100644 --- a/ghc-xmonad-contrib.spec +++ b/ghc-xmonad-contrib.spec @@ -1,4 +1,3 @@ -# cabal2spec-0.25.2 # https://fedoraproject.org/wiki/Packaging:Haskell # https://fedoraproject.org/wiki/PackagingDrafts/Haskell @@ -19,19 +18,25 @@ your own extensions. Name: ghc-%{pkg_name} Version: 0.10 -Release: 6%{?dist} +Release: 7%{?dist} Summary: %{common_summary} -Group: System Environment/Libraries License: BSD -# BEGIN cabal2spec URL: http://hackage.haskell.org/package/%{pkg_name} Source0: http://hackage.haskell.org/packages/archive/%{pkg_name}/%{version}/%{pkg_name}-%{version}.tar.gz -ExclusiveArch: %{ghc_arches} -BuildRequires: ghc-Cabal-devel -BuildRequires: ghc-rpm-macros %{!?without_hscolour:hscolour} -# END cabal2spec +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 +Patch3: xmonad-contrib-0.10-BorderResize-smaller.patch +Patch4: xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch +Patch5: xmonad-contrib-0.10-X11-1.6.patch +Patch6: xmonad-contrib-0.10-takeFocus-core.patch +BuildRequires: ghc-Cabal-devel +BuildRequires: ghc-rpm-macros +# Begin cabal-rpm deps: +BuildRequires: ghc-X11-devel +BuildRequires: ghc-X11-xft-devel BuildRequires: ghc-containers-devel BuildRequires: ghc-directory-devel BuildRequires: ghc-extensible-exceptions-devel @@ -42,13 +47,8 @@ BuildRequires: ghc-process-devel BuildRequires: ghc-random-devel BuildRequires: ghc-unix-devel BuildRequires: ghc-utf8-string-devel -BuildRequires: ghc-X11-xft-devel BuildRequires: ghc-xmonad-devel -Patch1: xmonad-contrib-0.10-xft-fonts.patch -Patch2: xmonad-contrib-0.10-ewmh-set-NET_WM_STATE.patch -Patch3: xmonad-contrib-0.10-BorderResize-smaller.patch -Patch4: xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch -Patch5: xmonad-contrib-0.10-X11-1.6.patch +# End cabal-rpm deps %description %{common_description} @@ -56,15 +56,16 @@ Patch5: xmonad-contrib-0.10-X11-1.6.patch %prep %setup -q -n %{pkg_name}-%{version} +%patch0 -p1 -b .orig-xft %patch1 -p1 -b .orig-misc-fixed %patch2 -p1 -b .orig-NET_WM_STATE %patch3 -p1 -b .orig-mouseborder %patch4 -p1 -b .orig-rescale %patch5 -p1 -b .orig-X11 +%patch6 -p1 -b .orig-Focus %build -%define cabal_configure_options -f use_xft %ghc_lib_build @@ -85,6 +86,11 @@ Patch5: xmonad-contrib-0.10-X11-1.6.patch %changelog +* Sat Nov 17 2012 Jens Petersen - 0.10-7 +- add ICCCMFocus patch from upstream for WM_TAKE_FOCUS move to core (#874855) +- use a patch for use_xft flag +- update packaging with cabal-rpm + * Thu Jul 19 2012 Fedora Release Engineering - 0.10-6 - Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild diff --git a/xmonad-contrib-0.10-takeFocus-core.patch b/xmonad-contrib-0.10-takeFocus-core.patch new file mode 100644 index 0000000..bc69917 --- /dev/null +++ b/xmonad-contrib-0.10-takeFocus-core.patch @@ -0,0 +1,45 @@ +Thu Nov 8 14:57:16 PST 2012 Adam Vogt + * Gut H.ICCCMFocus: issue 177 has been merged in core. + + Keep the module for now: the LG3D bit might still be useful + and there's no need to break configs unnecessarily. +diff -rN -u old-XMonadContrib/XMonad/Hooks/ICCCMFocus.hs new-XMonadContrib/XMonad/Hooks/ICCCMFocus.hs +--- old-XMonadContrib/XMonad/Hooks/ICCCMFocus.hs 2012-11-14 23:07:15.699051848 -0800 ++++ new-XMonadContrib/XMonad/Hooks/ICCCMFocus.hs 2012-11-14 23:07:15.982052555 -0800 +@@ -18,6 +18,7 @@ + -- @ + ----------------------------------------------------------------------------- + module XMonad.Hooks.ICCCMFocus ++{-# DEPRECATED "XMonad.Hooks.ICCCMFocus: xmonad>0.10 core merged issue 177" #-} + ( + atom_WM_TAKE_FOCUS + , takeFocusX +@@ -27,27 +28,11 @@ + import XMonad + import XMonad.Hooks.SetWMName + import qualified XMonad.StackSet as W +-import Control.Monad +- +-atom_WM_TAKE_FOCUS :: +- X Atom +-atom_WM_TAKE_FOCUS = +- getAtom "WM_TAKE_FOCUS" + + takeFocusX :: + Window + -> X () +-takeFocusX w = +- withWindowSet . const $ do +- dpy <- asks display +- wmtakef <- atom_WM_TAKE_FOCUS +- wmprot <- atom_WM_PROTOCOLS +- protocols <- io $ getWMProtocols dpy w +- when (wmtakef `elem` protocols) $ +- io . allocaXEvent $ \ev -> do +- setEventType ev clientMessage +- setClientMessageEvent ev w wmprot 32 wmtakef currentTime +- sendEvent dpy w False noEventMask ev ++takeFocusX _w = return () + + -- | The value to add to your log hook configuration. + takeTopFocus :: diff --git a/xmonad-contrib-use_xft-flag.patch b/xmonad-contrib-use_xft-flag.patch new file mode 100644 index 0000000..90b9bfc --- /dev/null +++ b/xmonad-contrib-use_xft-flag.patch @@ -0,0 +1,10 @@ +--- xmonad-contrib-0.10/xmonad-contrib.cabal~ 2012-06-11 10:59:49.665575897 +0900 ++++ xmonad-contrib-0.10/xmonad-contrib.cabal 2012-11-17 13:14:21.302802620 +0900 +@@ -38,6 +38,7 @@ + + flag use_xft + description: Use Xft to render text ++ default: True + + flag testing + description: Testing mode