pantry/projects/postgresql.org/libpq/package.yml
Jacob Heider da183e016c fix(psql)
2023-09-14 11:38:02 -04:00

58 lines
1.6 KiB
YAML

distributable:
url: https://ftp.postgresql.org/pub/source/v{{version.raw}}/postgresql-{{version.raw}}.tar.bz2
strip-components: 1
versions:
url: https://ftp.postgresql.org/pub/source
match: /v\d+\.\d+(\.\d+)?\//
strip:
- /^v/
- /\/$/
dependencies:
kerberos.org: '*'
openssl.org: '*'
zlib.net: '*'
unicode.org: '*'
linux:
gnu.org/readline: '*'
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
freedesktop.org/pkg-config: ^0
script: |
# remove `-w`` from CFLAGS, because it causes build to fail, ironically.
# `./configure` *specifically* checks that certain warnings are emitted.
export CFLAGS="$(echo $CFLAGS | tr ' ' '\n' | sed -e '/^-w$/d' | tr '\n' ' ')"
./configure $ARGS
make --jobs {{ hw.concurrency }}
make -C src/bin install $DIRS
make -C src/include install $DIRS
make -C src/interfaces install $DIRS
make -C src/common install $DIRS
make -C src/port install $DIRS
make -C doc install $DIRS
env:
ARGS:
- --disable-debug
- --prefix={{prefix}}
- --with-gssapi
- --with-openssl
- --libdir={{prefix}}/lib
- --includedir={{prefix}}/include
DIRS:
- libdir={{prefix}}/lib
- includedir={{prefix}}/include
- pkgincludedir={{prefix}}/include/postgresql
- includedir_server={{prefix}}/include/postgresql/server
- includedir_internal={{prefix}}/include/postgresql/internal
test:
dependencies:
tea.xyz/gx/cc: c99
script: |
cc libpq.c -lpq -o libpqtest
test "$(./libpqtest)" = 'Connection to database attempted and failed'