packages feed

fltkhs 0.5.1.8 → 0.5.1.9

raw patch · 3 files changed

+49/−23 lines, 3 filessetup-changedPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

Setup.hs view
@@ -25,7 +25,7 @@ import qualified Distribution.Simple.Program.Ar    as Ar import qualified Distribution.ModuleName as ModuleName import Distribution.Simple.BuildPaths-import System.Directory(getCurrentDirectory, getDirectoryContents, withCurrentDirectory, doesDirectoryExist)+import System.Directory(getCurrentDirectory, getDirectoryContents, withCurrentDirectory, doesDirectoryExist, makeAbsolute) import System.FilePath ( (</>), (<.>), takeExtension, combine, takeBaseName, takeDirectory) import qualified Distribution.Simple.GHC  as GHC import qualified Distribution.Simple.JHC  as JHC@@ -47,31 +47,38 @@  fltkSource = "fltk-1.3.4-1" -runMake :: IO ()-runMake =+runMake :: [String] -> IO ()+runMake args =   case buildOS of-    Windows -> rawSystemExit normal "make" []+    Windows -> rawSystemExit normal "make" args     os | os `elem` [FreeBSD, OpenBSD, NetBSD, DragonFly]-      -> rawSystemExit normal "gmake" []-    _ -> rawSystemExit normal "make" []+      -> rawSystemExit normal "gmake" args+    _ -> rawSystemExit normal "make" args -buildFltk :: IO ()-buildFltk = do+buildFltk :: IO FilePath -> IO ()+buildFltk prefix = do   rawSystemExit normal "tar" ["-zxf", fltkSource ++ "-source.tar.gz"]   projectRoot <- getCurrentDirectory+  prefix' <- prefix   let fltkDir = projectRoot </>  fltkSource       fltkFlags = [ "--enable-gl",                     "--enable-shared",                     "--enable-localjpeg",                     "--enable-localzlib",-                    "--enable-localpng"]+                    "--enable-localpng",+                    ("--prefix=" ++ (case buildOS of {+                                       Windows -> (unsafePerformIO (cygpath "-u" prefix'));+                                       _ -> prefix'+                                     }+                                    ))]   withCurrentDirectory     fltkDir     (       case buildOS of         OSX -> do           rawSystemExit normal (fltkDir </> "configure") fltkFlags-          runMake+          runMake []+          runMake ["install"]           updateEnv "DYLD_LIBRARY_PATH" fltkDir           updateEnv "DYLD_LIBRARY_PATH" (fltkDir </> "lib")           updateEnv "DYLD_LIBRARY_PATH" (fltkDir </> "src")@@ -80,7 +87,8 @@           updateEnv "PATH" fltkDir         Windows -> do           rawSystemExit normal "sh" ([(fltkDir </> "configure")] ++ fltkFlags)-          runMake+          runMake []+          runMake ["install"]           let path = windowsFriendlyPaths fltkDir           updateEnv "INCLUDE_PATH" path           updateEnv "LD_LIBRARY_PATH" (path </> "lib")@@ -90,7 +98,8 @@           updateEnv "PATH" path         _ -> do           rawSystemExit normal (fltkDir </> "configure") fltkFlags-          runMake+          runMake []+          runMake ["install"]           updateEnv "INCLUDE_PATH" fltkDir           updateEnv "LD_LIBRARY_PATH" (fltkDir </> "lib")           updateEnv "LD_LIBRARY_PATH" (fltkDir </> "src")@@ -102,7 +111,7 @@ myPreConf :: Args -> ConfigFlags -> IO HookedBuildInfo myPreConf args flags = do    if (bundledBuild flags)-   then putStrLn "Building bundled FLTK" >> buildFltk+   then putStrLn "Building bundled FLTK" >> buildFltk (bundlePrefix flags "")    else return ()    putStrLn "Running autoconf ..."    case buildOS of@@ -156,26 +165,32 @@              haystack)  bundledBuild flags = flagIsSet (FlagName "bundled") flags+bundlePrefix flags dir =+  let (Distribution.Simple.Setup.Flag prefix) = configDistPref flags+  in+  makeAbsolute (prefix </> "fltk-bundled" </> dir)  cygpath o p =   let removeTrailingNewline = head . lines  in   removeTrailingNewline<$>(rawSystemStdout normal "cygpath" [o,  p]) -windowsFriendlyPaths s = +windowsFriendlyPaths s =   if (isPrefixOf "/" s)   then unsafePerformIO (cygpath "-m" s)   else s -myBuildHook pkg_descr local_bld_info user_hooks bld_flags =-  do projectRoot <- getCurrentDirectory+myBuildHook pkg_descr local_bld_info user_hooks bld_flags = do+     projectRoot <- getCurrentDirectory      let fltkDir = projectRoot </> fltkSource      let confFlags = configFlags local_bld_info      if (bundledBuild confFlags)-     then case buildOS of-          Windows -> updateEnv "PATH" (windowsFriendlyPaths fltkDir)-          _ -> updateEnv "PATH" fltkDir+     then do+       p' <- bundlePrefix confFlags "bin"+       case buildOS of+          Windows -> updateEnv "PATH" (windowsFriendlyPaths p')+          _ -> updateEnv "PATH" p'      else return ()-     let compileC = putStrLn "==Compiling C bindings==" >> runMake+     let compileC = putStrLn "==Compiling C bindings==" >> runMake []      cdirexists <- doesDirectoryExist fltkcdir      if cdirexists        then
fltkhs.cabal view
@@ -1,5 +1,5 @@ name : fltkhs-version : 0.5.1.8+version : 0.5.1.9 synopsis : FLTK bindings description:     Low level bindings for the FLTK GUI toolkit. For installation and quick start instruction please scroll all the way down to the README.
src/Graphics/UI/FLTK/LowLevel/FLTKHS.hs view
@@ -457,6 +457,8 @@ -- > stack exec fltkhs-hello-world -- @ --+-- You will be greeted by an incredibly boring little window with a button that says "Hello world",+-- if you click it, it will change to "Goodbye world." -- -- -- $InstallationLinux@@ -541,6 +543,8 @@ -- > stack exec fltkhs-hello-world -- @ --+-- You will be greeted by an incredibly boring little window with a button that says "Hello world",+-- if you click it, it will change to "Goodbye world."  -- $InstallationMacBundled -- Unfortunately Mac version older than El Capitan and Yosemite are not supported.@@ -599,7 +603,8 @@ -- > stack exec fltkhs-hello-world -- @ ---+-- You will be greeted by an incredibly boring little window with a button that says "Hello world",+-- if you click it, it will change to "Goodbye world."  -- $InstallationMac -- Unfortunately Mac version older than El Capitan and Yosemite are not supported.@@ -674,6 +679,8 @@ -- > stack exec fltkhs-hello-world -- @ --+-- You will be greeted by an incredibly boring little window with a button that says "Hello world",+-- if you click it, it will change to "Goodbye world."  -- $InstallationWindowsBundled --@@ -704,7 +711,7 @@ -- -- @ -- > pacman -Syy--- > pacmay -Syu+-- > pacman -Syu -- @ -- -- ... install packages for download and extracting packages:@@ -748,6 +755,8 @@ -- > stack exec fltkhs-hello-world -- @ --+-- You will be greeted by an incredibly boring little window with a button that says "Hello world",+-- if you click it, it will change to "Goodbye world." -- -- == Packaging A Windows Executable --@@ -887,6 +896,8 @@ -- > stack exec fltkhs-hello-world -- @ --+-- You will be greeted by an incredibly boring little window with a button that says "Hello world",+-- if you click it, it will change to "Goodbye world." -- -- == Packaging A Windows Executable --