diff --git a/ghc-xmonad-contrib.spec b/ghc-xmonad-contrib.spec index 1e2f42a..40347c1 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: 4%{?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,11 +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 +# End cabal-rpm deps %description %{common_description} @@ -54,13 +56,18 @@ Patch3: xmonad-contrib-0.10-BorderResize-smaller.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 +%if 0%{?fedora} >= 18 +%patch5 -p1 -b .orig-X11 +%endif +%patch6 -p1 -b .orig-Focus %build -%define cabal_configure_options -f use_xft %ghc_lib_build @@ -81,6 +88,20 @@ Patch3: xmonad-contrib-0.10-BorderResize-smaller.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 +- condition X11-1.6 patch to fedora >= 18 +- 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 + +* Sun May 13 2012 Jens Petersen - 0.10-5 +- patch XMonad.Util.PositionStore to not scale the size of windows + when changing screen unless the window is now larger than the monitor +- allow building with X11-1.6 + * Fri Mar 23 2012 Jens Petersen - 0.10-4 - add license to ghc_files diff --git a/xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch b/xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch new file mode 100644 index 0000000..96fb3c8 --- /dev/null +++ b/xmonad-contrib-0.10-PositionStore-dont-rescale-with-screen.patch @@ -0,0 +1,37 @@ +diff -rN -u old-XMonadContrib/XMonad/Util/PositionStore.hs new-XMonadContrib/XMonad/Util/PositionStore.hs +--- old-XMonadContrib/XMonad/Util/PositionStore.hs 2012-05-13 20:21:34.785720303 +0900 ++++ new-XMonadContrib/XMonad/Util/PositionStore.hs 2012-05-13 20:21:34.814720213 +0900 +@@ -36,7 +36,7 @@ + + data PositionStore = PS (M.Map Window PosStoreRectangle) + deriving (Read,Show,Typeable) +-data PosStoreRectangle = PSRectangle Double Double Double Double ++data PosStoreRectangle = PSRectangle Double Double Dimension Dimension + deriving (Read,Show,Typeable) + + instance ExtensionClass PositionStore where +@@ -55,8 +55,7 @@ + offsetY = y - srY + in PS $ M.insert w (PSRectangle (fromIntegral offsetX / fromIntegral srWh) + (fromIntegral offsetY / fromIntegral srHt) +- (fromIntegral wh / fromIntegral srWh) +- (fromIntegral ht / fromIntegral srHt)) posStoreMap ++ (min wh srWh) (min ht srHt)) posStoreMap + + posStoreRemove :: PositionStore -> Window -> PositionStore + posStoreRemove (PS posStoreMap) w = PS $ M.delete w posStoreMap +@@ -64,12 +63,9 @@ + posStoreQuery :: PositionStore -> Window -> Rectangle -> Maybe Rectangle + posStoreQuery (PS posStoreMap) w (Rectangle srX srY srWh srHt) = do + (PSRectangle x y wh ht) <- M.lookup w posStoreMap +- let realWh = fromIntegral srWh * wh +- realHt = fromIntegral srHt * ht +- realOffsetX = fromIntegral srWh * x ++ let realOffsetX = fromIntegral srWh * x + realOffsetY = fromIntegral srHt * y +- return (Rectangle (srX + round realOffsetX) (srY + round realOffsetY) +- (round realWh) (round realHt)) ++ return (Rectangle (srX + round realOffsetX) (srY + round realOffsetY) wh ht) + + posStoreMove :: PositionStore -> Window -> Position -> Position -> Rectangle -> Rectangle -> PositionStore + posStoreMove posStore w x y oldSr newSr = diff --git a/xmonad-contrib-0.10-X11-1.6.patch b/xmonad-contrib-0.10-X11-1.6.patch new file mode 100644 index 0000000..a16ef9a --- /dev/null +++ b/xmonad-contrib-0.10-X11-1.6.patch @@ -0,0 +1,35 @@ +--- xmonad-contrib-0.10/xmonad-contrib.cabal~ 2011-11-19 08:26:06.000000000 +0900 ++++ xmonad-contrib-0.10/xmonad-contrib.cabal 2012-06-11 10:59:49.665575897 +0900 +@@ -61,7 +61,7 @@ + extensions: ForeignFunctionInterface + cpp-options: -DXFT + +- build-depends: mtl >= 1 && < 3, unix, X11>=1.5.0.0 && < 1.6, xmonad>=0.10, xmonad<0.11, utf8-string ++ build-depends: mtl >= 1 && < 3, unix, X11>=1.5.0.0 && < 1.7, xmonad>=0.10, xmonad<0.11, utf8-string + + if true + ghc-options: -fwarn-tabs -Wall +diff -u xmonad-contrib-0.10/XMonad/Layout/Spiral.hs\~ xmonad-contrib-0.10/XMonad/Layout/Spiral.hs +--- xmonad-contrib-0.10/XMonad/Layout/Spiral.hs~ 2011-11-19 08:26:06.000000000 +0900 ++++ xmonad-contrib-0.10/XMonad/Layout/Spiral.hs 2012-06-11 11:31:00.123639743 +0900 +@@ -26,7 +26,7 @@ + ) where + + import Data.Ratio +-import XMonad ++import XMonad hiding ( Rotation ) + import XMonad.StackSet ( integrate ) + + -- $usage +--- xmonad-contrib-0.10/XMonad/Util/Paste.hs~ 2011-11-19 08:26:06.000000000 +0900 ++++ xmonad-contrib-0.10/XMonad/Util/Paste.hs 2012-06-11 11:49:14.253451338 +0900 +@@ -89,9 +89,3 @@ + sendEvent d w True keyPressMask ev + setEventType ev keyRelease + sendEvent d w True keyReleaseMask ev +- +--- | A null 'KeyMask'. Used when you don't want a character or string shifted, control'd, or what. +--- +--- TODO: This really should be a function in the X11 binding. When noModMask shows up there, remove. +-noModMask :: KeyMask +-noModMask = 0 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