Skip to content

Commit 1cc2bcf

Browse files
committed
Use build-type: Simple when possible
1 parent e57f62d commit 1cc2bcf

16 files changed

+225
-31
lines changed

.github/workflows/haskell-ci.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,15 @@ jobs:
233233
run: |
234234
rm -f cabal.project.local
235235
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks all
236+
- name: prepare for constraint sets
237+
run: |
238+
rm -f cabal.project.local
239+
- name: constraint set no-pkg-config
240+
run: |
241+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='postgresql-libpq -use-pkg-config' all --dry-run
242+
cabal-plan topo | sort
243+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='postgresql-libpq -use-pkg-config' --dependencies-only -j2 all
244+
$CABAL v2-build $ARG_COMPILER --disable-tests --disable-benchmarks --constraint='postgresql-libpq -use-pkg-config' all
236245
- name: save cache
237246
uses: actions/cache/save@v4
238247
if: always()

.github/workflows/simple.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,13 @@ jobs:
5050
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ github.sha }}
5151
restore-keys: ${{ runner.os }}-${{ matrix.ghc }}-
5252

53-
- name: cabal.project.local
53+
- name: cabal.project (win)
5454
if: matrix.os == 'windows-latest'
55-
run: cp cabal.project.local.win cabal.project.local
55+
run: cp cabal.project.win cabal.project
56+
57+
- name: cabal.project (macos)
58+
if: matrix.os == 'macos-latest'
59+
run: cp cabal.project.macos cabal.project
5660

5761
- name: ghc-pkg dump
5862
run: ghc-pkg list

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
1+
0.10.2.0
2+
--------
3+
4+
- Change `use-pkg-config` default to `True`.
5+
Windows and macOS users may need to disable the flag if their
6+
libpq installation doesn't provide pkg-config database entry.
7+
- Split the c library dependency into separate
8+
packages, so in `pkg-config` scenario, all packages
9+
are `build-type: Simple`.
10+
111
0.10.1.0
212
--------
313

cabal.haskell-ci

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,6 @@ postgresql: True
44
-- due build-type: Custom
55
test-output-direct: False
66
haddock-components: libs
7+
8+
constraint-set no-pkg-config
9+
constraints: postgresql-libpq -use-pkg-config

cabal.project

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
packages: .
2+
packages: postgresql-libpq-pkgconfig
3+
packages: postgresql-libpq-pgconfig

cabal.project.local.win

Lines changed: 0 additions & 4 deletions
This file was deleted.

cabal.project.macos

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
packages: .
2+
packages: postgresql-libpq-pgconfig
3+
4+
constraints: unix installed
5+
6+
package postgresql-libpq
7+
flags: -use-pkg-config

cabal.project.win

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
packages: .
2+
packages: postgresql-libpq-pgconfig
3+
4+
constraints: Win32 installed
5+
6+
package postgresql-libpq
7+
flags: -use-pkg-config
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
0.10
2+
----
3+
4+
* Initial release0.10

postgresql-libpq-pgconfig/LICENSE

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
Copyright (c) 2010, Grant Monroe
2+
Copyright (c) 2011, Leon P Smith
3+
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
9+
* Redistributions of source code must retain the above copyright
10+
notice, this list of conditions and the following disclaimer.
11+
12+
* Redistributions in binary form must reproduce the above
13+
copyright notice, this list of conditions and the following
14+
disclaimer in the documentation and/or other materials provided
15+
with the distribution.
16+
17+
* Neither the name of the authors nor the names of other
18+
contributors may be used to endorse or promote products derived
19+
from this software without specific prior written permission.
20+
21+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22+
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23+
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24+
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25+
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26+
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27+
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28+
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29+
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31+
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)