hlibsass 0.1.8.0 → 0.1.8.1
raw patch · 3 files changed
+27/−18 lines, 3 filessetup-changedPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
Files
- CHANGELOG.md +5/−0
- Setup.hs +19/−15
- hlibsass.cabal +3/−3
CHANGELOG.md view
@@ -1,6 +1,10 @@ # Change Log All notable changes to this project will be documented in this file. +## [0.1.8.1] - 2020-02-21+### Changed+- Support Cabal 3+ ## [0.1.8.0] - 2018-11-25 ### Changed - Update to Libsass 3.5.5@@ -83,6 +87,7 @@ - Bindings to Libsass C API - Basic tests +[0.1.8.1]: https://github.com/jakubfijalkowski/hlibsass/compare/v0.1.8.0...v0.1.8.1 [0.1.8.0]: https://github.com/jakubfijalkowski/hlibsass/compare/v0.1.7.0...v0.1.8.0 [0.1.7.0]: https://github.com/jakubfijalkowski/hlibsass/compare/v0.1.6.1...v0.1.7.0 [0.1.6.1]: https://github.com/jakubfijalkowski/hlibsass/compare/v0.1.6.0...v0.1.6.1
Setup.hs view
@@ -8,8 +8,8 @@ LocalBuildInfo (..), absoluteInstallDirs, localPkgDescr)-import Distribution.Simple.Program.Find (findProgramOnSearchPath,- defaultProgramSearchPath)+import Distribution.Simple.Program.Find (defaultProgramSearchPath,+ findProgramOnSearchPath) import Distribution.Simple.Setup import Distribution.Simple.Utils (cabalVersion, installExecutableFile,@@ -17,7 +17,8 @@ rawSystemStdout) import Distribution.System import qualified Distribution.Verbosity as Verbosity-import System.Directory (getCurrentDirectory)+import System.Directory (doesFileExist,+ getCurrentDirectory) #if MIN_VERSION_Cabal(2, 0, 0) import Distribution.Version (mkVersion)@@ -38,23 +39,23 @@ , preBuild = updateLibDirs , postCopy = copyLibsass , postClean = cleanLibsass- , preSDist = updateLibsassVersion } -- Fix for Cabal-1.18 - it does not `copy` on `install`, so we `copy` on -- `install` manually. ;) hooksFix = if cabalVersion < mkVersion [1, 20, 0] then hooks { postInst = installLibsass } else hooks+ execMake :: Verbosity.Verbosity -> String -> String -> IO () execMake verbosity build_target target = do gmakePath <- findProgramOnSearchPath Verbosity.silent defaultProgramSearchPath "gmake"- let makeExec = case gmakePath of + let makeExec = case gmakePath of #if MIN_VERSION_Cabal(1, 24, 0) Just (p, _) -> p #else- Just p -> p+ Just p -> p #endif- Nothing -> "make"+ Nothing -> "make" baseArgs = if null build_target then [makeExec, "--directory=libsass"] else ["BUILD=" ++ build_target, makeExec, "--directory=libsass"]@@ -63,11 +64,22 @@ else baseArgs ++ [target] rawSystemExit verbosity "env" makeArgs +updateLibsassVersion :: ConfigFlags -> IO ()+updateLibsassVersion flags = do+ let verbosity = fromFlag $ configVerbosity flags+ exists <- doesFileExist "libsass/VERSION"+ unless exists $ do+ ver <- rawSystemStdout verbosity "env" [ "git", "-C", "libsass", "describe",+ "--abbrev=4", "--dirty", "--always", "--tags" ]+ writeFile "libsass/VERSION" ver++ makeLibsass :: Args -> ConfigFlags -> IO HookedBuildInfo makeLibsass _ f = do let verbosity = fromFlag $ configVerbosity f external = getCabalFlag "externalLibsass" f target = if getCabalFlag "sharedLibsass" f then "shared" else "static"+ unless external $ updateLibsassVersion f unless external $ execMake verbosity target "" return emptyHookedBuildInfo @@ -139,14 +151,6 @@ cleanLibsass :: Args -> CleanFlags -> PackageDescription -> () -> IO () cleanLibsass _ flags _ _ = execMake (fromFlag $ cleanVerbosity flags) "" "clean"--updateLibsassVersion :: Args -> SDistFlags -> IO HookedBuildInfo-updateLibsassVersion _ flags = do- let verbosity = fromFlag $ sDistVerbosity flags- ver <- rawSystemStdout verbosity "env" [ "git", "-C", "libsass", "describe",- "--abbrev=4", "--dirty", "--always", "--tags" ]- writeFile "libsass/VERSION" ver- return emptyHookedBuildInfo #if MIN_VERSION_Cabal(2, 2, 0) getCabalFlag :: String -> ConfigFlags -> Bool
hlibsass.cabal view
@@ -1,9 +1,9 @@ name: hlibsass-version: 0.1.8.0+version: 0.1.8.1 license: MIT license-file: LICENSE-author: Jakub Fijałkowski <fiolek94@gmail.com>-maintainer: fiolek94@gmail.com+author: Jakub Fijałkowski <kuba@codinginfinity.me>+maintainer: kuba@codinginfinity.me homepage: https://github.com/jakubfijalkowski/hlibsass category: Foreign build-type: Custom