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 114340 2013-12-05 14:33:34Z jwa@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup select 1.0 |
---|
6 | PortGroup compiler_blacklist_versions 1.0 |
---|
7 | |
---|
8 | name postgresql93 |
---|
9 | version 9.3.2 |
---|
10 | |
---|
11 | categories databases |
---|
12 | platforms darwin |
---|
13 | maintainers mww jwa |
---|
14 | license Permissive |
---|
15 | description The most advanced open-source database available anywhere. |
---|
16 | long_description PostgreSQL is Object-Relational Database Management System. \ |
---|
17 | It supports almost all SQL constructs, including transactions, \ |
---|
18 | subselects, and user-defined types and functions. Write-ahead \ |
---|
19 | logging means increased performance while retaining data \ |
---|
20 | integrity. |
---|
21 | |
---|
22 | homepage http://www.postgresql.org/ |
---|
23 | master_sites http://ftp3.de.postgresql.org/pub/Mirrors/ftp.postgresql.org/source/v${version}/ \ |
---|
24 | postgresql:source/v${version}/ |
---|
25 | distname postgresql-${version} |
---|
26 | |
---|
27 | checksums rmd160 60373d8da2f138e713943ddb103b0ebf12379739 \ |
---|
28 | sha256 700da51a71857e092f6af1c85fcd86b46d7d5cd2f2ba343cafb1f206c20232d7 |
---|
29 | |
---|
30 | use_bzip2 yes |
---|
31 | |
---|
32 | depends_lib port:readline port:openssl port:zlib port:libxml2 port:libxslt port:ossp-uuid |
---|
33 | depends_build port:bison |
---|
34 | depends_run port:postgresql_select |
---|
35 | |
---|
36 | worksrcdir postgresql-${version} |
---|
37 | |
---|
38 | #patchfiles src_pl_plpython_Makefile.patch |
---|
39 | |
---|
40 | set libdir ${prefix}/lib/${name} |
---|
41 | configure.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 |
---|
58 | configure.cppflags-append -I${prefix}/include/ossp |
---|
59 | configure.ldflags-append -headerpad_max_install_names |
---|
60 | |
---|
61 | # building psql with clang from XCode prior to 4.4 causes segfault on query; see #31717 |
---|
62 | compiler.blacklist-append {clang < 421} macports-clang-2.9 macports-clang-3.0 |
---|
63 | |
---|
64 | if {[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 | |
---|
76 | build.type gnu |
---|
77 | build.target |
---|
78 | |
---|
79 | test.run yes |
---|
80 | test.target check |
---|
81 | |
---|
82 | livecheck.type regex |
---|
83 | #livecheck.url ${homepage} |
---|
84 | livecheck.regex (9\\.3\\.\[.0-9\]+) |
---|
85 | #livecheck.url ${homepage}/developer/beta |
---|
86 | livecheck.url ${homepage}/ftp/source/ |
---|
87 | #livecheck.regex (9\\.3\[.0-9\]+\[a-z\]+\[0-9\]) |
---|
88 | |
---|
89 | platform darwin 12 { |
---|
90 | patchfiles-append postgresql-uuid-ossp.patch |
---|
91 | } |
---|
92 | |
---|
93 | platform darwin 13 { |
---|
94 | patchfiles-append postgresql-uuid-ossp.patch |
---|
95 | } |
---|
96 | |
---|
97 | set contribs "adminpack auto_explain dblink file_fdw fuzzystrmatch hstore lo ltree oid2name pageinspect pg_archivecleanup pg_buffercache pg_freespacemap pg_standby pg_stat_statements pg_trgm pg_upgrade pg_upgrade_support pgcrypto pgrowlocks pgstattuple tablefunc uuid-ossp vacuumlo unaccent" |
---|
98 | |
---|
99 | post-build { |
---|
100 | foreach contrib ${contribs} { |
---|
101 | system "cd ${worksrcpath}/contrib/${contrib}/ && ${build.cmd}" |
---|
102 | } |
---|
103 | } |
---|
104 | |
---|
105 | post-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 psql93" |
---|
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/postgresql93/pgxs/src/Makefile.global |
---|
117 | |
---|
118 | reinplace -E "s#^CFLAGS =#CFLAGS +=#g" \ |
---|
119 | ${destroot}${prefix}/lib/postgresql93/pgxs/src/Makefile.global |
---|
120 | |
---|
121 | reinplace -E "s#^(\[\[:space:\]\]+)LDFLAGS =#\\1LDFLAGS +=#g" \ |
---|
122 | ${destroot}${prefix}/lib/postgresql93/pgxs/src/Makefile.global |
---|
123 | } |
---|
124 | |
---|
125 | select.group postgresql |
---|
126 | select.file ${filespath}/${name} |
---|
127 | |
---|
128 | variant python requires python27 description {add support for python} { |
---|
129 | } |
---|
130 | |
---|
131 | variant 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 | |
---|
137 | variant krb5 description {add support for Kerberos 5 authentication} { |
---|
138 | configure.args-append --with-krb5 |
---|
139 | } |
---|
140 | |
---|
141 | variant perl description {add Perl support} { |
---|
142 | depends_lib-append bin:perl:perl5 |
---|
143 | configure.args-append --with-perl |
---|
144 | } |
---|
145 | |
---|
146 | variant tcl description {add Tcl support} { |
---|
147 | depends_lib-append port:tcl |
---|
148 | configure.args-append --with-tcl --with-tclconfig=${prefix}/lib |
---|
149 | configure.env-append TCLSH=${prefix}/bin/tclsh |
---|
150 | } |
---|
151 | |
---|
152 | post-install { |
---|
153 | ui_msg "\nTo use the postgresql server, install the ${name}-server port" |
---|
154 | } |
---|
155 | |
---|