| 1 | 1 patch for repository http://code.haskell.org/gtk2hs: |
|---|
| 2 | |
|---|
| 3 | Wed Nov 14 02:31:12 CST 2012 jacksjy@gmail.com |
|---|
| 4 | * c2hs bug #7 workaround |
|---|
| 5 | cpp(The C preprocessor), will generate out diffrent infomation by diffent locale |
|---|
| 6 | and parseHeader can't handle multi-byte char encoding language translation |
|---|
| 7 | to the <command-line> etc. this workaround call cpp in LANG=C enviroment every time. |
|---|
| 8 | |
|---|
| 9 | |
|---|
| 10 | New patches: |
|---|
| 11 | |
|---|
| 12 | [c2hs bug #7 workaround |
|---|
| 13 | jacksjy@gmail.com**20121113183112 |
|---|
| 14 | Ignore-this: 41481e2d2b0d6a5070e0aa4cb07ee176 |
|---|
| 15 | cpp(The C preprocessor), will generate out diffrent infomation by diffent locale |
|---|
| 16 | and parseHeader can't handle multi-byte char encoding language translation |
|---|
| 17 | to the <command-line> etc. this workaround call cpp in LANG=C enviroment every time. |
|---|
| 18 | ] hunk ./tools/c2hs/toplevel/Main.hs 143 |
|---|
| 19 | where |
|---|
| 20 | |
|---|
| 21 | -- standard libraries |
|---|
| 22 | -import Data.List (isPrefixOf) |
|---|
| 23 | -import System.IO (openFile) |
|---|
| 24 | -import System.Process (runProcess, waitForProcess) |
|---|
| 25 | -import Control.Monad (when, unless, mapM) |
|---|
| 26 | -import Data.Maybe (fromJust) |
|---|
| 27 | +import Control.Monad (mapM, unless, when) |
|---|
| 28 | +import Data.List (isPrefixOf) |
|---|
| 29 | +import Data.Maybe (fromJust) |
|---|
| 30 | +import System.IO (openFile) |
|---|
| 31 | +import System.Process (CreateProcess(..), StdStream(..), createProcess, shell, |
|---|
| 32 | + waitForProcess) |
|---|
| 33 | |
|---|
| 34 | -- base libraries |
|---|
| 35 | import System.Console.GetOpt |
|---|
| 36 | hunk ./tools/c2hs/toplevel/Main.hs 565 |
|---|
| 37 | tracePreproc (unwords (cpp:args)) |
|---|
| 38 | exitCode <- liftIO $ do |
|---|
| 39 | ppHnd <- openFile ppFile WriteMode |
|---|
| 40 | - process <- runProcess cpp args |
|---|
| 41 | - Nothing Nothing Nothing (Just ppHnd) Nothing |
|---|
| 42 | + let cppShellCreate = shell $ unwords ("LANG=C":cpp:args) |
|---|
| 43 | + (_, _, _, process) <- createProcess cppShellCreate {std_in = Inherit , |
|---|
| 44 | + std_out = UseHandle ppHnd, |
|---|
| 45 | + std_err = Inherit} |
|---|
| 46 | waitForProcess process |
|---|
| 47 | case exitCode of |
|---|
| 48 | ExitFailure _ -> fatal "Error during preprocessing chs file" |
|---|
| 49 | hunk ./tools/c2hs/toplevel/Main.hs 623 |
|---|
| 50 | tracePreproc (unwords (cpp:args)) |
|---|
| 51 | exitCode <- liftIO $ do |
|---|
| 52 | preprocHnd <- openFile preprocFile WriteMode |
|---|
| 53 | - process <- runProcess cpp args |
|---|
| 54 | - Nothing Nothing Nothing (Just preprocHnd) Nothing |
|---|
| 55 | + let cppShellCreate = shell $ unwords ("LANG=C":cpp:args) |
|---|
| 56 | + (_, _, _, process) <- createProcess cppShellCreate {std_in = Inherit , |
|---|
| 57 | + std_out = UseHandle preprocHnd, |
|---|
| 58 | + std_err = Inherit} |
|---|
| 59 | waitForProcess process |
|---|
| 60 | case exitCode of |
|---|
| 61 | ExitFailure _ -> fatal "Error during preprocessing custom header file" |
|---|
| 62 | hunk ./tools/c2hs/toplevel/Main.hs 694 |
|---|
| 63 | tracePreproc (unwords (cpp:args)) |
|---|
| 64 | exitCode <- liftIO $ do |
|---|
| 65 | preprocHnd <- openFile preprocFile WriteMode |
|---|
| 66 | - process <- runProcess cpp args |
|---|
| 67 | - Nothing Nothing Nothing (Just preprocHnd) Nothing |
|---|
| 68 | + let cppShellCreate = shell $ unwords ("LANG=C":cpp:args) |
|---|
| 69 | + (_, _, _, process) <- createProcess cppShellCreate {std_in = Inherit , |
|---|
| 70 | + std_out = UseHandle preprocHnd, |
|---|
| 71 | + std_err = Inherit} |
|---|
| 72 | waitForProcess process |
|---|
| 73 | case exitCode of |
|---|
| 74 | ExitFailure _ -> fatal "Error during preprocessing" |
|---|
| 75 | hunk ./tools/gtk2hs-buildtools.cabal 56 |
|---|
| 76 | Executable gtk2hsC2hs |
|---|
| 77 | main-is: Main.hs |
|---|
| 78 | build-depends: base >= 4 && < 5, |
|---|
| 79 | - process, directory, array, containers, pretty, |
|---|
| 80 | + process >= 1.0.1.1, directory, array, containers, pretty, |
|---|
| 81 | filepath, random |
|---|
| 82 | build-tools: alex, happy |
|---|
| 83 | other-modules: BaseVersion |
|---|
| 84 | |
|---|
| 85 | Context: |
|---|
| 86 | |
|---|
| 87 | [version bumps |
|---|
| 88 | Daniel Wagner <daniel@wagner-home.com>**20121104202904 |
|---|
| 89 | Ignore-this: b960ee20608d17c3574e40e8a454b80a |
|---|
| 90 | ] |
|---|
| 91 | [whitespace only |
|---|
| 92 | Daniel Wagner <daniel@wagner-home.com>**20121103135304 |
|---|
| 93 | Ignore-this: b76ab22da8e3f076d92952ee54a14d20 |
|---|
| 94 | ] |
|---|
| 95 | [modify foreign import functions for ghc-7.6 compatibility |
|---|
| 96 | jwlato@gmail.com**20120926005409 |
|---|
| 97 | Ignore-this: 5d912e2b7782f0f002e88e76d0b52b26 |
|---|
| 98 | |
|---|
| 99 | ghc-7.6 appears to be much more restrictive when coercing types of functions |
|---|
| 100 | imported via the FFI than previous versions. Before, unused arguments could be |
|---|
| 101 | omitted, and types such as 'Ptr NewtypeWrapper' were allowed. ghc-7.6 no |
|---|
| 102 | longer seems to accept these, so some wrapped functions needed to have |
|---|
| 103 | arguments added or argument types changed. |
|---|
| 104 | |
|---|
| 105 | The changed argument types are strictly in internal APIs, so a major version |
|---|
| 106 | bump is not necessary. |
|---|
| 107 | ] |
|---|
| 108 | [fix 'catch' statements for ghc-7.6 compatibility |
|---|
| 109 | jwlato@gmail.com**20120926010051 |
|---|
| 110 | Ignore-this: cb638480bc10f2b446c6e0b251b35a10 |
|---|
| 111 | ] |
|---|
| 112 | [tools/c2hs: import foreign data constructors (CInt) |
|---|
| 113 | jwlato@gmail.com**20120926010119 |
|---|
| 114 | Ignore-this: 7660daffca37235fda0f8cc47426a70 |
|---|
| 115 | ] |
|---|
| 116 | [fix documentation bug: mention widgetTooltipText instead of widgetSetTooltipText |
|---|
| 117 | Daniel Wagner <daniel@wagner-home.com>**20121010232556 |
|---|
| 118 | Ignore-this: f9b29cc7376afc3312852126bc2a65b9 |
|---|
| 119 | ] |
|---|
| 120 | [Fix for finding the .dll names for ghci |
|---|
| 121 | Duncan Coutts <duncan@community.haskell.org>**20120902165131 |
|---|
| 122 | Ignore-this: f2ca3b6959a1355ca708e8b7c091a50d |
|---|
| 123 | Should fix the problem that the cairo package fails to load in ghci on Windows |
|---|
| 124 | ] |
|---|
| 125 | [Gergely Risko's patch to make tryEvent more useful |
|---|
| 126 | Daniel Wagner <daniel@wagner-home.com>**20120708094322 |
|---|
| 127 | Ignore-this: 526940ab1b2222de547f24dce4d95db4 |
|---|
| 128 | |
|---|
| 129 | Previously, tryEvent would catch pattern-match failure exceptions and Do The |
|---|
| 130 | Right Thing. However, it didn't catch the exception thrown when calling |
|---|
| 131 | "guard". This patch lets it behave the same when guards fail as when patterns |
|---|
| 132 | are exhausted. |
|---|
| 133 | |
|---|
| 134 | ] |
|---|
| 135 | [forgot to bump the gtk package number -- which explains why the build fixes didn't make it to Hackage |
|---|
| 136 | Daniel Wagner <daniel@wagner-home.com>**20120617214149 |
|---|
| 137 | Ignore-this: bf0869569fbe3a78a3ac57317b78fcec |
|---|
| 138 | ] |
|---|
| 139 | [add a small demo of DND code |
|---|
| 140 | Daniel Wagner <daniel@wagner-home.com>**20120611224157 |
|---|
| 141 | Ignore-this: 7f6658e7f84c4ad5292b20042b7757b8 |
|---|
| 142 | ] |
|---|
| 143 | [change gdk_threads_enter import from unsafe to safe |
|---|
| 144 | Daniel Wagner <daniel@wagner-home.com>**20120602235822 |
|---|
| 145 | Ignore-this: cae9259155505b623b1afe09f4df2143 |
|---|
| 146 | |
|---|
| 147 | Safe imports have two uses: when a function may call back into Haskell, it must |
|---|
| 148 | be marked safe; and when a function may block (or take a long time to compute), |
|---|
| 149 | it may be marked safe to avoid blocking all other Haskell threads from making |
|---|
| 150 | progress. The cost of marking a function safe is decreased (serial) |
|---|
| 151 | performance. |
|---|
| 152 | |
|---|
| 153 | Since the typical use case for gdk_threads_enter is to grab a lock in |
|---|
| 154 | concurrent code, it is important to ensure that other Haskell threads can make |
|---|
| 155 | progress -- especially since one of them may be holding the lock. |
|---|
| 156 | |
|---|
| 157 | ] |
|---|
| 158 | [use forward-compatible Foreign.C.Types imports |
|---|
| 159 | Daniel Wagner <daniel@wagner-home.com>**20120528182742 |
|---|
| 160 | Ignore-this: 6c4a618a653ddbaef4bd6974e7177d45 |
|---|
| 161 | |
|---|
| 162 | Previously, the hierarchy generator used #if in an attempt to choose between |
|---|
| 163 | two choices for an import line. The one choice gives warnings on old GHC's; the |
|---|
| 164 | other gives warnings on new GHC's. However, the symbol used in the #if isn't |
|---|
| 165 | defined by gtk2hs' custom build system, so one of the two choices was the |
|---|
| 166 | defacto code. Until this patch, the defacto code was the one that produced |
|---|
| 167 | warnings on new GHC's. |
|---|
| 168 | |
|---|
| 169 | It should be possible to revise the build system to define this symbol, but it |
|---|
| 170 | is becoming less and less likely I will have the energy to work out how to do |
|---|
| 171 | this correctly. Instead this patch makes the choice to prefer the import that |
|---|
| 172 | compiles cleanly on new GHC's, and let old GHC's print warnings. |
|---|
| 173 | |
|---|
| 174 | ] |
|---|
| 175 | [remove TreeStoreStatic |
|---|
| 176 | Daniel Wagner <daniel@wagner-home.com>**20120527215117 |
|---|
| 177 | Ignore-this: 87504218d1864b1239985ee7fb4e3495 |
|---|
| 178 | |
|---|
| 179 | This module hasn't been touched in over five years; doesn't build; and wasn't |
|---|
| 180 | mentioned in the cabal file anyway. |
|---|
| 181 | |
|---|
| 182 | ] |
|---|
| 183 | [rename the HCAR report per Janis' instructions |
|---|
| 184 | Daniel Wagner <daniel@wagner-home.com>**20120517225052 |
|---|
| 185 | Ignore-this: f687965d8d6149ff6dfb95e0ae64f55d |
|---|
| 186 | ] |
|---|
| 187 | [Fix a memory leak in customStoreNew (#1251) |
|---|
| 188 | Takano Akio <aljee@hyper.cx>**20120423230920 |
|---|
| 189 | Ignore-this: 3940fee6a1c17c2a5951a7d9f6a6573b |
|---|
| 190 | ] |
|---|
| 191 | [some "darcs log name -> real world name" translations to remember |
|---|
| 192 | Daniel Wagner <daniel@wagner-home.com>**20120426165039 |
|---|
| 193 | Ignore-this: db0b53c299aa90ffcad5f1ce4fa9a758 |
|---|
| 194 | ] |
|---|
| 195 | [record carefully what I'm supposed to do when it comes time to make a release |
|---|
| 196 | Daniel Wagner <daniel@wagner-home.com>**20120422231212 |
|---|
| 197 | Ignore-this: 74beca0a3c44929e5db7d03681b7e3ed |
|---|
| 198 | ] |
|---|
| 199 | [add a surface type for raw data, plus a demo program showing how to use this with SDL (code supplied by Eli Frey) |
|---|
| 200 | Daniel Wagner <daniel@wagner-home.com>**20120422195206 |
|---|
| 201 | Ignore-this: 254fd58bd2322a9fecb5449741d7a697 |
|---|
| 202 | ] |
|---|
| 203 | [Add entryGet/SetBuffer functions. |
|---|
| 204 | adstark1982@yahoo.com**20120420133554 |
|---|
| 205 | Ignore-this: 5e083fd21fc5e63986fa0bae6a7d5442 |
|---|
| 206 | ] |
|---|
| 207 | [Bindings for gtk_menu_item_get_label, gtk_menu_item_get_use_underline, and the associated setters. |
|---|
| 208 | adstark1982@yahoo.com**20120411140517 |
|---|
| 209 | Ignore-this: cc9d70d06e02b6ae93fe8e39daf96ea7 |
|---|
| 210 | ] |
|---|
| 211 | [added pixbufNewFromData |
|---|
| 212 | blackredtree@gmail.com**20120320190411 |
|---|
| 213 | Ignore-this: e3bd65acdcad39fbe22258e53ec4ed22 |
|---|
| 214 | ] |
|---|
| 215 | [Add a note on how to connect to bufferInsertText. |
|---|
| 216 | Axel.Simon@in.tum.de**20120313141311 |
|---|
| 217 | Ignore-this: c9a6011fbae46b14c6c18d92de9e6732 |
|---|
| 218 | ] |
|---|
| 219 | [TAG 0.12.3.1 |
|---|
| 220 | Daniel Wagner <daniel@wagner-home.com>**20120527221608 |
|---|
| 221 | Ignore-this: fba81e067f20815572c143782547944e |
|---|
| 222 | ] |
|---|
| 223 | Patch bundle hash: |
|---|
| 224 | b3431b690df2b291c64494188afbbcc86bae4a1d |
|---|