summaryrefslogtreecommitdiff
path: root/p/haskell-hsql-sqlite3/debian
diff options
context:
space:
mode:
authorJoachim Breitner <mail@joachim-breitner.de>2009-07-16 18:38:38 +0400
committerJoachim Breitner <mail@joachim-breitner.de>2009-07-16 18:38:38 +0400
commit007f48a0ca8c2e25d659ebd2fa7602d98b231639 (patch)
tree5ca6558bc321be3ccdc875c3e167e826d9900d24 /p/haskell-hsql-sqlite3/debian
parente0be7d30e597dc40ed42609f9e2b1fc2c1c35c1d (diff)
downloadDHG_packages-007f48a0ca8c2e25d659ebd2fa7602d98b231639.tar.gz
haskell-hsql-sqlite3: Forgot to add recursively
Diffstat (limited to 'p/haskell-hsql-sqlite3/debian')
-rw-r--r--p/haskell-hsql-sqlite3/debian/patches/00list2
-rwxr-xr-xp/haskell-hsql-sqlite3/debian/patches/01_update-cabal-file.dpatch17
-rwxr-xr-xp/haskell-hsql-sqlite3/debian/patches/02_update-setup-for-Cabal-1.2.dpatch90
3 files changed, 109 insertions, 0 deletions
diff --git a/p/haskell-hsql-sqlite3/debian/patches/00list b/p/haskell-hsql-sqlite3/debian/patches/00list
new file mode 100644
index 000000000..042a553ae
--- /dev/null
+++ b/p/haskell-hsql-sqlite3/debian/patches/00list
@@ -0,0 +1,2 @@
+01_update-cabal-file
+02_update-setup-for-Cabal-1.2
diff --git a/p/haskell-hsql-sqlite3/debian/patches/01_update-cabal-file.dpatch b/p/haskell-hsql-sqlite3/debian/patches/01_update-cabal-file.dpatch
new file mode 100755
index 000000000..83877b5a0
--- /dev/null
+++ b/p/haskell-hsql-sqlite3/debian/patches/01_update-cabal-file.dpatch
@@ -0,0 +1,17 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 01_update-cabal-file.dpatch by Arjan Oosting <arjan@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad haskell-hsql-sqlite3-1.7~/hsql-sqlite3.cabal haskell-hsql-sqlite3-1.7/hsql-sqlite3.cabal
+--- haskell-hsql-sqlite3-1.7~/hsql-sqlite3.cabal 2007-04-09 20:53:41.000000000 +0200
++++ haskell-hsql-sqlite3-1.7/hsql-sqlite3.cabal 2008-02-04 07:12:37.000000000 +0100
+@@ -5,5 +5,5 @@
+ category: Database
+ description: SQLite3 driver for HSQL.
+ exposed-modules: Database.HSQL.SQLite3
+-build-depends: base, hsql
++build-depends: base, hsql, old-time
+ extensions: ForeignFunctionInterface, CPP
diff --git a/p/haskell-hsql-sqlite3/debian/patches/02_update-setup-for-Cabal-1.2.dpatch b/p/haskell-hsql-sqlite3/debian/patches/02_update-setup-for-Cabal-1.2.dpatch
new file mode 100755
index 000000000..398e6caa7
--- /dev/null
+++ b/p/haskell-hsql-sqlite3/debian/patches/02_update-setup-for-Cabal-1.2.dpatch
@@ -0,0 +1,90 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 02_update-setup-for-Cabal-1.2.dpatch by Arjan Oosting <arjan@debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: No description.
+
+@DPATCH@
+diff -urNad haskell-hsql-sqlite3-1.7~/Setup.lhs haskell-hsql-sqlite3-1.7/Setup.lhs
+--- haskell-hsql-sqlite3-1.7~/Setup.lhs 2007-04-09 20:53:41.000000000 +0200
++++ haskell-hsql-sqlite3-1.7/Setup.lhs 2008-02-04 07:21:52.000000000 +0100
+@@ -2,10 +2,11 @@
+
+ \begin{code}
+ import Distribution.PackageDescription
+-import Distribution.Setup
+ import Distribution.Simple
++import Distribution.Simple.Setup
+ import Distribution.Simple.LocalBuildInfo
+-import Distribution.Simple.Utils(rawSystemVerbose)
++import Distribution.Simple.Utils(rawSystemStdout)
++import Distribution.Verbosity
+ import System.Info
+ import System.Exit
+ import System.Directory
+@@ -20,14 +21,13 @@
+ preConf args flags = do
+ try (removeFile "SQLite3.buildinfo")
+ return emptyHookedBuildInfo
+- postConf :: [String] -> ConfigFlags -> PackageDescription -> LocalBuildInfo -> IO ExitCode
++ postConf :: [String] -> ConfigFlags -> PackageDescription -> LocalBuildInfo -> IO ()
+ postConf args flags _ localbuildinfo = do
+ mb_bi <- pkgConfigBuildInfo (configVerbose flags) "sqlite3"
+ let bi = case mb_bi of
+ Just bi -> bi
+ Nothing -> emptyBuildInfo{extraLibs=["sqlite3"]}
+- writeHookedBuildInfo "SQLite3.buildinfo" (Just bi,[])
+- return ExitSuccess
++ writeHookedBuildInfo "SQLite3.buildinfo" (Just bi,[])
+ \end{code}
+
+ The following code is derived from Distribution.Simple.Configure
+@@ -46,42 +46,27 @@
+ message ("Using " ++ name ++ ": " ++ path)
+ return (Just path)
+
+-rawSystemGrabOutput :: Int -> FilePath -> [String] -> IO String
+-rawSystemGrabOutput verbose path args = do
+- when (verbose > 0) $
+- putStrLn (path ++ concatMap (' ':) args)
+- (inp,out,err,pid) <- runInteractiveProcess path args Nothing Nothing
+- exitCode <- waitForProcess pid
+- if exitCode /= ExitSuccess
+- then do errMsg <- hGetContents err
+- hPutStr stderr errMsg
+- exitWith exitCode
+- else return ()
+- hClose inp
+- hClose err
+- hGetContents out
+-
+ message :: String -> IO ()
+ message s = putStrLn $ "configure: " ++ s
+ \end{code}
+
+ Populate BuildInfo using pkg-config tool.
+ \begin{code}
+-pkgConfigBuildInfo :: Int -> String -> IO (Maybe BuildInfo)
++pkgConfigBuildInfo :: Verbosity -> String -> IO (Maybe BuildInfo)
+ pkgConfigBuildInfo verbose pkgName = do
+ mb_pkg_config_path <- findProgram "pkg-config" Nothing
+ case mb_pkg_config_path of
+ Just pkg_config_path -> do
+ message ("configuring "++pkgName++" package using pkg-config")
+- res <- rawSystemGrabOutput verbose pkg_config_path [pkgName, "--libs-only-l"]
++ res <- rawSystemStdout verbose pkg_config_path [pkgName, "--libs-only-l"]
+ let libs = map (tail.tail) (words res)
+- res <- rawSystemGrabOutput verbose pkg_config_path [pkgName, "--libs-only-L"]
++ res <- rawSystemStdout verbose pkg_config_path [pkgName, "--libs-only-L"]
+ let lib_dirs = map (tail.tail) (words res)
+- res <- rawSystemGrabOutput verbose pkg_config_path [pkgName, "--libs-only-other"]
++ res <- rawSystemStdout verbose pkg_config_path [pkgName, "--libs-only-other"]
+ let ld_opts = words res
+- res <- rawSystemGrabOutput verbose pkg_config_path [pkgName, "--cflags-only-I"]
++ res <- rawSystemStdout verbose pkg_config_path [pkgName, "--cflags-only-I"]
+ let inc_dirs = map (tail.tail) (words res)
+- res <- rawSystemGrabOutput verbose pkg_config_path [pkgName, "--cflags-only-other"]
++ res <- rawSystemStdout verbose pkg_config_path [pkgName, "--cflags-only-other"]
+ let cc_opts = words res
+ let bi = emptyBuildInfo{extraLibs=libs, extraLibDirs=lib_dirs, ldOptions=ld_opts, includeDirs=inc_dirs, ccOptions=cc_opts}
+ return (Just bi)