[arch-commits] Commit in hoogle/trunk (PKGBUILD extra-1.6.6.patch)
Felix Yan
felixonmars at archlinux.org
Fri Apr 27 04:59:07 UTC 2018
Date: Friday, April 27, 2018 @ 04:59:06
Author: felixonmars
Revision: 318228
upgpkg: hoogle 5.0.16-60
rebuild with extra,1.6.6 hlint,2.1.3
Added:
hoogle/trunk/extra-1.6.6.patch
Modified:
hoogle/trunk/PKGBUILD
-------------------+
PKGBUILD | 13 ++++++++++---
extra-1.6.6.patch | 42 ++++++++++++++++++++++++++++++++++++++++++
2 files changed, 52 insertions(+), 3 deletions(-)
Modified: PKGBUILD
===================================================================
--- PKGBUILD 2018-04-27 04:58:46 UTC (rev 318227)
+++ PKGBUILD 2018-04-27 04:59:06 UTC (rev 318228)
@@ -4,7 +4,7 @@
pkgname=hoogle
pkgver=5.0.16
-pkgrel=59
+pkgrel=60
pkgdesc="Haskell API Search"
url="http://www.haskell.org/hoogle/"
license=("custom:BSD3")
@@ -17,9 +17,16 @@
'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")
-sha512sums=('14b0d6290927234be7e6e6548529fef61d44972a21b9ac22815325214241095b61d60e3b95b6f20a5d40bf9386beff4036942a2c61925c745b767f2525b915c9')
+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}"
Added: extra-1.6.6.patch
===================================================================
--- extra-1.6.6.patch (rev 0)
+++ extra-1.6.6.patch 2018-04-27 04:59:06 UTC (rev 318228)
@@ -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