Merge pull request #10599 from cabalism/typo/depency
[cabal.git] / Cabal-tests / tests / ParserTests / regressions / libpq2.cabal
blobbc61c0f4707a55d03b0e5d484d4ab68141d5f296
1 Cabal-version:       3.0
2 Name:                postgresql-libpq
3 Version:             0.9.4.2
4 Synopsis:            low-level binding to libpq
6 Description:         This is a binding to libpq: the C application
7                      programmer's interface to PostgreSQL. libpq is a
8                      set of library functions that allow client
9                      programs to pass queries to the PostgreSQL
10                      backend server and to receive the results of
11                      these queries.
13 Homepage:            https://github.com/phadej/postgresql-libpq
14 License:             BSD-3-Clause
15 License-file:        LICENSE
16 Author:              Grant Monroe, Leon P Smith, Joey Adams
17 Maintainer:          Oleg Grenrus <oleg.grenrus@iki.fi>
18 Copyright:           (c) 2010 Grant Monroe
19                      (c) 2011 Leon P Smith
20 Category:            Database
21 Build-type:          Custom
22 Extra-source-files:  cbits/noticehandlers.h
23 Tested-with:
24   GHC==7.0.4,
25   GHC==7.2.2,
26   GHC==7.4.2,
27   GHC==7.6.3,
28   GHC==7.8.4,
29   GHC==7.10.3,
30   GHC==8.0.2,
31   GHC==8.2.2,
32   GHC==8.4.3,
33   GHC==8.6.1
35 extra-source-files:
36   CHANGELOG.md
38 Custom-setup
39   setup-depends:
40     base >= 4.3 && <5, Cabal >= 1.10 && <2.5
42 -- If true,  use pkg-config,  otherwise use the pg_config based build
43 -- configuration
44 Flag use-pkg-config
45   default: False
46   manual:  True
48 Library
49   hs-source-dirs:      src
50   c-sources:           cbits/noticehandlers.c
51   include-dirs:        cbits
52   Exposed-modules:     Database.PostgreSQL.LibPQ
53                        Database.PostgreSQL.LibPQ.Internal
54   Build-depends:       base       >=4.3     && <4.13
55                      , bytestring >=0.9.1.0 && <0.11
57   if !os(windows)
58     Build-depends:     unix  >=2.4.2.0 && <2.8
60   if os(windows)
61     Build-depends:     Win32 >=2.2.0.2 && <2.7
63   GHC-Options:       -Wall
65   if flag(use-pkg-config)
66     Pkgconfig-depends:   libpq >=9.3h
67   else
68     if os(windows)
69       -- Due to https://sourceware.org/bugzilla/show_bug.cgi?id=22948,
70       -- if we specify pq instead of libpq, then ld might link against
71       -- libpq.dll directly, which can lead to segfaults. As a temporary hack,
72       -- we force ld to link against the libpq.lib import library directly
73       -- by specifying libpq here.
74       Extra-Libraries:   libpq
75     else
76       Extra-Libraries:     pq
77       if os(openbsd)
78         Extra-Libraries:     crypto ssl
80   -- Other-modules:
81   build-tool-depends:       hsc2hs:hsc2hs