diff options
author | Sergei Trofimovich <slyfox@gentoo.org> | 2012-06-24 11:38:18 +0000 |
---|---|---|
committer | Sergei Trofimovich <slyfox@gentoo.org> | 2012-06-24 11:38:18 +0000 |
commit | fc640a86a8ffc73211334c43f9abcdf2001e85fd (patch) | |
tree | bb96928544c5aaeb1b5afb14a97eff92be935412 | |
parent | Remanifest, the .4.91 tarball was change before release (diff) | |
download | historical-fc640a86a8ffc73211334c43f9abcdf2001e85fd.tar.gz historical-fc640a86a8ffc73211334c43f9abcdf2001e85fd.tar.bz2 historical-fc640a86a8ffc73211334c43f9abcdf2001e85fd.zip |
Pick upstream patch to fix filename encodings. Original problem reported by Nikolaj Sjujskij.
Package-Manager: portage-2.2.0_alpha110_p5/cvs/Linux x86_64
-rw-r--r-- | app-text/pandoc/ChangeLog | 10 | ||||
-rw-r--r-- | app-text/pandoc/Manifest | 15 | ||||
-rw-r--r-- | app-text/pandoc/files/pandoc-1.9.4.1-file-enc.patch | 132 | ||||
-rw-r--r-- | app-text/pandoc/pandoc-1.9.4.1-r1.ebuild (renamed from app-text/pandoc/pandoc-1.9.4.1.ebuild) | 7 |
4 files changed, 159 insertions, 5 deletions
diff --git a/app-text/pandoc/ChangeLog b/app-text/pandoc/ChangeLog index 6b96975dcc60..450599465919 100644 --- a/app-text/pandoc/ChangeLog +++ b/app-text/pandoc/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for app-text/pandoc # Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/pandoc/ChangeLog,v 1.7 2012/06/22 20:04:23 qnikst Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/pandoc/ChangeLog,v 1.8 2012/06/24 11:38:18 slyfox Exp $ + +*pandoc-1.9.4.1-r1 (24 Jun 2012) + + 24 Jun 2012; Sergei Trofimovich <slyfox@gentoo.org> + +files/pandoc-1.9.4.1-file-enc.patch, +pandoc-1.9.4.1-r1.ebuild, + -pandoc-1.9.4.1.ebuild: + Pick upstream patch to fix filename encodings. Original problem reported by + Nikolaj Sjujskij. *pandoc-1.9.4.1 (23 Jun 2012) diff --git a/app-text/pandoc/Manifest b/app-text/pandoc/Manifest index 7298578443b8..fe85226145bf 100644 --- a/app-text/pandoc/Manifest +++ b/app-text/pandoc/Manifest @@ -1,5 +1,9 @@ +-----BEGIN PGP SIGNED MESSAGE----- +Hash: SHA1 + AUX pandoc-1.9.1.2-haddock-2.10.0.patch 873 RMD160 e7d11455337e81c032d9bc6ea118c80643db449e SHA1 c5e7e9194bc9664f39a63b8f70d6939cd81062c5 SHA256 0e2c59034a9ed3c5b92ce207129b860bfb90efaada5f35cc80fec49576d0a296 AUX pandoc-1.9.3-ghc-7.5.patch 3048 RMD160 3dbe7ddc129a806d7bf4103252b4ebcc0546ff14 SHA1 80f8c01c3938a15b2a61ba904808e0ac7afc72e1 SHA256 f5ce30f706ff730534b7e90b6687e0a2eb328cf61b872c0996b0a343a9265540 +AUX pandoc-1.9.4.1-file-enc.patch 4299 RMD160 83ef8ed9f3d92e078cac87683cc6a97aa8bdc55b SHA1 c41877b5f76eb2351992c4e0f7888552780b6853 SHA256 c0b745fbd8675220f2e19c1ba005ed762302127ae999259a8d63e59ae0a96715 AUX pandoc-1.9.4.1-ghc-7.5.patch 3056 RMD160 a95914bc31a4c04c7e34aa6f0fa4c1a88be90ef9 SHA1 2467d140abf0cb78c13f94d96c7ae43bc8022bd8 SHA256 b4ddbb9e8666b9b4f12734642516c9d8922d45fad9ea2e3e388021470ce7c54f DIST pandoc-1.8.1.1.tar.gz 459135 RMD160 6909fc5358abf628a7ef2eefca673ab76db4bd91 SHA1 c5974ce9594df55a60f482c518cd5af34ec7afe2 SHA256 526355ddcbff69c0df7757d30d37e08864995b7ebd899916e329ecd19104c83c DIST pandoc-1.9.1.2.tar.gz 529866 RMD160 f3a5228a3f8349cbfff1e0dc74b9f1a1d05fc32f SHA1 c5d8c8eaed7658005c1c4fdef70d3db140891660 SHA256 52659ff6981cab33fadeb97732dfc9719c3acf1d5ebcd0014e9e98395c654d6a @@ -10,6 +14,13 @@ EBUILD pandoc-1.8.1.1-r1.ebuild 1606 RMD160 e917b95d9e57cc04a56403f7eb5b3ffe6426 EBUILD pandoc-1.9.1.2.ebuild 2530 RMD160 2c0b64c2a5be269989276daeac8709230d627116 SHA1 3e344c60bf4de4b032f5dbe75cab5eb8237ba2ee SHA256 42b1a1d1590352485ea00426efbf33a6b207a15591c72a31d97185a2dd80cbdb EBUILD pandoc-1.9.2.ebuild 2540 RMD160 5a4704c8f37bfd018064eca6ba7fb80f083c4446 SHA1 ccf01f7a190b56e45c160c05d242bc0a272ef210 SHA256 e3c0222a4d595ff5e84dbad0a832f615247e5ecc89046da5e421f45c3efed057 EBUILD pandoc-1.9.3.ebuild 2595 RMD160 a2ec38634e9f480af9c4a75658c2b7ce09011377 SHA1 3104c3cac6e522a052ec3b519494d4120a851d26 SHA256 f1f299879266c87c3c487e504d9734d79119881f728e21875cfdadd902a15f37 -EBUILD pandoc-1.9.4.1.ebuild 2541 RMD160 7dfae8574e9e77287c7d221af911f127f5281256 SHA1 0640a54743966b4b52f56e17d8671960cdae5891 SHA256 95ef677cc3b890086e88d1da9f964fc51e348477acf26fc180f9aa0fbf561777 -MISC ChangeLog 1402 RMD160 a0ee9ad5571f6ea4ae7c58cfea0345ac21f707de SHA1 75dae421c154ee2f424be0b247e34f6b2acb6274 SHA256 1bca816c39c5523fccc185a5c19a2dff0eba9e0932e7f14f61c3da724615bdf9 +EBUILD pandoc-1.9.4.1-r1.ebuild 2633 RMD160 6564fa5b2a17f244d996540ab2b3870f02186c62 SHA1 9aba4563140ebc8c4e066942ebb04441afe3478e SHA256 937938544c370321352c721cba2dd9cefdbde038095675fa5d3abb2b1f230604 +MISC ChangeLog 1682 RMD160 f46283629d1eb55067785567091ac082fe58988d SHA1 acd899dceff60397c2f4b29d8f41d9771ccb0837 SHA256 eafec8e469ce7951b1bda86d02af5b50cfb3d3aed261c67a4fa70551d7f47fbf MISC metadata.xml 823 RMD160 ec6d5588b18f195cf4d6e10f259f5810c3d64281 SHA1 7448e8db7f71a138c2b4c378d4c4c807159b9bc3 SHA256 e16707b8d0d06a0ff099025bc880a48506c03cf32a39b5391d178265b0d411be +-----BEGIN PGP SIGNATURE----- +Version: GnuPG v2.0.17 (GNU/Linux) + +iEYEARECAAYFAk/m/YEACgkQcaHudmEf86rc5wCfZ0Sy2Fn9hhHeGjYhhwPErjYh +aBgAniphAw1dEe+TOt7GhO0B0FZVqCVT +=FFB1 +-----END PGP SIGNATURE----- diff --git a/app-text/pandoc/files/pandoc-1.9.4.1-file-enc.patch b/app-text/pandoc/files/pandoc-1.9.4.1-file-enc.patch new file mode 100644 index 000000000000..4464f3a8d60d --- /dev/null +++ b/app-text/pandoc/files/pandoc-1.9.4.1-file-enc.patch @@ -0,0 +1,132 @@ +commit cc39c313c5eeedf8bc1693e0d80a510891a7fc4d +Author: John MacFarlane <jgm@berkeley.edu> +Date: Fri Jun 22 21:24:02 2012 +0200 + + Don't encode/decode file paths if base >= 4.5. + + Prior to base 4.5 (and perhaps earlier - check), filepaths and command + line arguments were treated as unencoded lists of bytes, not unicode + strings, so we had to work around that by encoding and decoding + them. This commit adds CPP checks for base 4.5 that disable the + encoding/decoding. + + Fixes a bug with multilingual filenames when pandoc was compiled + with ghc 7.4. Closes #540. + +Upstream-bug: https://github.com/jgm/pandoc/issues/540 +Reported-by: Nikolaj Sjujskij <sterkrig@myopera.com> +diff --git a/src/Text/Pandoc/UTF8.hs b/src/Text/Pandoc/UTF8.hs +index 4af1558..929bc3f 100644 +--- a/src/Text/Pandoc/UTF8.hs ++++ b/src/Text/Pandoc/UTF8.hs +@@ -39,21 +39,25 @@ module Text.Pandoc.UTF8 ( readFile + + where + ++#if MIN_VERSION_base(4,5,0) ++#else ++import Codec.Binary.UTF8.String (encodeString) ++#endif ++ + #if MIN_VERSION_base(4,2,0) + + import System.IO hiding (readFile, writeFile, getContents, + putStr, putStrLn, hPutStr, hPutStrLn, hGetContents) + import Prelude hiding (readFile, writeFile, getContents, putStr, putStrLn ) +-import Codec.Binary.UTF8.String (encodeString) + import qualified System.IO as IO + + readFile :: FilePath -> IO String + readFile f = do +- h <- openFile (encodeString f) ReadMode ++ h <- openFile (encodePath f) ReadMode + hGetContents h + + writeFile :: FilePath -> String -> IO () +-writeFile f s = withFile (encodeString f) WriteMode $ \h -> hPutStr h s ++writeFile f s = withFile (encodePath f) WriteMode $ \h -> hPutStr h s + + getContents :: IO String + getContents = hGetContents stdin +@@ -76,7 +80,6 @@ hGetContents h = hSetEncoding h utf8_bom >> IO.hGetContents h + #else + + import qualified Data.ByteString as B +-import Codec.Binary.UTF8.String (encodeString) + import Data.ByteString.UTF8 (toString, fromString) + import Prelude hiding (readFile, writeFile, getContents, putStr, putStrLn) + import System.IO (Handle) +@@ -91,10 +94,10 @@ stripBOM s | bom `B.isPrefixOf` s = B.drop 3 s + stripBOM s = s + + readFile :: FilePath -> IO String +-readFile = liftM (toString . stripBOM) . B.readFile . encodeString ++readFile = liftM (toString . stripBOM) . B.readFile . encodePath + + writeFile :: FilePath -> String -> IO () +-writeFile f = B.writeFile (encodeString f) . fromString ++writeFile f = B.writeFile (encodePath f) . fromString + + getContents :: IO String + getContents = liftM (toString . stripBOM) B.getContents +@@ -115,3 +118,10 @@ hPutStrLn :: Handle -> String -> IO () + hPutStrLn h s = hPutStr h (s ++ "\n") + + #endif ++ ++encodePath :: FilePath -> FilePath ++#if MIN_VERSION_base(4,5,0) ++encodePath = id ++#else ++encodePath = encodeString ++#endif +diff --git a/src/pandoc.hs b/src/pandoc.hs +index 34d136a..7e9646c 100644 +--- a/src/pandoc.hs ++++ b/src/pandoc.hs +@@ -1,3 +1,4 @@ ++{-# LANGUAGE CPP #-} + {- + Copyright (C) 2006-2012 John MacFarlane <jgm@berkeley.edu> + +@@ -56,8 +57,21 @@ import Network.HTTP (simpleHTTP, mkRequest, getResponseBody, RequestMethod(..)) + import Network.URI (parseURI, isURI, URI(..)) + import qualified Data.ByteString.Lazy as B + import Data.ByteString.Lazy.UTF8 (toString ) +-import Codec.Binary.UTF8.String (decodeString, encodeString) + import Text.CSL.Reference (Reference(..)) ++#if MIN_VERSION_base(4,5,0) ++#else ++import Codec.Binary.UTF8.String (decodeString, encodeString) ++#endif ++ ++encodePath, decodeArg :: FilePath -> FilePath ++#if MIN_VERSION_base(4,5,0) ++encodePath = id ++decodeArg = id ++#else ++encodePath = encodeString ++decodeArg = decodeString ++#endif ++ + + copyrightMessage :: String + copyrightMessage = "\nCopyright (C) 2006-2012 John MacFarlane\n" ++ +@@ -745,7 +759,7 @@ defaultWriterName x = + main :: IO () + main = do + +- rawArgs <- liftM (map decodeString) getArgs ++ rawArgs <- liftM (map decodeArg) getArgs + prg <- getProgName + let compatMode = (prg == "hsmarkdown") + +@@ -1023,7 +1037,7 @@ main = do + else return doc1 + + let writeBinary :: B.ByteString -> IO () +- writeBinary = B.writeFile (encodeString outputFile) ++ writeBinary = B.writeFile (encodePath outputFile) + + let writerFn :: FilePath -> String -> IO () + writerFn "-" = UTF8.putStr diff --git a/app-text/pandoc/pandoc-1.9.4.1.ebuild b/app-text/pandoc/pandoc-1.9.4.1-r1.ebuild index d1f22aa5bdb0..0073b52ef3a6 100644 --- a/app-text/pandoc/pandoc-1.9.4.1.ebuild +++ b/app-text/pandoc/pandoc-1.9.4.1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/app-text/pandoc/pandoc-1.9.4.1.ebuild,v 1.1 2012/06/22 20:04:23 qnikst Exp $ +# $Header: /var/cvsroot/gentoo-x86/app-text/pandoc/pandoc-1.9.4.1-r1.ebuild,v 1.1 2012/06/24 11:38:18 slyfox Exp $ EAPI=4 @@ -17,6 +17,7 @@ LICENSE="GPL-2" SLOT="0" KEYWORDS="~amd64 ~x86" IUSE="test" +RESTRICT="test" # missing files in tarball RDEPEND="=dev-haskell/base64-bytestring-0.1*[profile?] =dev-haskell/blaze-html-0.5*[profile?] @@ -64,7 +65,9 @@ DEPEND="${RDEPEND} dev-haskell/test-framework[profile?] )" -PATCHES=("${FILESDIR}/${PN}-1.9.4.1-ghc-7.5.patch") +PATCHES=("${FILESDIR}/${PN}-1.9.4.1-ghc-7.5.patch" + "${FILESDIR}/${PN}-1.9.4.1-file-enc.patch" + ) src_configure() { cabal_src_configure \ |