pantry/projects/postgresql.org/libpq/package.yml
Joe DeCapo bc5a88ce8f +libpq
2023-05-07 16:32:11 -04:00

56 lines
1.5 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: '*'
linux:
gnu.org/readline: '*'
build:
dependencies:
tea.xyz/gx/cc: c99
tea.xyz/gx/make: '*'
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'