[arch-commits] Commit in haskell-libmpd/repos (3 files)
Felix Yan
felixonmars at archlinux.org
Sun Jun 30 20:14:25 UTC 2019
Date: Sunday, June 30, 2019 @ 20:14:25
Author: felixonmars
Revision: 486691
archrelease: copy trunk to community-staging-x86_64
Added:
haskell-libmpd/repos/community-staging-x86_64/
haskell-libmpd/repos/community-staging-x86_64/PKGBUILD
(from rev 486690, haskell-libmpd/trunk/PKGBUILD)
haskell-libmpd/repos/community-staging-x86_64/ghc-8.6.patch
(from rev 486690, haskell-libmpd/trunk/ghc-8.6.patch)
---------------+
PKGBUILD | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++
ghc-8.6.patch | 36 ++++++++++++++++++++++++++++++++++++
2 files changed, 89 insertions(+)
Copied: haskell-libmpd/repos/community-staging-x86_64/PKGBUILD (from rev 486690, haskell-libmpd/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2019-06-30 20:14:25 UTC (rev 486691)
@@ -0,0 +1,53 @@
+# Maintainer: Levente Polyak <anthraxx[at]archlinux[dot]org>
+# Contributer: Colin Woodbury <colingw at gmail.com>
+# Contributer: Leif Warner <abimelech at gmail.com>
+# Contributor: Cedric Girard <girard.cedric at gmail.com>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+_hkgname=libmpd
+pkgname=haskell-libmpd
+pkgver=0.9.0.8
+pkgrel=66
+pkgdesc='Client library for MPD, the Music Player Daemon'
+url='https://hackage.haskell.org/package/libmpd'
+license=('MIT')
+arch=('x86_64')
+depends=('ghc-libs' 'gmp' 'haskell-attoparsec' 'haskell-bytestring' 'haskell-containers' 'haskell-data-default'
+ 'haskell-filepath' 'haskell-network' 'haskell-time' 'haskell-utf8-string'
+ 'haskell-primitive')
+makedepends=('ghc')
+source=(${pkgname}-${pkgver}.tar.gz::https://github.com/vimus/libmpd-haskell/archive/v${pkgver}.tar.gz
+ ghc-8.6.patch)
+sha512sums=('5cc24fe3a81f59b9a7dff96771e9e5312a5e64e0947e191439447838f00f176fc5dbe086fb8fc774dd4896480eb552640e4f0d93ab947f78bf01c72aa93f6907'
+ '9b3f4a2ff5859f100468d0da0ceb78e0affd4fd48e8c0f221f6435f1fa13bbf815f654909ace0c737fc4a3a1d9208b269b7d9a16e731eb37fc4d61e09feaab9b')
+
+prepare() {
+ cd $_hkgname-haskell-$pkgver
+ patch -p1 -i ../ghc-8.6.patch
+}
+
+build() {
+ cd ${_hkgname}-haskell-${pkgver}
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir=/usr/share/doc/$pkgname \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid
+ runhaskell Setup build
+ runhaskell Setup haddock
+ runhaskell Setup register --gen-script
+ runhaskell Setup unregister --gen-script
+ sed -i -r -e "s|ghc-pkg.*update[^ ]* |&'--force' |" register.sh
+ sed -i -r -e "s|ghc-pkg.*unregister[^ ]* |&'--force' |" unregister.sh
+}
+package() {
+ cd ${_hkgname}-haskell-${pkgver}
+ install -Dm 744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
+ install -Dm 744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
+ install -dm 755 "${pkgdir}/usr/share/doc/ghc/html/libraries"
+ runhaskell Setup copy --destdir="$pkgdir"
+
+ install -Dm 644 LICENSE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm 644 README.md changelog.md -t "${pkgdir}/usr/share/doc/${pkgname}"
+ ln -s /usr/share/doc/${pkgname}/html "${pkgdir}/usr/share/doc/ghc/html/libraries/${_hkgname}"
+}
+
+# vim: ts=2 sw=2 et:
Copied: haskell-libmpd/repos/community-staging-x86_64/ghc-8.6.patch (from rev 486690, haskell-libmpd/trunk/ghc-8.6.patch)
===================================================================
--- community-staging-x86_64/ghc-8.6.patch (rev 0)
+++ community-staging-x86_64/ghc-8.6.patch 2019-06-30 20:14:25 UTC (rev 486691)
@@ -0,0 +1,36 @@
+diff --git a/src/Network/MPD/Commands/Types.hs b/src/Network/MPD/Commands/Types.hs
+index 699821a..b12e68e 100644
+--- a/src/Network/MPD/Commands/Types.hs
++++ b/src/Network/MPD/Commands/Types.hs
+@@ -44,6 +44,7 @@ import Network.MPD.Commands.Arg (MPDArg(prep), Args(Args))
+ import Data.Default.Class
+
+ import qualified Data.Map as M
++import Data.Map.Strict (insertWith)
+ import Data.Time.Clock (UTCTime)
+ import Data.String
+
+@@ -263,7 +264,7 @@ sgGetTag meta s = M.lookup meta $ sgTags s
+
+ -- | Add metadata tag value.
+ sgAddTag :: Metadata -> Value -> Song -> Song
+-sgAddTag meta value s = s { sgTags = M.insertWith' (++) meta [value] (sgTags s) }
++sgAddTag meta value s = s { sgTags = insertWith (++) meta [value] (sgTags s) }
+
+ defaultSong :: Path -> Song
+ defaultSong path =
+diff --git a/src/Network/MPD/Core.hs b/src/Network/MPD/Core.hs
+index 29f7101..e4d4c1d 100644
+--- a/src/Network/MPD/Core.hs
++++ b/src/Network/MPD/Core.hs
+@@ -117,7 +117,8 @@ mpdOpen = MPD $ do
+ (Just <$> connectTo host (PortNumber $ fromInteger port))
+ `catchAny` const (return Nothing)
+ checkConn = do
+- [msg] <- send ""
++ singleMsg <- send ""
++ let [msg] = singleMsg
+ if "OK MPD" `isPrefixOf` msg
+ then MPD $ checkVersion $ parseVersion msg
+ else return False
+
More information about the arch-commits
mailing list