Update to xmobar-0.14.
Fix comment into files/Batt.hs.
Adjust WANTLIB.
Add curl to runtime dependencies, since it's used by the weather
plugin:
$ grep -r curl *
README:- Requires `curl` in the `$PATH` to retrieve weather information from
src/Plugins/Monitors/Weather.hs: do (i,o,e,p) <- runInteractiveCommand
("curl " ++ defUrl ++ url ++ ".TXT")
Tested on amd64. Ok?
Index: Makefile
===================================================================
RCS file: /cvs/ports/x11/xmobar/Makefile,v
retrieving revision 1.11
diff -u -p -r1.11 Makefile
--- Makefile 30 Jun 2011 21:37:53 -0000 1.11
+++ Makefile 11 Jan 2012 07:59:00 -0000
@@ -2,8 +2,7 @@
COMMENT = minimalistic text based status bar
-DISTNAME = xmobar-0.13
-REVISION = 0
+DISTNAME = xmobar-0.14
CATEGORIES = x11
HOMEPAGE = http://projects.haskell.org/xmobar
@@ -16,7 +15,7 @@ PERMIT_DISTFILES_CDROM =Yes
PERMIT_DISTFILES_FTP = Yes
WANTLIB = c expat fontconfig freetype gmp m pthread pthread-stubs util \
- X11 Xau xcb Xdmcp Xext Xft Xinerama Xrender z
+ X11 Xau xcb Xdmcp Xext Xft Xinerama Xrandr Xrender z
MODULES = lang/ghc converters/libiconv
@@ -32,6 +31,7 @@ BUILD_DEPENDS = devel/hs-mtl \
x11/hs-X11-xft>=0.2 \
audio/hs-libmpd>=0.5
+RUN_DEPENDS = net/curl
EXAMPLEDIR = ${PREFIX}/share/examples/xmobar
Index: distinfo
===================================================================
RCS file: /cvs/ports/x11/xmobar/distinfo,v
retrieving revision 1.4
diff -u -p -r1.4 distinfo
--- distinfo 13 Jun 2011 21:23:04 -0000 1.4
+++ distinfo 11 Jan 2012 07:59:00 -0000
@@ -1,5 +1,5 @@
-MD5 (ghc/xmobar-0.13.tar.gz) = 95RiNsBoseeUTxa3wHMoVw==
-RMD160 (ghc/xmobar-0.13.tar.gz) = yK9pIR1l8LHvZv8lb523G32ABe4=
-SHA1 (ghc/xmobar-0.13.tar.gz) = oekxIxmjeLLWD8k4jT6BWOh7g18=
-SHA256 (ghc/xmobar-0.13.tar.gz) = x8FRwSSR4jAxCnriJ5bP4/edhzHdxFO2YbUJu4HaSkY=
-SIZE (ghc/xmobar-0.13.tar.gz) = 55874
+MD5 (ghc/xmobar-0.14.tar.gz) = uWXi2wVVx0HblpRSEJlXdw==
+RMD160 (ghc/xmobar-0.14.tar.gz) = z2mHDfVnyxRI4tOgxjv1yxn1zx8=
+SHA1 (ghc/xmobar-0.14.tar.gz) = 6kBkEYSiMBHSndE0b6kcu7VXD3I=
+SHA256 (ghc/xmobar-0.14.tar.gz) = cMObC9mKlfs2KngwXMmxDU+cJKpkMVl/2B2mXZRYRvg=
+SIZE (ghc/xmobar-0.14.tar.gz) = 64977
Index: files/Batt.hs
===================================================================
RCS file: /cvs/ports/x11/xmobar/files/Batt.hs,v
retrieving revision 1.1
diff -u -p -r1.1 Batt.hs
--- files/Batt.hs 17 Jul 2010 14:55:21 -0000 1.1
+++ files/Batt.hs 11 Jan 2012 07:59:00 -0000
@@ -8,7 +8,7 @@ import Plugins.Monitors.Batt.Binding
battConfig :: IO MConfig
battConfig = mkMConfig
"Batt: <left>" -- default template
- ["left", "leftbar", "minleft", "status"] -- progress bar, percent left,
minutes left, status
+ ["left", "leftbar", "minleft", "status"] -- percent left, progress bar,
minutes left, status
runBatt :: [String] -> Monitor String
runBatt _ = do
Index: patches/patch-src_Plugins_Monitors_MPD_hs
===================================================================
RCS file: patches/patch-src_Plugins_Monitors_MPD_hs
diff -N patches/patch-src_Plugins_Monitors_MPD_hs
--- patches/patch-src_Plugins_Monitors_MPD_hs 13 Jun 2011 21:23:04 -0000
1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,12 +0,0 @@
-$OpenBSD: patch-src_Plugins_Monitors_MPD_hs,v 1.1 2011/06/13 21:23:04 kili Exp
$
---- src/Plugins/Monitors/MPD.hs.orig Mon May 2 20:48:52 2011
-+++ src/Plugins/Monitors/MPD.hs Mon May 2 20:49:06 2011
-@@ -91,7 +91,7 @@ parseSong (Right Nothing) = return $ repeat ""
- parseSong (Right (Just s)) =
- let join [] = ""
- join (x:xs) = foldl (\a o -> a ++ ", " ++ o) x xs
-- str sel = maybe "" join (M.sgGet sel s)
-+ str sel = maybe "" join (M.sgGetTag sel s)
- sels = [ M.Name, M.Artist, M.Composer, M.Performer
- , M.Album, M.Title, M.Track, M.Genre ]
- fields = M.sgFilePath s : map str sels
Index: patches/patch-src_Plugins_Monitors_hs
===================================================================
RCS file: /cvs/ports/x11/xmobar/patches/patch-src_Plugins_Monitors_hs,v
retrieving revision 1.1
diff -u -p -r1.1 patch-src_Plugins_Monitors_hs
--- patches/patch-src_Plugins_Monitors_hs 13 Jun 2011 21:23:04 -0000
1.1
+++ patches/patch-src_Plugins_Monitors_hs 11 Jan 2012 07:59:00 -0000
@@ -1,7 +1,7 @@
$OpenBSD: patch-src_Plugins_Monitors_hs,v 1.1 2011/06/13 21:23:04 kili Exp $
---- src/Plugins/Monitors.hs.orig Mon May 2 19:50:32 2011
-+++ src/Plugins/Monitors.hs Mon May 2 19:55:06 2011
-@@ -21,19 +21,19 @@ import Plugins
+--- src/Plugins/Monitors.hs.orig Tue Jan 10 20:31:19 2012
++++ src/Plugins/Monitors.hs Tue Jan 10 22:01:23 2012
+@@ -21,20 +21,20 @@ import Plugins
import Plugins.Monitors.Common ( runM )
import Plugins.Monitors.Weather
@@ -16,6 +16,7 @@ $OpenBSD: patch-src_Plugins_Monitors_hs,
+--import Plugins.Monitors.Cpu
+--import Plugins.Monitors.MultiCpu
import Plugins.Monitors.Batt
+-import Plugins.Monitors.Bright
-import Plugins.Monitors.Thermal
-import Plugins.Monitors.ThermalZone
-import Plugins.Monitors.CpuFreq
@@ -23,6 +24,7 @@ $OpenBSD: patch-src_Plugins_Monitors_hs,
-import Plugins.Monitors.Disk
-import Plugins.Monitors.Top
-import Plugins.Monitors.Uptime
++--import Plugins.Monitors.Bright
+--import Plugins.Monitors.Thermal
+--import Plugins.Monitors.ThermalZone
+--import Plugins.Monitors.CpuFreq
@@ -33,7 +35,7 @@ $OpenBSD: patch-src_Plugins_Monitors_hs,
#ifdef IWLIB
import Plugins.Monitors.Wireless
#endif
-@@ -45,22 +45,22 @@ import Plugins.Monitors.Volume
+@@ -46,23 +46,23 @@ import Plugins.Monitors.Volume
#endif
data Monitors = Weather Station Args Rate
@@ -58,11 +60,13 @@ $OpenBSD: patch-src_Plugins_Monitors_hs,
+-- | Cpu Args Rate
+-- | MultiCpu Args Rate
| Battery Args Rate
+- | Brightness Args Rate
- | CpuFreq Args Rate
- | CoreTemp Args Rate
- | TopProc Args Rate
- | TopMem Args Rate
- | Uptime Args Rate
++-- | Brightness Args Rate
+-- | CpuFreq Args Rate
+-- | CoreTemp Args Rate
+-- | TopProc Args Rate
@@ -71,7 +75,7 @@ $OpenBSD: patch-src_Plugins_Monitors_hs,
#ifdef IWLIB
| Wireless Interface Args Rate
#endif
-@@ -84,22 +84,22 @@ type DiskSpec = [(String, String)]
+@@ -86,23 +86,23 @@ type DiskSpec = [(String, String)]
instance Exec Monitors where
alias (Weather s _ _) = s
@@ -91,6 +95,7 @@ $OpenBSD: patch-src_Plugins_Monitors_hs,
+-- alias (MultiCpu _ _) = "multicpu"
alias (Battery _ _) = "battery"
- alias (BatteryP _ _ _)= "battery"
+- alias (Brightness _ _) = "bright"
- alias (CpuFreq _ _) = "cpufreq"
- alias (TopProc _ _) = "top"
- alias (TopMem _ _) = "topmem"
@@ -99,6 +104,7 @@ $OpenBSD: patch-src_Plugins_Monitors_hs,
- alias (DiskIO _ _ _) = "diskio"
- alias (Uptime _ _) = "uptime"
+-- alias (BatteryP _ _ _)= "battery"
++-- alias (Brightness _ _) = "bright"
+-- alias (CpuFreq _ _) = "cpufreq"
+-- alias (TopProc _ _) = "top"
+-- alias (TopMem _ _) = "topmem"
@@ -109,7 +115,7 @@ $OpenBSD: patch-src_Plugins_Monitors_hs,
#ifdef IWLIB
alias (Wireless i _ _) = i ++ "wi"
#endif
-@@ -109,24 +109,24 @@ instance Exec Monitors where
+@@ -112,25 +112,25 @@ instance Exec Monitors where
#ifdef ALSA
alias (Volume m c _ _) = m ++ ":" ++ c
#endif
@@ -136,12 +142,14 @@ $OpenBSD: patch-src_Plugins_Monitors_hs,
+-- start (Swap a r) = runM a swapConfig runSwap r
start (Battery a r) = runM a battConfig runBatt r
- start (BatteryP s a r) = runM a battConfig (runBatt' s) r
+- start (Brightness a r) = runM a brightConfig runBright r
- start (CpuFreq a r) = runM a cpuFreqConfig runCpuFreq r
- start (CoreTemp a r) = runM a coreTempConfig runCoreTemp r
- start (DiskU s a r) = runM a diskUConfig (runDiskU s) r
- start (DiskIO s a r) = startDiskIO s a r
- start (Uptime a r) = runM a uptimeConfig runUptime r
+-- start (BatteryP s a r) = runM a battConfig (runBatt' s) r
++-- start (Brightness a r) = runM a brightConfig runBright r
+-- start (CpuFreq a r) = runM a cpuFreqConfig runCpuFreq r
+-- start (CoreTemp a r) = runM a coreTempConfig runCoreTemp r
+-- start (DiskU s a r) = runM a diskUConfig (runDiskU s) r
Index: patches/patch-src_StatFS_hsc
===================================================================
RCS file: patches/patch-src_StatFS_hsc
diff -N patches/patch-src_StatFS_hsc
--- patches/patch-src_StatFS_hsc 13 Jun 2011 21:23:04 -0000 1.1
+++ /dev/null 1 Jan 1970 00:00:00 -0000
@@ -1,25 +0,0 @@
-$OpenBSD: patch-src_StatFS_hsc,v 1.1 2011/06/13 21:23:04 kili Exp $
---- src/StatFS.hsc.orig Sun Mar 27 19:16:24 2011
-+++ src/StatFS.hsc Mon May 2 20:32:56 2011
-@@ -23,8 +23,11 @@ import Foreign.C.String
- import Data.ByteString (useAsCString)
- import Data.ByteString.Char8 (pack)
-
--#if defined (__FreeBSD__) || defined (__APPLE__)
-+#if (defined(__unix__) || defined(unix)) && !defined(USG)
- # include <sys/param.h>
-+#endif
-+
-+#if defined(BSD4_4)
- # include <sys/mount.h>
- #else
- # include <sys/vfs.h>
-@@ -47,7 +50,7 @@ data FileSystemStats = FileSystemStats {
-
- data CStatfs
-
--#if defined (__FreeBSD__) || defined (__APPLE__)
-+#if defined(BSD4_4)
- foreign import ccall unsafe "sys/mount.h statfs"
- #else
- foreign import ccall unsafe "sys/vfs.h statfs64"
Index: patches/patch-xmobar_cabal
===================================================================
RCS file: /cvs/ports/x11/xmobar/patches/patch-xmobar_cabal,v
retrieving revision 1.2
diff -u -p -r1.2 patch-xmobar_cabal
--- patches/patch-xmobar_cabal 13 Jun 2011 21:23:04 -0000 1.2
+++ patches/patch-xmobar_cabal 11 Jan 2012 07:59:00 -0000
@@ -1,16 +1,15 @@
$OpenBSD: patch-xmobar_cabal,v 1.2 2011/06/13 21:23:04 kili Exp $
---- xmobar.cabal.orig Mon Mar 28 01:16:24 2011
-+++ xmobar.cabal Sat Jun 11 22:56:38 2011
-@@ -71,9 +71,11 @@ executable xmobar
- Plugins.Monitors.MultiCpu, Plugins.Monitors.Net,
+--- xmobar.cabal.orig Tue Jan 10 22:20:48 2012
++++ xmobar.cabal Tue Jan 10 22:21:50 2012
+@@ -77,9 +77,10 @@ executable xmobar
Plugins.Monitors.Swap, Plugins.Monitors.Thermal,
Plugins.Monitors.ThermalZone, Plugins.Monitors.Top,
-- Plugins.Monitors.Uptime, Plugins.Monitors.Weather
-+ Plugins.Monitors.Uptime, Plugins.Monitors.Weather,
-+ Plugins.Monitors.Batt.Binding
+ Plugins.Monitors.Uptime, Plugins.Monitors.Weather,
+- Plugins.Monitors.Bright
++ Plugins.Monitors.Bright, Plugins.Monitors.Batt.Binding
ghc-prof-options: -prof -auto-all
+ c-sources: src/Plugins/Monitors/Batt/apm.c
if true
- ghc-options: -funbox-strict-fields -Wall
+ ghc-options: -funbox-strict-fields -Wall -threaded