Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
gitit-0.9-r1 add patch for working with happstack-7
* use flag added to metadata
- Loading branch information
Showing
4 changed files
with
162 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
AUX gitit-0.9-happstack-7.0.patch 4107 RMD160 b9d70ee2d2ec7e6d98f0b6bc7c1a5dc379aca7d5 SHA1 b4d2a9a9a0621d75a3c6ad138cf9f5cb0ba13e8e SHA256 ee8fc249429b32b004f27aeace1bd3dffbc8f4eb0952286036a108117a55af5a | ||
DIST gitit-0.9.tar.gz 204679 RMD160 395fc4a71c8aeb85022a2dce724b6555abececc8 SHA1 bba5b874cbd69e010e1e5278929301a9cb1399a1 SHA256 9756d2d67041c9a601f3de1c77cf27441fd15053b7c986325aa316f959757202 | ||
EBUILD gitit-0.9-r1.ebuild 2270 RMD160 a475e11412b485349c6a7d9e38e3967ad74d6fa0 SHA1 8b5fa0ac24866561f0b8ed56b41b096885c2706f SHA256 83fad476dac4f5b96a46398bef8dea98a0d647ce1259c35cd06e6402ebf9298e | ||
EBUILD gitit-0.9.ebuild 2225 RMD160 4eccdfaf42b75d4b45b771d628bdc2b0a211ff8a SHA1 41b1f83a72a930a2cd362bd0661cacf9b1e6f26e SHA256 cf521eeb60e71af9df295310b8b044382b0b628ab97f451aa5fa64157e69bc1c | ||
MISC metadata.xml 1296 RMD160 ce50b651ab5f71af0e31fdb75e4eeaf137595923 SHA1 8ceadf7f0d0e64baa396e012654af1897fad3ee2 SHA256 803981bf6ad6c5ef2def9bc995a5583fce56cab11fda5d4a8675ca0890bbc9a9 | ||
MISC metadata.xml 1380 RMD160 a9a7b5e8652d8e02825951b821c43767f9b4011d SHA1 de0d2d2976c089e93db5d8ebe932bcb0dac102ce SHA256 d883bc02a50e8d79d9e0506c8c599eb87c16dc91994828b282617551334b2da9 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
commit 8609002ac76323f2527fc58668306caf610a4d14 | ||
Author: John MacFarlane <fiddlosopher@gmail.com> | ||
Date: Thu Mar 29 16:59:35 2012 -0400 | ||
|
||
Updated for happstack 7. | ||
|
||
* Removed dependency on happstack-util; depend on base64-bytestring | ||
instead. | ||
|
||
diff --git a/Network/Gitit/Framework.hs b/Network/Gitit/Framework.hs | ||
index d29b573..71d2d22 100644 | ||
--- a/Network/Gitit/Framework.hs | ||
+++ b/Network/Gitit/Framework.hs | ||
@@ -62,8 +62,8 @@ import Data.FileStore | ||
import Data.Char (toLower) | ||
import Control.Monad (mzero, liftM, unless, MonadPlus) | ||
import qualified Data.Map as M | ||
-import Data.ByteString.UTF8 (toString) | ||
-import Data.ByteString.Lazy.UTF8 (fromString) | ||
+import qualified Data.ByteString.UTF8 as UTF8 | ||
+import qualified Data.ByteString.Lazy.UTF8 as LazyUTF8 | ||
import Data.Maybe (fromJust, fromMaybe) | ||
import Data.List (intercalate, isPrefixOf, isInfixOf) | ||
import System.FilePath ((<.>), takeExtension, takeFileName) | ||
@@ -71,7 +71,7 @@ import Text.Highlighting.Kate | ||
import Text.ParserCombinators.Parsec | ||
import Network.URL (decString, encString) | ||
import Network.URI (isUnescapedInURI) | ||
-import Happstack.Crypto.Base64 (decode) | ||
+import Data.ByteString.Base64 (decodeLenient) | ||
import Network.HTTP (urlEncodeVars) | ||
|
||
-- | Require a logged in user if the authentication level demands it. | ||
@@ -117,7 +117,7 @@ withUserFromHTTPAuth handler = do | ||
req <- askRq | ||
let user = case getHeader "authorization" req of | ||
Nothing -> "" | ||
- Just authHeader -> case parse pAuthorizationHeader "" (toString authHeader) of | ||
+ Just authHeader -> case parse pAuthorizationHeader "" (UTF8.toString authHeader) of | ||
Left _ -> "" | ||
Right u -> u | ||
localRq (setHeader "REMOTE_USER" user) handler | ||
@@ -126,7 +126,7 @@ withUserFromHTTPAuth handler = do | ||
getLoggedInUser :: GititServerPart (Maybe User) | ||
getLoggedInUser = do | ||
req <- askRq | ||
- case maybe "" toString (getHeader "REMOTE_USER" req) of | ||
+ case maybe "" UTF8.toString (getHeader "REMOTE_USER" req) of | ||
"" -> return Nothing | ||
u -> do | ||
mbUser <- getUser u | ||
@@ -148,7 +148,8 @@ pBasicHeader :: GenParser Char st String | ||
pBasicHeader = do | ||
_ <- string "Basic " | ||
result' <- many (noneOf " \t\n") | ||
- return $ takeWhile (/=':') $ decode result' | ||
+ return $ takeWhile (/=':') $ UTF8.toString | ||
+ $ decodeLenient $ UTF8.fromString result' | ||
|
||
-- | @unlessNoEdit responder fallback@ runs @responder@ unless the | ||
-- page has been designated not editable in configuration; in that | ||
@@ -197,7 +198,7 @@ getReferer = do | ||
req <- askRq | ||
base' <- getWikiBase | ||
return $ case getHeader "referer" req of | ||
- Just r -> case toString r of | ||
+ Just r -> case UTF8.toString r of | ||
"" -> base' | ||
s -> s | ||
Nothing -> base' | ||
@@ -327,7 +328,8 @@ withMessages messages handler = do | ||
req <- askRq | ||
let inps = filter (\(n,_) -> n /= "messages") $ rqInputsQuery req | ||
let newInp = ("messages", Input { | ||
- inputValue = Right $ fromString $ show messages | ||
+ inputValue = Right | ||
+ $ LazyUTF8.fromString $ show messages | ||
, inputFilename = Nothing | ||
, inputContentType = ContentType { | ||
ctType = "text" | ||
diff --git a/gitit.cabal b/gitit.cabal | ||
index 7842971..332cf40 100644 | ||
--- a/gitit.cabal | ||
+++ b/gitit.cabal | ||
@@ -157,8 +157,8 @@ Executable gitit | ||
filestore >= 0.4.0.2 && < 0.5, | ||
zlib >= 0.5 && < 0.6, | ||
url >= 2.1 && < 2.2, | ||
- happstack-server >= 6.6 && < 6.7, | ||
- happstack-util >= 6.0 && < 6.1, | ||
+ happstack-server >= 6.6 && < 7.1, | ||
+ base64-bytestring >= 0.1 && < 0.2, | ||
xml >= 1.3.5, | ||
hslogger >= 1 && < 1.2, | ||
ConfigFile >= 1 && < 1.2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
# Copyright 1999-2012 Gentoo Foundation | ||
# Distributed under the terms of the GNU General Public License v2 | ||
# $Header: $ | ||
|
||
# ebuild generated by hackport 0.2.17.9999 | ||
|
||
EAPI=4 | ||
|
||
CABAL_FEATURES="bin lib profile haddock hoogle hscolour" | ||
inherit haskell-cabal | ||
|
||
DESCRIPTION="Wiki using happstack, git or darcs, and pandoc." | ||
HOMEPAGE="http://gitit.net" | ||
SRC_URI="http://hackage.haskell.org/packages/archive/${PN}/${PV}/${P}.tar.gz" | ||
|
||
LICENSE="GPL-2" | ||
SLOT="0" | ||
KEYWORDS="~amd64 ~x86" | ||
IUSE="+plugins" | ||
|
||
RDEPEND=">=app-text/pandoc-1.9.0.5[profile?] <app-text/pandoc-1.10[profile?] | ||
=dev-haskell/blaze-html-0.4*[profile?] | ||
dev-haskell/cgi[profile?] | ||
>=dev-haskell/configfile-1[profile?] <dev-haskell/configfile-1.2[profile?] | ||
>=dev-haskell/feed-0.3.6[profile?] <dev-haskell/feed-0.4[profile?] | ||
>=dev-haskell/filestore-0.4.0.2[profile?] <dev-haskell/filestore-0.5[profile?] | ||
dev-haskell/ghc-paths[profile?] | ||
<dev-haskell/happstack-server-7.1[profile?] | ||
>=dev-haskell/highlighting-kate-0.5.0.1[profile?] <dev-haskell/highlighting-kate-0.6[profile?] | ||
>=dev-haskell/hslogger-1[profile?] <dev-haskell/hslogger-1.2[profile?] | ||
=dev-haskell/hstringtemplate-0.6*[profile?] | ||
>=dev-haskell/http-4000.0[profile?] <dev-haskell/http-4000.3[profile?] | ||
>=dev-haskell/json-0.4[profile?] <dev-haskell/json-0.6[profile?] | ||
dev-haskell/mtl[profile?] | ||
>=dev-haskell/network-2.1.0.0[profile?] <dev-haskell/network-2.4[profile?] | ||
>=dev-haskell/pandoc-types-1.9.0.2[profile?] <dev-haskell/pandoc-types-1.10[profile?] | ||
dev-haskell/parsec[profile?] | ||
>=dev-haskell/recaptcha-0.1[profile?] | ||
dev-haskell/safe[profile?] | ||
>dev-haskell/sha-1[profile?] <dev-haskell/sha-1.6[profile?] | ||
=dev-haskell/tagsoup-0.12*[profile?] | ||
dev-haskell/text[profile?] | ||
>=dev-haskell/time-1.1[profile?] <dev-haskell/time-1.5[profile?] | ||
=dev-haskell/url-2.1*[profile?] | ||
=dev-haskell/utf8-string-0.3*[profile?] | ||
dev-haskell/xhtml[profile?] | ||
>=dev-haskell/xml-1.3.5[profile?] | ||
=dev-haskell/xss-sanitize-0.3*[profile?] | ||
=dev-haskell/zlib-0.5*[profile?] | ||
>=dev-lang/ghc-6.10.1 | ||
plugins? ( dev-haskell/ghc-paths )" | ||
DEPEND="${RDEPEND} | ||
>=dev-haskell/cabal-1.6" | ||
|
||
src_prepare() { | ||
epatch "${FILESDIR}/${P}-happstack-7.0.patch" || die "unable to patch" | ||
} | ||
|
||
src_configure() { | ||
cabal_src_configure $(cabal_flag plugins) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters