source: trunk/dports/databases/postgresql90/Portfile

Last change on this file was 146517, checked in by raimue@…, 17 months ago

Mass rev-bump dependents of port openssl due to ABI change

Disabling SSLv2 in r146162 changed the ABI of the library, leading to loading
errors for binaries with references to SSLv2 symbols.

https://lists.macosforge.org/pipermail/macports-dev/2016-March/032531.html

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.6 KB
Line 
1# -*- 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
2# $Id: Portfile 146517 2016-03-10 17:49:28Z ryandesign@macports.org $
3
4PortSystem 1.0
5PortGroup select 1.0
6PortGroup compiler_blacklist_versions 1.0
7
8#remember to update the -doc and -server as well
9name                    postgresql90
10version                 9.0.23
11revision  1
12
13categories              databases
14platforms               darwin
15maintainers             mww jwa
16license                 Permissive
17description             The most advanced open-source database available anywhere.
18long_description PostgreSQL is Object-Relational Database Management System. \
19                                It supports almost all SQL constructs, including transactions, \
20                                subselects, and user-defined types and functions. Write-ahead \
21                                logging means increased performance while retaining data \
22                                integrity.
23
24homepage                http://www.postgresql.org/
25master_sites            http://ftp3.de.postgresql.org/pub/Mirrors/ftp.postgresql.org/source/v${version}/ \
26                        postgresql:source/v${version}/
27distname                postgresql-${version}
28
29checksums           rmd160  a8751d04dfad1323e4f2d2d2d05c8868cc3008ae \
30                    sha256  3dbcbe19c814139a3f4be8bc6b49db804753cbc49979f345083e835c52b4d7de
31
32use_bzip2               yes
33
34depends_lib             port:readline path:lib/libssl.dylib:openssl port:zlib port:libxml2 port:libxslt port:ossp-uuid
35depends_build           port:bison
36depends_run             port:postgresql_select
37
38worksrcdir              postgresql-${version}
39
40set libdir              ${prefix}/lib/${name}
41configure.args  --sysconfdir=${prefix}/etc/${name} \
42                                --bindir=${libdir}/bin \
43                                --libdir=${libdir} \
44                                --includedir=${prefix}/include/${name} \
45                                --datadir=${prefix}/share/${name} \
46                                --mandir=${prefix}/share/man \
47                                --with-includes=${prefix}/include \
48                                --with-libraries=${prefix}/lib \
49                                --with-openssl \
50                                --with-bonjour \
51                                --with-readline \
52                                --with-zlib \
53                                --with-libxml \
54                                --with-libxslt \
55                                --enable-thread-safety \
56                                --enable-integer-datetimes \
57                                --with-ossp-uuid
58configure.cppflags-append       -I${prefix}/include/ossp
59
60# building psql with clang from XCode prior to 4.4 causes segfault on query; see #31717
61compiler.blacklist-append {clang < 421}
62
63if {[variant_isset universal]} {
64    configure.cflags-append     -DAC_APPLE_UNIVERSAL_BUILD
65    post-configure {
66        system "cd ${worksrcpath}/src/include \
67                && ed - pg_config.h < ${filespath}/pg_config.h.ed \
68                && touch stamp-h"
69        system "cd ${worksrcpath}/src/interfaces/ecpg/include \
70                && ed - ecpg_config.h < ${filespath}/ecpg_config.h.ed \
71                && touch stamp-h"
72    }
73}
74
75build.type              gnu
76build.target
77
78test.run                yes
79test.target             check
80
81livecheck.type  none
82
83platform darwin {
84    if {${os.major} >= 12} {
85        patchfiles-append   postgresql-uuid-ossp.patch
86    }
87}
88
89# prepare the contrib modules
90set contribs {}
91
92post-build {
93    set contribdirs [glob -nocomplain -type d ${worksrcpath}/contrib/*]
94    foreach d [lsort $contribdirs] {
95        if { [file exists $d/Makefile] } {
96            lappend contribs [file tail $d]
97        }
98    }
99        foreach contrib ${contribs} {
100                system "cd ${worksrcpath}/contrib/${contrib}/ && ${build.cmd}"
101        }
102}
103
104post-destroot {
105        foreach contrib ${contribs} {
106                system "echo contrib: \"${contrib}\""
107                system "cd ${worksrcpath}/contrib/${contrib}/ && \
108                        ${destroot.cmd} install ${destroot.destdir} && touch DONE"
109        }
110        system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql90"
111        file delete -force ${destroot}${prefix}/share/doc/postgresql \
112                ${destroot}${prefix}/share/man
113       
114        reinplace -E "s#-arch\[\[:space:\]\]+\[\[:alnum:\]_\]+##g" \
115            ${destroot}${prefix}/lib/postgresql90/pgxs/src/Makefile.global
116       
117        reinplace -E "s#^CFLAGS =#CFLAGS +=#g" \
118            ${destroot}${prefix}/lib/postgresql90/pgxs/src/Makefile.global
119           
120        reinplace -E "s#^(\[\[:space:\]\]+)LDFLAGS =#\\1LDFLAGS +=#g" \
121            ${destroot}${prefix}/lib/postgresql90/pgxs/src/Makefile.global
122}
123
124select.group    postgresql
125select.file     ${filespath}/${name}
126
127variant python requires python27 description {add support for python} {
128}
129
130variant python27 description {add support for python 2.7} {
131        depends_lib-append              port:python27
132        configure.args-append   --with-python
133        configure.python                ${prefix}/bin/python2.7
134}
135
136variant krb5 description {add support for Kerberos 5 authentication} {
137        configure.args-append   --with-krb5
138}
139
140variant perl description {add Perl support} {
141        depends_lib-append                      bin:perl:perl5
142        configure.args-append           --with-perl
143}
144
145variant tcl description {add Tcl support} {
146        depends_lib-append                      port:tcl
147        configure.args-append           --with-tcl --with-tclconfig=${prefix}/lib
148        configure.env-append            TCLSH=${prefix}/bin/tclsh
149}
150
151post-install {
152    ui_msg "\nTo use the postgresql server, install the ${name}-server port"
153}
154
Note: See TracBrowser for help on using the repository browser.