# -*- coding: utf-8; mode: tcl; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- vim:fenc=utf-8:ft=tcl:et:sw=4:ts=4:sts=4
PortGroup compiler_blacklist_versions 1.0
#remember to update the -doc and -server as well
maintainers {jwa @jyrkiwahlstedt}
description The most advanced open-source database available anywhere.
long_description PostgreSQL is Object-Relational Database Management System. \
It supports almost all SQL constructs, including transactions, \
subselects, and user-defined types and functions. Write-ahead \
logging means increased performance while retaining data \
homepage https://www.postgresql.org/
master_sites http://ftp3.de.postgresql.org/pub/Mirrors/ftp.postgresql.org/source/v${version}/ \
postgresql:source/v${version}/
distname postgresql-${version}
checksums rmd160 c9b438a695296abc0d6af5181a7e95758410cf1a \
sha256 0d009c08b0c82b12484950bba10ae8bfd6f0c7bafd8f086ab756c483dd231d9b \
# do not build man or html files (use postgresqlXY-doc instead)
patchfiles-append patch-no_doc.diff
depends_lib port:readline path:lib/libssl.dylib:openssl port:zlib port:libxml2 port:libxslt
depends_run port:postgresql_select
worksrcdir postgresql-${version}
set libdir ${prefix}/lib/${name}
configure.args PG_SYSROOT=disabled \
--sysconfdir=${prefix}/etc/${name} \
--includedir=${prefix}/include/${name} \
--datadir=${prefix}/share/${name} \
--docdir=${prefix}/share/doc/${name} \
--mandir=${prefix}/share/man \
--with-includes=${prefix}/include \
--with-libraries=${prefix}/lib \
configure.ldflags-append -headerpad_max_install_names
# building psql with clang from Xcode prior to 4.4 causes segfault on query; see #31717
compiler.blacklist-append {clang < 421}
notes "To use the postgresql server, install the ${name}-server port"
if {[variant_isset universal]} {
configure.cflags-append -DAC_APPLE_UNIVERSAL_BUILD
destroot.target install-world
# remember to change livecheck with first proper release
livecheck.regex (9\\.4\\.\[.0-9\]+)
livecheck.url ${homepage}/ftp/source/
#livecheck.regex (9\\.4\[.0-9\]*\[a-z\]+\[0-9\])
system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql94"