[arch-commits] Commit in hoogle/repos (3 files)
Felix Yan
felixonmars at archlinux.org
Fri May 11 18:22:46 UTC 2018
Date: Friday, May 11, 2018 @ 18:22:45
Author: felixonmars
Revision: 320875
archrelease: copy trunk to community-staging-x86_64
Added:
hoogle/repos/community-staging-x86_64/
hoogle/repos/community-staging-x86_64/PKGBUILD
(from rev 320874, hoogle/trunk/PKGBUILD)
hoogle/repos/community-staging-x86_64/extra-1.6.6.patch
(from rev 320874, hoogle/trunk/extra-1.6.6.patch)
-------------------+
PKGBUILD | 52 ++++++++++++++++++++++++++++++++++++++++++++++++++++
extra-1.6.6.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 94 insertions(+)
Copied: hoogle/repos/community-staging-x86_64/PKGBUILD (from rev 320874, hoogle/trunk/PKGBUILD)
===================================================================
--- community-staging-x86_64/PKGBUILD (rev 0)
+++ community-staging-x86_64/PKGBUILD 2018-05-11 18:22:45 UTC (rev 320875)
@@ -0,0 +1,52 @@
+# $Id$
+# Maintainer: Felix Yan <felixonmars at archlinux.org>
+# Contributor: Arch Haskell Team <arch-haskell at haskell.org>
+
+pkgname=hoogle
+pkgver=5.0.16
+pkgrel=64
+pkgdesc="Haskell API Search"
+url="http://www.haskell.org/hoogle/"
+license=("custom:BSD3")
+arch=('x86_64')
+depends=('ghc-libs' 'haskell-quickcheck' 'haskell-aeson' 'haskell-cmdargs' 'haskell-conduit'
+ 'haskell-conduit-extra' 'haskell-connection' 'haskell-extra' 'haskell-src-exts'
+ 'haskell-http-conduit' 'haskell-http-types' 'haskell-js-flot' 'haskell-js-jquery'
+ 'haskell-mmap' 'haskell-network' 'haskell-network-uri' 'haskell-old-locale'
+ 'haskell-process-extras' 'haskell-resourcet' 'haskell-storable-tuple' 'haskell-tar'
+ 'haskell-text' 'haskell-uniplate' 'haskell-utf8-string' 'haskell-vector' 'haskell-wai'
+ 'haskell-wai-logger' 'haskell-warp' 'haskell-warp-tls' 'haskell-zlib')
+makedepends=('ghc')
+source=("https://hackage.haskell.org/packages/archive/${pkgname}/${pkgver}/${pkgname}-${pkgver}.tar.gz"
+ extra-1.6.6.patch)
+sha512sums=('14b0d6290927234be7e6e6548529fef61d44972a21b9ac22815325214241095b61d60e3b95b6f20a5d40bf9386beff4036942a2c61925c745b767f2525b915c9'
+ 'be1cac2d0833e8fff846af9db097dbef23d97d69531b592fc33873813b0ec7c0c58a268f3b26ec4b079e474b9c0f7782355272d955eda54bf1aee77d294d39b2')
+
+prepare() {
+ cd $pkgname-$pkgver
+ patch -p1 -i ../extra-1.6.6.patch
+}
+
+build() {
+ cd "${srcdir}/${pkgname}-${pkgver}"
+
+ runhaskell Setup configure -O --enable-shared --enable-executable-dynamic --disable-library-vanilla \
+ --prefix=/usr --docdir="/usr/share/doc/${pkgname}" --datasubdir="$pkgname" \
+ --dynlibdir=/usr/lib --libsubdir=\$compiler/site-local/\$pkgid \
+ -fnetwork-uri
+ runhaskell Setup build
+ 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 "${srcdir}/${pkgname}-${pkgver}"
+
+ install -D -m744 register.sh "${pkgdir}/usr/share/haskell/register/${pkgname}.sh"
+ install -D -m744 unregister.sh "${pkgdir}/usr/share/haskell/unregister/${pkgname}.sh"
+ runhaskell Setup copy --destdir="${pkgdir}"
+ install -D -m644 "LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
+ rm -f "${pkgdir}/usr/share/doc/${pkgname}/LICENSE"
+}
Copied: hoogle/repos/community-staging-x86_64/extra-1.6.6.patch (from rev 320874, hoogle/trunk/extra-1.6.6.patch)
===================================================================
--- community-staging-x86_64/extra-1.6.6.patch (rev 0)
+++ community-staging-x86_64/extra-1.6.6.patch 2018-05-11 18:22:45 UTC (rev 320875)
@@ -0,0 +1,42 @@
+From b3ef6ca4f59fb5854e42fe844c9593f6832ebd25 Mon Sep 17 00:00:00 2001
+From: Neil Mitchell <ndmitchell at gmail.com>
+Date: Fri, 13 Apr 2018 19:06:26 +0100
+Subject: [PATCH] Require extra-1.6.6, so I can use escape/unescape HTML
+
+---
+ CHANGES.txt | 1 +
+ hoogle.cabal | 2 +-
+ src/General/Util.hs | 20 --------------------
+ 3 files changed, 2 insertions(+), 21 deletions(-)
+
+diff --git a/src/General/Util.hs b/src/General/Util.hs
+index 2f51c644..abfe89ec 100755
+--- a/src/General/Util.hs
++++ b/src/General/Util.hs
+@@ -200,26 +200,6 @@ tarballReadFiles file = f . Tar.read . GZip.decompress <$> LBS.readFile file
+ f (Fail e) = error $ "tarballReadFiles on " ++ file ++ ", " ++ show e
+
+
+--- | Take a piece of text and escape all the HTML special bits
+-escapeHTML :: String -> String
+-escapeHTML = concatMap f
+- where
+- f '<' = "<"
+- f '>' = ">"
+- f '&' = "&"
+- f '\"' = """
+- f x = [x]
+-
+--- | Only guarantees to be the inverse of escapeHTML
+-unescapeHTML :: String -> String
+-unescapeHTML ('&':xs)
+- | Just xs <- stripPrefix "lt;" xs = '<' : unescapeHTML xs
+- | Just xs <- stripPrefix "gt;" xs = '>' : unescapeHTML xs
+- | Just xs <- stripPrefix "amp;" xs = '&' : unescapeHTML xs
+- | Just xs <- stripPrefix "quot;" xs = '\"' : unescapeHTML xs
+-unescapeHTML (x:xs) = x : unescapeHTML xs
+-unescapeHTML [] = []
+-
+ innerTextHTML :: String -> String
+ innerTextHTML ('<':xs) = innerTextHTML $ drop 1 $ dropWhile (/= '>') xs
+ innerTextHTML (x:xs) = x : innerTextHTML xs
More information about the arch-commits
mailing list