packages feed

hlibsass 0.1.3.0 → 0.1.4.0

raw patch · 3 files changed

+51/−17 lines, 3 filessetup-changedPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

CHANGELOG.md view
@@ -1,6 +1,10 @@ # Change Log All notable changes to this project will be documented in this file. +## [0.1.4.0] - 2015-07-10+### Fixed+- Setup copies `libsass.a` even when Cabal-1.18 is used.+ ## [0.1.3.0] - 2015-06-08 ### Added - Ability to link to existing version of libsass.@@ -45,6 +49,7 @@ - Bindings to Libsass C API - Basic tests +[0.1.4.0]: https://github.com/jakubfijalkowski/hlibsass/compare/v0.1.3.0...v0.1.4.0 [0.1.3.0]: https://github.com/jakubfijalkowski/hlibsass/compare/v0.1.2.1...v0.1.3.0 [0.1.2.1]: https://github.com/jakubfijalkowski/hlibsass/compare/v0.1.2.0...v0.1.2.1 [0.1.2.0]: https://github.com/jakubfijalkowski/hlibsass/compare/v0.1.1.1...v0.1.2.0
Setup.hs view
@@ -10,18 +10,25 @@ import           Distribution.Simple.Setup import           Distribution.Simple.Utils          (installExecutableFile,                                                      rawSystemExit,-                                                     rawSystemStdout)+                                                     rawSystemStdout,+                                                     cabalVersion) import           Distribution.System import           System.Directory                   (getCurrentDirectory) -main = defaultMainWithHooks simpleUserHooks-  {-    preConf = \a f -> makeLibsass a f >> preConf simpleUserHooks a f-  , confHook = \a f -> confHook simpleUserHooks a f >>= updateExtraLibDirs-  , postCopy = copyLibsass-  , postClean = cleanLibsass-  , preSDist = \a f -> (updateLibsassVersion a f >> preSDist simpleUserHooks a f)-  }+main = defaultMainWithHooks hooksFix+    where+        hooks = simpleUserHooks {+            preConf = \a f -> makeLibsass a f >> preConf simpleUserHooks a f+          , confHook = \a f -> confHook simpleUserHooks a f >>= updateExtraLibDirs+          , postCopy = copyLibsass+          , postClean = cleanLibsass+          , preSDist = \a f -> (updateLibsassVersion a f >> preSDist simpleUserHooks a f)+        }+        -- Fix for Cabal-1.18 - it does not `copy` on `install`, so we `copy` on+        -- `install` manually. ;)+        hooksFix = if cabalVersion < Version [1, 20, 0] []+                       then hooks { postInst = installLibsass }+                       else hooks  makeLibsass :: Args -> ConfigFlags -> IO () makeLibsass _ f =@@ -75,6 +82,28 @@                     ("libsass/lib/libsass." ++ ext)                     (libPref ++ "/libsass." ++ ext) +installLibsass :: Args -> InstallFlags -> PackageDescription -> LocalBuildInfo -> IO ()+installLibsass _ flags pkg_descr lbi =+    let libPref = libdir $ absoluteInstallDirs pkg_descr lbi NoCopyDest+        verb = fromFlag $ installVerbosity flags+        config = configFlags lbi+        external = getCabalFlag "externalLibsass" config+        Platform _ os = hostPlatform lbi+        shared = getCabalFlag "sharedLibsass" config+        ext = if shared then "so" else "a"+    in unless external $+        if os == Windows+            then do+                installExecutableFile verb+                    "libsass/lib/libsass.a"+                    (libPref ++ "/libsass.a")+                when shared $ installExecutableFile verb+                    "libsass/lib/libsass.dll"+                    (libPref ++ "/libsass.dll")+           else+                installExecutableFile verb+                    ("libsass/lib/libsass." ++ ext)+                    (libPref ++ "/libsass." ++ ext)  cleanLibsass :: Args -> CleanFlags -> PackageDescription -> () -> IO () cleanLibsass _ flags _ _ =
hlibsass.cabal view
@@ -1,5 +1,5 @@ name:                hlibsass-version:             0.1.3.0+version:             0.1.4.0 license:             MIT license-file:        LICENSE author:              Jakub Fijałkowski <fiolek94@gmail.com>@@ -9,12 +9,12 @@ build-type:          Custom cabal-version:       >= 1.10 stability:           experimental-synopsis:            Low-level bindings to libsass+synopsis:            Low-level bindings to Libsass description:-  This package provides (very) low level bindings to libsass. It uses libsass-  compiled to static library, so if you use this in your project, you have to-  link your project with C++ runtime(which libsass does automatically - links-  with /libstdc++/).+  This package provides (very) low level bindings to LibSass. By default, it+  uses LibSass compiled as a static library, so if you use this in your project,+  you have to link your project with C++ runtime (which hLibsass does+  automatically - links with /libstdc++/).   For documentation visit <https://github.com/sass/libsass>.  extra-source-files:@@ -36,12 +36,12 @@   location:          git://github.com/jakubfijalkowski/hlibsass.git  flag externalLibsass-  description:       Use libsass that is installed in the system.+  description:       Use LibSass that is installed in the system.   default:           False  flag sharedLibsass   description:-    Build libsass as a shared library (only if external_libsass = False).+    Build LibSass as a shared library (only if external_libsass = False).   default:           False  library