Update to xmonad-0.5. I hacked it a little bit to make it still build and work with ghc-6.6.1 and without the need of updating Cabal and the X11 bindings included within ghc.
This also introduces a subpackage xmonad-lib that, when installed, allows for configuring xmonad via ~/.xmonad/xmonad.hs. This means that you can drop your own "config" file there (or use the sample provided with the package), tweak it, hit mod-q and get a nearly immediate restart of the (reconfigured) xmonad. The drawback: this depends on the complete ghc and hs-x11-extras packages installed. Please test (especially on amd64) and comment. Ciao, Kili Index: Makefile =================================================================== RCS file: /cvs/ports/x11/xmonad/Makefile,v retrieving revision 1.5 diff -u -p -r1.5 Makefile --- Makefile 19 Nov 2007 19:59:40 -0000 1.5 +++ Makefile 6 Jan 2008 20:39:46 -0000 @@ -1,15 +1,19 @@ # $OpenBSD: Makefile,v 1.5 2007/11/19 19:59:40 kili Exp $ -COMMENT= tiling window manager +COMMENT-main= tiling window manager +COMMENT-lib= libraries for runtime configuration -V= 0.4 +V= 0.5 DISTNAME= xmonad-$V -PKGNAME= ${DISTNAME}p0 +PKGNAME-main= xmonad-$V +PKGNAME-lib= xmonad-lib-$V CATEGORIES= x11 HOMEPAGE= http://www.xmonad.org/ MAINTAINER= Matthias Kilian <[EMAIL PROTECTED]> +MULTI_PACKAGES= -main -lib + # BSD PERMIT_PACKAGE_CDROM= Yes PERMIT_PACKAGE_FTP= Yes @@ -18,12 +22,18 @@ PERMIT_DISTFILES_FTP= Yes MASTER_SITES= http://hackage.haskell.org/packages/archive/xmonad/$V/ -WANTLIB= X11 Xext Xinerama c m +WANTLIB-main= X11 Xext Xinerama c m MODULES= lang/ghc -MODGHC_RUNTIME= No + +.if defined (SUBPACKAGE) && ${SUBPACKAGE:M-main} +MODGHC_RUNTIME= No +.endif + BUILD_DEPENDS= :hs-x11-extras->=0.4:x11/hs-x11-extras LIB_DEPENDS= gmp::devel/gmp +LIB_DEPENDS-lib= +RUN_DEPENDS-lib= :hs-x11-extras->=0.4:x11/hs-x11-extras SETUP_CONF_ARGS= configure -g --prefix=${PREFIX} SETUP_CONF_ENV= HOME=${PORTHOME} PATH=${PATH} @@ -38,14 +48,28 @@ do-configure: ${SETUP_PROG} ${SETUP_CONF_ARGS} do-build: - @cd ${WRKBUILD} && exec ${SETENV} ${SETUP_CONF_ENV} \ + @cd ${WRKBUILD} && exec ${SETENV} ${MAKE_ENV} \ ${SETUP_PROG} build + @cd ${WRKBUILD} && exec ${SETENV} ${MAKE_ENV} \ + ${SETUP_PROG} register --gen-script + @cd ${WRKBUILD} && exec ${SETENV} ${MAKE_ENV} \ + ${SETUP_PROG} unregister --gen-script + perl -pi -e 's!/share/${DISTNAME}/doc/html!/share/doc/${DISTNAME}!' \ + ${WRKBUILD}/register.sh do-install: @cd ${WRKBUILD} && exec ${SETENV} ${SETUP_CONF_ENV} \ ${SETUP_PROG} copy --destdir=${DESTDIR} @${INSTALL_MAN_DIR} ${PREFIX}/man/man1 @${INSTALL_MAN} ${WRKSRC}/man/xmonad.1 ${PREFIX}/man/man1 + @${INSTALL_DATA_DIR} ${PREFIX}/share/doc/xmonad + @${INSTALL_DATA} ${WRKSRC}/CONFIG ${PREFIX}/share/doc/xmonad + @${INSTALL_DATA} ${WRKSRC}/man/xmonad.hs ${PREFIX}/share/doc/xmonad + +post-install: +.for f in register.sh unregister.sh + ${INSTALL_SCRIPT} ${WRKBUILD}/$f ${PREFIX}/lib/${DISTNAME} +.endfor do-regress: @cd ${WRKBUILD} && exec ${SETENV} ${SETUP_CONF_ENV} \ Index: distinfo =================================================================== RCS file: /cvs/ports/x11/xmonad/distinfo,v retrieving revision 1.4 diff -u -p -r1.4 distinfo --- distinfo 18 Nov 2007 20:13:31 -0000 1.4 +++ distinfo 6 Jan 2008 20:39:46 -0000 @@ -1,5 +1,5 @@ -MD5 (xmonad-0.4.tar.gz) = XSTFVvfI8ElUchs5H9eaEw== -RMD160 (xmonad-0.4.tar.gz) = Jm5iQcZlFrRKk6SNRw6bdglgByo= -SHA1 (xmonad-0.4.tar.gz) = NNQXcyDSosEmPGla5/s3HCzf8UY= -SHA256 (xmonad-0.4.tar.gz) = l4+5nkB4YHAweZL954/iUrlug0dA+5g7lMOjlcRUZ7s= -SIZE (xmonad-0.4.tar.gz) = 41025 +MD5 (xmonad-0.5.tar.gz) = sjlRydG6A8ZWn9Hlc/FVCQ== +RMD160 (xmonad-0.5.tar.gz) = jjnYoq2OjRYAa9zR9kXWoxvnIfg= +SHA1 (xmonad-0.5.tar.gz) = rOqDGm2kha2ZbIvaemfxrL1w0/o= +SHA256 (xmonad-0.5.tar.gz) = z8xFAbAA+nQO01pb6H3AEhbgNiGVUWMNz3HZw89X5MQ= +SIZE (xmonad-0.5.tar.gz) = 48853 Index: patches/patch-Config_hs =================================================================== RCS file: patches/patch-Config_hs diff -N patches/patch-Config_hs --- patches/patch-Config_hs 18 Nov 2007 20:13:31 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,11 +0,0 @@ ---- Config.hs.orig Wed Oct 17 01:53:12 2007 -+++ Config.hs Sun Oct 28 18:21:41 2007 -@@ -90,7 +90,7 @@ focusedBorderColor = "#ff0000" - -- Fields are: top, bottom, left, right. - -- - defaultGaps :: [(Int,Int,Int,Int)] --defaultGaps = [(0,0,0,0)] -- 15 for default dzen font -+defaultGaps = repeat (15,0,0,0) -- 15 for default dzen font - - ------------------------------------------------------------------------ - -- Window rules Index: patches/patch-Main_hs =================================================================== RCS file: patches/patch-Main_hs diff -N patches/patch-Main_hs --- patches/patch-Main_hs 18 Nov 2007 20:13:31 -0000 1.3 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,12 +0,0 @@ -$OpenBSD: patch-Main_hs,v 1.3 2007/11/18 20:13:31 kili Exp $ ---- Main.hs.orig Wed Oct 17 01:53:12 2007 -+++ Main.hs Sun Oct 28 18:22:13 2007 -@@ -62,7 +62,7 @@ main = do - return . W.ensureTags layoutHook workspaces - $ W.mapLayout (fromMaybe layoutHook . maybeRead) ws - -- gaps = take (length xinesc) $ defaultGaps ++ repeat (0,0,0,0) -+ gaps = take (length xinesc) $ repeat (0,0,0,0) - - cf = XConf - { display = dpy Index: patches/patch-XMonad_Operations_hs =================================================================== RCS file: patches/patch-XMonad_Operations_hs diff -N patches/patch-XMonad_Operations_hs --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-XMonad_Operations_hs 6 Jan 2008 20:39:46 -0000 @@ -0,0 +1,42 @@ +$OpenBSD$ + +Backport for ghc-6.6 and X11-extras. + +--- XMonad/Operations.hs.orig Mon Dec 10 00:25:43 2007 ++++ XMonad/Operations.hs Sat Jan 5 09:24:33 2008 +@@ -76,7 +76,7 @@ manage w = whenX (not <$> isClient w) $ withDisplay $ + unmanage :: Window -> X () + unmanage w = do + windows (W.delete w) +- setWMState w withdrawnState ++ setWMState w 0 + modify (\s -> s {mapped = S.delete w (mapped s), waitingUnmap = M.delete w (waitingUnmap s)}) + + -- | Modify the size of the status gap at the top of the current screen +@@ -185,7 +185,7 @@ hide w = whenX (gets (S.member w . mapped)) $ withDisp + io $ do selectInput d w (clientMask .&. complement structureNotifyMask) + unmapWindow d w + selectInput d w clientMask +- setWMState w iconicState ++ setWMState w 3 + -- this part is key: we increment the waitingUnmap counter to distinguish + -- between client and xmonad initiated unmaps. + modify (\s -> s { waitingUnmap = M.insertWith (+) w 1 (waitingUnmap s) +@@ -195,7 +195,7 @@ hide w = whenX (gets (S.member w . mapped)) $ withDisp + -- this is harmless if the window was already visible + reveal :: Window -> X () + reveal w = withDisplay $ \d -> do +- setWMState w normalState ++ setWMState w 1 + io $ mapWindow d w + modify (\s -> s { mapped = S.insert w (mapped s) }) + +@@ -206,7 +206,7 @@ clientMask = structureNotifyMask .|. enterWindowMask . + -- | Set some properties when we initially gain control of a window + setInitialProperties :: Window -> X () + setInitialProperties w = asks normalBorder >>= \nb -> withDisplay $ \d -> do +- setWMState w iconicState ++ setWMState w 3 + io $ selectInput d w $ clientMask + bw <- asks (borderWidth . config) + io $ setWindowBorderWidth d w bw Index: patches/patch-xmonad_cabal =================================================================== RCS file: patches/patch-xmonad_cabal diff -N patches/patch-xmonad_cabal --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ patches/patch-xmonad_cabal 6 Jan 2008 20:39:46 -0000 @@ -0,0 +1,51 @@ +$OpenBSD$ +--- xmonad.cabal.orig Mon Dec 10 00:25:43 2007 ++++ xmonad.cabal Sat Jan 5 09:26:31 2008 +@@ -20,36 +20,15 @@ maintainer: [EMAIL PROTECTED] + extra-source-files: README TODO CONFIG STYLE tests/loc.hs tests/Properties.hs + man/xmonad.1.in man/xmonad.1 man/xmonad.html man/xmonad.hs + util/GenerateManpage.hs +-cabal-version: >= 1.2 ++build-depends: base < 3, X11>=1.2.1, X11-extras>=0.4, mtl, unix ++exposed-modules: XMonad, XMonad.Main, XMonad.Core, XMonad.Config, XMonad.Layout, XMonad.ManageHook, XMonad.Operations, XMonad.StackSet ++ghc-options: -funbox-strict-fields -Wall -Werror -optl-Wl,-s ++ghc-prof-options: -prof -auto-all ++extensions: CPP + +-flag small_base +- description: Choose the new smaller, split-up base package. +- +-library +- exposed-modules: XMonad +- XMonad.Main +- XMonad.Core +- XMonad.Config +- XMonad.Layout +- XMonad.ManageHook +- XMonad.Operations +- XMonad.StackSet +- +- if flag(small_base) +- build-depends: base >= 3, containers, directory, process +- else +- build-depends: base < 3 +- build-depends: X11>=1.4.0, mtl, unix +- +- ghc-options: -funbox-strict-fields -Wall -Werror -optl-Wl,-s +- ghc-prof-options: -prof -auto-all +- extensions: CPP +- +-executable xmonad +- main-is: Main.hs +- other-modules: XMonad.Core XMonad.Main XMonad.Layout +- XMonad.Operations XMonad.StackSet XMonad +- +- ghc-options: -funbox-strict-fields -Wall -Werror -optl-Wl,-s +- ghc-prof-options: -prof -auto-all +- extensions: CPP ++executable: xmonad ++main-is: Main.hs ++other-modules: XMonad.Core XMonad.Main XMonad.Layout XMonad.Operations XMonad.StackSet XMonad ++ghc-options: -funbox-strict-fields -Wall -Werror -optl-Wl,-s ++ghc-prof-options: -prof -auto-all ++extensions: CPP Index: pkg/DESCR =================================================================== RCS file: pkg/DESCR diff -N pkg/DESCR --- pkg/DESCR 18 Nov 2007 20:13:31 -0000 1.2 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,9 +0,0 @@ -xmonad is a tiling window manager for X. Windows are arranged -automatically to tile the screen without gaps or overlap, maximising -screen use. All features of the window manager are accessible from -the keyboard: a mouse is strictly optional. xmonad is written and -extensible in Haskell. Custom layout algorithms, and other extensions, -may be written by the user in config files. Layouts are applied -dynamically, and different layouts may be used on each workspace. -Xinerama is fully supported, allowing windows to be tiled on several -screens. Index: pkg/DESCR-lib =================================================================== RCS file: pkg/DESCR-lib diff -N pkg/DESCR-lib --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/DESCR-lib 6 Jan 2008 20:39:46 -0000 @@ -0,0 +1,2 @@ +The xmonad libraries are required for runtime configuration of +xmonad. Index: pkg/DESCR-main =================================================================== RCS file: pkg/DESCR-main diff -N pkg/DESCR-main --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/DESCR-main 6 Jan 2008 20:39:46 -0000 @@ -0,0 +1,14 @@ +xmonad is a tiling window manager for X. Windows are arranged +automatically to tile the screen without gaps or overlap, maximising +screen use. All features of the window manager are accessible from +the keyboard: a mouse is strictly optional. xmonad is written and +extensible in Haskell. Custom layout algorithms, and other extensions, +may be written by the user in config files. Layouts are applied +dynamically, and different layouts may be used on each workspace. +Xinerama is fully supported, allowing windows to be tiled on several +screens. + +Important note: if you want to configure xmonad without patching +the default config file and rebuilding the package, you should also +install the xmonad-lib package, which makes runtime configuration +possible. Index: pkg/PLIST =================================================================== RCS file: pkg/PLIST diff -N pkg/PLIST --- pkg/PLIST 1 Sep 2007 22:18:41 -0000 1.1.1.1 +++ /dev/null 1 Jan 1970 00:00:00 -0000 @@ -1,3 +0,0 @@ [EMAIL PROTECTED] $OpenBSD: PLIST,v 1.1.1.1 2007/09/01 22:18:41 kili Exp $ -bin/xmonad [EMAIL PROTECTED] man/man1/xmonad.1 Index: pkg/PLIST-lib =================================================================== RCS file: pkg/PLIST-lib diff -N pkg/PLIST-lib --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/PLIST-lib 6 Jan 2008 20:39:46 -0000 @@ -0,0 +1,22 @@ [EMAIL PROTECTED] $OpenBSD$ +lib/xmonad-${V}/ +lib/xmonad-${V}/ghc-6.6.1/ +lib/xmonad-${V}/ghc-6.6.1/HSxmonad-${V}.o +lib/xmonad-${V}/ghc-6.6.1/XMonad/ +lib/xmonad-${V}/ghc-6.6.1/XMonad.hi +lib/xmonad-${V}/ghc-6.6.1/XMonad/Config.hi +lib/xmonad-${V}/ghc-6.6.1/XMonad/Core.hi +lib/xmonad-${V}/ghc-6.6.1/XMonad/Layout.hi +lib/xmonad-${V}/ghc-6.6.1/XMonad/Main.hi +lib/xmonad-${V}/ghc-6.6.1/XMonad/ManageHook.hi +lib/xmonad-${V}/ghc-6.6.1/XMonad/Operations.hi +lib/xmonad-${V}/ghc-6.6.1/XMonad/StackSet.hi +lib/xmonad-${V}/ghc-6.6.1/include/ +lib/xmonad-${V}/ghc-6.6.1/libHSxmonad-${V}.a +lib/xmonad-${V}/register.sh [EMAIL PROTECTED] /usr/bin/env HOME=/nonexistent %D/lib/xmonad-${V}/register.sh [EMAIL PROTECTED] /usr/bin/env HOME=/nonexistent %D/lib/xmonad-${V}/unregister.sh +lib/xmonad-${V}/unregister.sh +share/doc/xmonad/ +share/doc/xmonad/CONFIG +share/doc/xmonad/xmonad.hs Index: pkg/PLIST-main =================================================================== RCS file: pkg/PLIST-main diff -N pkg/PLIST-main --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ pkg/PLIST-main 6 Jan 2008 20:39:46 -0000 @@ -0,0 +1,4 @@ [EMAIL PROTECTED] $OpenBSD$ [EMAIL PROTECTED] x11/xmonad +bin/xmonad [EMAIL PROTECTED] man/man1/xmonad.1