packages feed

hsqml 0.3.4.0 → 0.3.4.1

raw patch · 5 files changed

+63/−37 lines, 5 filessetup-changed

Files

CHANGELOG view
@@ -1,5 +1,11 @@ HsQML - Release History +release-0.3.4.1 - 2016.07.21++  * Added support for Cabal 1.24 API.+  * Fixed linking shared builds against MacOS frameworks (needs Cabal 1.24+).+  * Fixed building with Qt 5.7.+ release-0.3.4.0 - 2016.02.24    * Added AutoListModel component.
Setup.hs view
@@ -30,6 +30,7 @@     post4700BaseAPI = Info.compilerVersion >= Version [7,7] []     post118CabalAPI = cabalVersion >= Version [1,17,0] []     post122CabalAPI = cabalVersion >= Version [1,21,0] []+    post124CabalAPI = cabalVersion >= Version [1,23,0] []     vnameE = VarE . mkName     vnameP = VarP . mkName     cnameE = ConE . mkName@@ -50,17 +51,27 @@             (vnameE "x") (cnameE "CLibName")         else AppE (vnameE "fromJust") $ AppE (vnameE "libraryConfig")             (vnameE "x")-    -- 'ComponentLocalBuildInfo' record changed fields in Cabal 1.18-    getCompLibName = if post118CabalAPI-        then AppE (LamE [cnameP "LibraryName" [vnameP "n"]] (vnameE "n")) $-            AppE (vnameE "head") $-            AppE (vnameE "componentLibraries") (vnameE "clbi")-        else vnameE "def"-    -- 'programFindLocation' field changed signature in Cabal 1.18-    adaptFindLoc = if post118CabalAPI-        then LamE [vnameP "f", vnameP "x", WildP] $-            AppE (vnameE "f") (vnameE "x")-        else vnameE "id"+    -- 'ComponentLocalBuildInfo' record changed fields in Cabal 1.18 and 1.24+    getCompLibName =+        case () of+          _ | post124CabalAPI -> vnameE "def"+            | post118CabalAPI ->+                AppE (LamE [cnameP "LibraryName" [vnameP "n"]] (vnameE "n")) $+                AppE (vnameE "head") $+                AppE (vnameE "componentLibraries") (vnameE "clbi")+            | otherwise -> vnameE "def"+    -- 'programFindLocation' field changed signature in Cabal 1.18 and 1.24+    adaptFindLoc =+        case () of+          _ | post124CabalAPI ->+                LamE [vnameP "f", vnameP "x", WildP] $+                AppE (AppE (vnameE "fmap") (AppE (vnameE "fmap") (AppE+                    (AppE (vnameE "flip") (cnameE "(,)")) (cnameE "[]")))) $+                AppE (vnameE "f") (vnameE "x")+            | post118CabalAPI ->+                LamE [vnameP "f", vnameP "x", WildP] $+                AppE (vnameE "f") (vnameE "x")+            | otherwise -> vnameE "id"     -- 'rawSystemStdInOut' function changed signature in Cabal 1.18     rawSystemStdErr = if post118CabalAPI         then app4E (app3E (vnameE "rawSystemStdInOut")@@ -85,6 +96,15 @@         else LamE [WildP] $ app3E (app4E (vnameE "generateRegistrationInfo")             (vnameE "verb") (vnameE "pkg") (vnameE "lib") (vnameE "lbi"))             (vnameE "clbi") (vnameE "inp") (vnameE "dir")+    -- 'registerPackage' function changed signature in Cabal 1.24+    regPkg = if post124CabalAPI+        then LamE [vnameP "verb", vnameP "ipi", vnameP "pkgDesc", vnameP "lbi",+                vnameP "inplace", vnameP "pkgDb"] $+            app3E (app3E (vnameE "registerPackage") (vnameE "verb")+                (AppE (vnameE "compiler") (vnameE "lbi"))+                (AppE (vnameE "withPrograms") (vnameE "lbi")))+                (vnameE "inplace") (vnameE "pkgDb") (vnameE "ipi")+        else vnameE "registerPackage"     in return [         FunD (mkName "setEnvShim") [             Clause [] (NormalB setEnvShim) []],@@ -102,7 +122,9 @@         FunD (mkName "genRegInfo") [             Clause [vnameP "verb", vnameP "pkg", vnameP "lib", vnameP "lbi",                 vnameP "clbi", vnameP "inp", vnameP "dir"] (-                    NormalB genRegInfo) []]])+                    NormalB genRegInfo) []],+        FunD (mkName "regPkg") [+            Clause [] (NormalB regPkg) []]])  main :: IO () main = do@@ -170,15 +192,12 @@  substPaths :: Maybe FilePath -> Maybe FilePath -> BuildInfo -> BuildInfo substPaths mocPath cppPath build =-  let toRoot = takeDirectory . takeDirectory . fromMaybe ""-      substPath = replace "/QT_ROOT" (toRoot mocPath) .-        replace "/SYS_ROOT" (toRoot cppPath)-  in build {ccOptions = map substPath $ ccOptions build,-            ldOptions = map substPath $ ldOptions build,-            extraLibDirs = map substPath $ extraLibDirs build,-            includeDirs = map substPath $ includeDirs build,-            options = mapSnd (map substPath) $ options build,-            customFieldsBI = mapSnd substPath $ customFieldsBI build}+  let escapeStr = init . tail . show+      toRoot = escapeStr . takeDirectory . takeDirectory . fromMaybe ""+  in read .+     replace "/QT_ROOT" (toRoot mocPath) .+     replace "/SYS_ROOT" (toRoot cppPath) .+     replace "-hide-option-" "-" $ show build  buildWithQt ::   PackageDescription -> LocalBuildInfo -> UserHooks -> BuildFlags -> IO ()@@ -313,7 +332,7 @@     _ | fromFlag (regGenScript flags) ->       die "Registration scripts are not implemented."       | otherwise -> -      registerPackage verb instPkgInfo' pkg lbi inplace pkgDb+      regPkg verb instPkgInfo' pkg lbi inplace pkgDb regWithQt pkgDesc _ _ flags =   setupMessage (fromFlag $ regVerbosity flags)      "Package contains no library to register:" (packageId pkgDesc)
SetupNoTH.hs view
@@ -42,6 +42,8 @@ -- 'generateRegistrationInfo' function will change signature in Cabal 1.22 genRegInfo verb pkg lib lbi clbi inp dir _ =     generateRegistrationInfo verb pkg lib lbi clbi inp dir+-- 'registerPackage' function will change signature in Cabal 1.24+regPkg = registerPackage  main :: IO () main = do@@ -109,15 +111,12 @@  substPaths :: Maybe FilePath -> Maybe FilePath -> BuildInfo -> BuildInfo substPaths mocPath cppPath build =-  let toRoot = takeDirectory . takeDirectory . fromMaybe ""-      substPath = replace "/QT_ROOT" (toRoot mocPath) .-        replace "/SYS_ROOT" (toRoot cppPath)-  in build {ccOptions = map substPath $ ccOptions build,-            ldOptions = map substPath $ ldOptions build,-            extraLibDirs = map substPath $ extraLibDirs build,-            includeDirs = map substPath $ includeDirs build,-            options = mapSnd (map substPath) $ options build,-            customFieldsBI = mapSnd substPath $ customFieldsBI build}+  let escapeStr = init . tail . show+      toRoot = escapeStr . takeDirectory . takeDirectory . fromMaybe ""+  in read .+     replace "/QT_ROOT" (toRoot mocPath) .+     replace "/SYS_ROOT" (toRoot cppPath) .+     replace "-hide-option-" "-" $ show build  buildWithQt ::   PackageDescription -> LocalBuildInfo -> UserHooks -> BuildFlags -> IO ()@@ -252,7 +251,7 @@     _ | fromFlag (regGenScript flags) ->       die "Registration scripts are not implemented."       | otherwise -> -      registerPackage verb instPkgInfo' pkg lbi inplace pkgDb+      regPkg verb instPkgInfo' pkg lbi inplace pkgDb regWithQt pkgDesc _ _ flags =   setupMessage (fromFlag $ regVerbosity flags)      "Package contains no library to register:" (packageId pkgDesc)
cbits/Class.cpp view
@@ -43,7 +43,8 @@         int offset = arrayOff-(i*sizeof(QByteArrayData))+start;         QByteArrayData data = {             Q_REFCOUNT_INITIALIZE_STATIC, size-1, 0, 0, offset};-        new(&mMetaStrData[i*sizeof(QByteArrayData)]) QByteArrayData(data);+        std::memcpy(&mMetaStrData[i*sizeof(QByteArrayData)],+            &data, sizeof(QByteArrayData));     }     std::memcpy(&mMetaStrData[arrayOff], metaStrChar, strLength); 
hsqml.cabal view
@@ -1,5 +1,5 @@ Name:               hsqml-Version:            0.3.4.0+Version:            0.3.4.1 Cabal-version:      >= 1.14 Build-type:         Custom License:            BSD3@@ -9,7 +9,6 @@ Maintainer:         komadori@gekkou.co.uk Stability:          experimental Homepage:           http://www.gekkou.co.uk/software/hsqml/-Bug-reports:        http://trac.gekkou.co.uk/hsqml/ Category:           Graphics, GUI Synopsis:           Haskell binding for Qt Quick Extra-source-files:@@ -89,6 +88,7 @@         cbits/Engine.h         cbits/Manager.h         cbits/Model.h+    CC-options: --std=c++11     X-separate-cbits: True     Build-tools: c2hs     if flag(ForceGHCiLib)@@ -109,7 +109,8 @@         if os(darwin) && !flag(UsePkgConfig)             Frameworks: QtCore QtGui QtWidgets QtQml QtQuick             CC-options: -F /QT_ROOT/lib-            GHC-options: -framework-path /QT_ROOT/lib+            GHC-options: -hide-option-framework-path /QT_ROOT/lib+            GHC-shared-options: -hide-option-framework-path /QT_ROOT/lib             X-framework-dirs: /QT_ROOT/lib         else             Pkgconfig-depends:@@ -135,7 +136,7 @@         hsqml      == 0.3.*     if os(darwin) && !flag(UsePkgConfig)         -- Library not registered yet-        GHC-options: -framework-path /QT_ROOT/lib+        GHC-options: -hide-option-framework-path /QT_ROOT/lib     if flag(ThreadedTestSuite)         GHC-options: -threaded