aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpgj <pgj@FreeBSD.org>2015-02-16 05:46:06 +0800
committerpgj <pgj@FreeBSD.org>2015-02-16 05:46:06 +0800
commit20788446362dda798baaa7795355e683ad262f44 (patch)
treeb9ea4579145d0dec9904b2d3eea98cd13415f74c
parent88fa02773f7159cc3921a909da6c7ff565781610 (diff)
downloadfreebsd-ports-gnome-20788446362dda798baaa7795355e683ad262f44.tar.gz
freebsd-ports-gnome-20788446362dda798baaa7795355e683ad262f44.tar.zst
freebsd-ports-gnome-20788446362dda798baaa7795355e683ad262f44.zip
- Add a (default) xmonad workaround for losing hotkeys in certain cases.
For the details, please see the related bug report or issue #576 in the xmonad bug tracker [1]. [1] https://code.google.com/p/xmonad/issues/detail?id=576 PR: 181049 Submitted by: Dominik Ernst <de@dernst.org> Obtained from: FreeBSD Haskell MFH: 2015Q1
-rw-r--r--x11-wm/hs-xmonad-contrib/Makefile2
-rw-r--r--x11-wm/hs-xmonad/Makefile12
-rw-r--r--x11-wm/hs-xmonad/files/nopatch-XMonad_Core.hs20
3 files changed, 32 insertions, 2 deletions
diff --git a/x11-wm/hs-xmonad-contrib/Makefile b/x11-wm/hs-xmonad-contrib/Makefile
index 426ec83b37a7..f00b9c56aa27 100644
--- a/x11-wm/hs-xmonad-contrib/Makefile
+++ b/x11-wm/hs-xmonad-contrib/Makefile
@@ -3,7 +3,7 @@
PORTNAME= xmonad-contrib
PORTVERSION= 0.11.3
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= x11-wm haskell
MAINTAINER= haskell@FreeBSD.org
diff --git a/x11-wm/hs-xmonad/Makefile b/x11-wm/hs-xmonad/Makefile
index e14b47a0ba40..b50229ea4b39 100644
--- a/x11-wm/hs-xmonad/Makefile
+++ b/x11-wm/hs-xmonad/Makefile
@@ -3,7 +3,7 @@
PORTNAME= xmonad
PORTVERSION= 0.11
-PORTREVISION= 9
+PORTREVISION= 10
CATEGORIES= x11-wm haskell
MAINTAINER= haskell@FreeBSD.org
@@ -19,5 +19,15 @@ MAN1SRC= man
EXECUTABLE= xmonad
+OPTIONS_DEFINE+= XFORK_FIX
+OPTIONS_DEFAULT+= XFORK_FIX
+
+XFORK_FIX_DESC= Apply workaround for losing hotkeys (XMonad \#576)
+
.include "${.CURDIR}/../../lang/ghc/bsd.cabal.mk"
+
+.if ${PORT_OPTIONS:MXFORK_FIX}
+EXTRA_PATCHES+= ${PATCHDIR}/nopatch-XMonad_Core.hs
+.endif
+
.include <bsd.port.mk>
diff --git a/x11-wm/hs-xmonad/files/nopatch-XMonad_Core.hs b/x11-wm/hs-xmonad/files/nopatch-XMonad_Core.hs
new file mode 100644
index 000000000000..f913dacd3cde
--- /dev/null
+++ b/x11-wm/hs-xmonad/files/nopatch-XMonad_Core.hs
@@ -0,0 +1,20 @@
+--- XMonad/Core.hs.orig 2013-01-01 01:31:47 UTC
++++ XMonad/Core.hs
+@@ -400,10 +400,13 @@ spawnPID x = xfork $ executeFile "/bin/s
+
+ -- | A replacement for 'forkProcess' which resets default signal handlers.
+ xfork :: MonadIO m => IO () -> m ProcessID
+-xfork x = io . forkProcess . finally nullStdin $ do
+- uninstallSignalHandlers
+- createSession
+- x
++xfork x = do
++ pid <- liftIO $ forkProcess $ finally nullStdin $ do
++ forkProcess $ do
++ uninstallSignalHandlers
++ createSession
++ x
++ return pid
+ where
+ nullStdin = do
+ fd <- openFd "/dev/null" ReadOnly Nothing defaultFileFlags