source: trunk/dports/databases/postgresql94/Portfile

Last change on this file was 154321, checked in by jwa@…, 11 months ago

postgresql94: version bump to 9.4.10

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