You've already forked macports-ports
mirror of
https://github.com/macports/macports-ports.git
synced 2026-07-12 18:20:25 -07:00
174 lines
6.3 KiB
Tcl
174 lines
6.3 KiB
Tcl
# -*- 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
|
|
|
|
PortSystem 1.0
|
|
PortGroup compilers 1.0
|
|
PortGroup muniversal 1.0
|
|
PortGroup openssl 1.0
|
|
|
|
#remember to update the -doc and -server as well
|
|
name postgresql14
|
|
version 14.23
|
|
revision 0
|
|
|
|
categories databases
|
|
maintainers {gmail.com:davidgilman1 @dgilman} \
|
|
openmaintainer
|
|
license Permissive
|
|
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 \
|
|
integrity.
|
|
|
|
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 ef8a8fb7f3cc896c900e7ffc67371f811dbf24ca \
|
|
sha256 cc7216822b546330e29c2f91e123c8734a4c41795082145bb962aa712e8c94a5 \
|
|
size 22586931
|
|
|
|
use_bzip2 yes
|
|
|
|
# do not build man or html files (use postgresqlXY-doc instead)
|
|
patchfiles-append patch-no_doc.diff
|
|
|
|
# https://trac.macports.org/ticket/66060
|
|
# https://postgrespro.ru/list/thread-id/2551610
|
|
# The problem is specific to PPC: https://github.com/macports/macports-ports/pull/16460
|
|
platform darwin powerpc {
|
|
patchfiles-append patch-icu.diff
|
|
}
|
|
|
|
openssl.branch 3
|
|
depends_lib port:readline port:zlib port:libxml2 port:libxslt path:lib/pkgconfig/icu-uc.pc:icu path:lib/libgssapi_krb5.dylib:kerberos5
|
|
depends_build port:bison port:pkgconfig
|
|
depends_run port:postgresql_select-14
|
|
|
|
worksrcdir postgresql-${version}
|
|
|
|
if {${universal_possible} && [variant_isset universal]} {
|
|
set zicpath ${worksrcpath}-${build_arch}/src/timezone/zic
|
|
} else {
|
|
set zicpath ${worksrcpath}/src/timezone/zic
|
|
}
|
|
set libdir ${prefix}/lib/${name}
|
|
configure.args PG_SYSROOT=disabled \
|
|
ZIC=${zicpath} \
|
|
--sysconfdir=${prefix}/etc/${name} \
|
|
--bindir=${libdir}/bin \
|
|
--libdir=${libdir} \
|
|
--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 \
|
|
--with-openssl \
|
|
--with-bonjour \
|
|
--with-readline \
|
|
--with-zlib \
|
|
--with-libxml \
|
|
--with-libxslt \
|
|
--with-gssapi \
|
|
--enable-thread-safety \
|
|
--with-uuid=e2fs \
|
|
--with-icu
|
|
|
|
configure.universal_args-delete --disable-dependency-tracking
|
|
|
|
# building psql with clang from Xcode prior to 4.4 causes segfault on query; see #31717
|
|
compiler.blacklist-append {clang < 421}
|
|
compilers.choose cc cxx
|
|
compilers.setup -gcc -fortran -clang33 -clang34 -clang37
|
|
notes "To use the postgresql server as a startup item install the ${name}-server port."
|
|
|
|
if {${universal_possible} && [variant_isset universal]} {
|
|
configure.cflags-append -DAC_APPLE_UNIVERSAL_BUILD
|
|
}
|
|
|
|
build.type gnu
|
|
build.target world
|
|
|
|
destroot.target install-world
|
|
|
|
test.run yes
|
|
test.target check
|
|
|
|
# remember to change livecheck with first proper release
|
|
livecheck.type regex
|
|
#livecheck.regex (14\\.\[.0-9\]*\[a-z\]+\[0-9\])
|
|
#livecheck.regex (14\[a-z\]+\[0-9\])
|
|
livecheck.regex (14\\.\[.0-9\]+)
|
|
livecheck.url ${homepage}/ftp/source/
|
|
|
|
post-destroot {
|
|
ln -s ${libdir}/bin/psql ${destroot}${prefix}/bin/psql14
|
|
# delete buggy symlink - this can be removed 2025/02
|
|
file delete -force ${portdbpath}/psql14
|
|
|
|
reinplace -E "s#^CFLAGS =#CFLAGS +=#g" \
|
|
${destroot}${prefix}/lib/${name}/pgxs/src/Makefile.global
|
|
}
|
|
|
|
if {!${universal_possible} || ![variant_isset universal]} {
|
|
post-destroot {
|
|
reinplace -E "s#-arch\[\[:space:\]\]+\[\[:alnum:\]_\]+##g" \
|
|
${destroot}${prefix}/lib/${name}/pgxs/src/Makefile.global
|
|
}
|
|
} else {
|
|
merger-post-destroot {
|
|
foreach arch ${configure.universal_archs} {
|
|
reinplace -E "s#-arch\[\[:space:\]\]+\[\[:alnum:\]_\]+##g" \
|
|
${destroot}-${arch}${prefix}/lib/${name}/pgxs/src/Makefile.global
|
|
|
|
reinplace -E "s#${worksrcpath}-${arch}#${worksrcpath}#g" \
|
|
${destroot}-${arch}${prefix}/lib/${name}/pgxs/src/Makefile.global
|
|
}
|
|
}
|
|
}
|
|
|
|
variant python requires python27 description {add support for python} {
|
|
}
|
|
|
|
variant python27 conflicts python3 description {add support for python 2.7} {
|
|
depends_lib-append port:python27
|
|
configure.args-append --with-python
|
|
configure.python ${prefix}/bin/python2.7
|
|
}
|
|
|
|
variant python3 conflicts python27 description {add support for python 3.x} {
|
|
depends_lib-append port:python313
|
|
configure.args-append --with-python
|
|
configure.python ${prefix}/bin/python3.13
|
|
}
|
|
|
|
variant perl description {add Perl support} {
|
|
depends_lib-append bin:perl:perl5
|
|
configure.args-append --with-perl
|
|
}
|
|
|
|
variant tcl description {add Tcl support} {
|
|
depends_lib-append port:tcl
|
|
configure.args-append --with-tcl --with-tclconfig=${prefix}/lib
|
|
configure.env-append TCLSH=${prefix}/bin/tclsh
|
|
}
|
|
|
|
variant llvm description {add support for JIT compilation} {
|
|
set llvm_ver 20
|
|
|
|
foreach clang ${compilers.clang_variants} {
|
|
if { [variant_exists ${clang}] && [variant_isset ${clang}] } {
|
|
set clang_port_ver [string range ${clang} 5 6]
|
|
set llvm_ver ${clang_port_ver}
|
|
}
|
|
}
|
|
|
|
depends_lib-append port:llvm-${llvm_ver}
|
|
configure.args-append --with-llvm
|
|
configure.env-append LLVM_CONFIG=${prefix}/libexec/llvm-${llvm_ver}/bin/llvm-config \
|
|
CLANG=${configure.cc}
|
|
}
|