packages feed

shake-language-c 0.6.2 → 0.6.3

raw patch · 3 files changed

+16/−10 lines, 3 files

Files

CHANGELOG.md view
@@ -1,5 +1,11 @@ # Changelog for shake-language-c +## [v0.6.3][]++### Changed++* Fix bug in `Development.Shake.Language.C.Target.OSX`: `getPlatformVersionsWithRoot` works correctly now with SDK directories without version number, as introduced by Xcode 6+ ## [v0.6.2][]  Bug fix release.@@ -26,10 +32,11 @@ * Remove `libppapi`, `libppapi_cpp`, `libnacl_io`, `libppapi_simple` from `Development.Shake.Language.C.Target.NaCl`. * Remove `Development.Shake.Language.C.Target.archString`. -## [0.5.0][]+## [v0.5.0][]  First released version. +[v0.6.3]: https://github.com/samplecount/shake-language-c/tree/v0.6.3 [v0.6.2]: https://github.com/samplecount/shake-language-c/tree/v0.6.2 [v0.6.1]: https://github.com/samplecount/shake-language-c/tree/v0.6.1 [v0.6.0]: https://github.com/samplecount/shake-language-c/tree/v0.6.0
shake-language-c.cabal view
@@ -13,7 +13,7 @@ -- limitations under the License.  Name:         shake-language-c-Version:      0.6.2+Version:      0.6.3 Synopsis:     Utilities for cross-compiling with Shake Description:  This library provides <http://hackage.haskell.org/package/shake Shake> utilities for cross-compiling @C@, @C++@ and @ObjC@ code for various target platforms. Currently supported target platforms are Android, iOS, Linux, MacOS X, Windows\/MinGW and Google Portable Native Client (PNaCl). Supported host platforms are MacOS X, Linux and Windows. Category:     Development
src/Development/Shake/Language/C/Target/OSX.hs view
@@ -50,7 +50,7 @@ import           Development.Shake.Language.C.Label import           Development.Shake.Language.C.ToolChain import           System.Process (readProcess)-import           Text.Read (readEither)+import           Text.Read (readMaybe)  archString :: Arch -> String archString arch =@@ -109,14 +109,13 @@ getPlatformVersionsWithRoot :: Platform -> DeveloperPath -> Action [Version] getPlatformVersionsWithRoot platform (DeveloperPath sdkRoot) = do   dirs <- getDirectoryDirs (sdkDirectory sdkRoot platform)-  case mapMaybe (stripPrefix name) dirs of-    [] -> error $ "OSX: No SDK found for " ++ name-    xs -> return [ flip Version []-                 . map (either error id . readEither)-                 . splitOn "."-                 . dropExtension $ x-                 | x <- xs ]+  case mapMaybe (\x -> parseVersion =<< stripPrefix name (dropExtension x)) dirs of+    [] -> error $ "No SDK found for " ++ name+    xs -> return xs   where name = platformName platform+        parseVersion "" = Nothing+        parseVersion str =+          flip Version [] <$> mapM readMaybe (splitOn "." str)  -- | Return a list of available platform SDK versions. --