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 | |
---|
3 | # $Id: Portfile 39612 2008-08-26 16:49:49Z jwa@macports.org $ |
---|
4 | |
---|
5 | PortSystem 1.0 |
---|
6 | |
---|
7 | name postgresql83 |
---|
8 | version 8.3.4 |
---|
9 | |
---|
10 | distname postgresql-${version} |
---|
11 | worksrcdir postgresql-${version} |
---|
12 | |
---|
13 | categories databases |
---|
14 | platforms darwin |
---|
15 | maintainers mww jwa |
---|
16 | description The world's most advanced open-source database. |
---|
17 | long_description \ |
---|
18 | 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 | |
---|
24 | homepage http://www.postgresql.org/ |
---|
25 | master_sites http://www.postgresql.org/ftp/source/v${version}/ \ |
---|
26 | ftp://ftp7.us.postgresql.org/pub/postgresql/source/v${version}/ \ |
---|
27 | postgresql:source/v${version}/ |
---|
28 | |
---|
29 | use_bzip2 yes |
---|
30 | |
---|
31 | checksums md5 c339b9d3c0c4add64c7a76640fc93744 \ |
---|
32 | sha1 3e6fd905fd3fe9698b50e5376ed15b7d6e3bb602 \ |
---|
33 | rmd160 13cb20672b0dc6fe52346d7c906a0842e0c872ac |
---|
34 | |
---|
35 | depends_lib port:readline \ |
---|
36 | port:openssl \ |
---|
37 | port:ossp-uuid \ |
---|
38 | port:zlib \ |
---|
39 | port:libxml2 \ |
---|
40 | port:libxslt |
---|
41 | |
---|
42 | depends_build port:bison |
---|
43 | |
---|
44 | set libdir ${prefix}/lib/${name} |
---|
45 | |
---|
46 | configure.args-append \ |
---|
47 | --sysconfdir=${prefix}/etc/${name} \ |
---|
48 | --bindir=${libdir}/bin \ |
---|
49 | --libdir=${libdir} \ |
---|
50 | --includedir=${prefix}/include/${name} \ |
---|
51 | --datadir=${prefix}/share/${name} \ |
---|
52 | --mandir=${prefix}/share/man \ |
---|
53 | --enable-thread-safety \ |
---|
54 | --enable-integer-datetimes \ |
---|
55 | --without-docdir \ |
---|
56 | --with-includes=${prefix}/include \ |
---|
57 | --with-libraries=${prefix}/lib \ |
---|
58 | --with-openssl \ |
---|
59 | --with-ossp-uuid \ |
---|
60 | --with-readline \ |
---|
61 | --with-zlib \ |
---|
62 | --with-libxml \ |
---|
63 | --with-libxslt |
---|
64 | |
---|
65 | configure.cflags-append \ |
---|
66 | -I${prefix}/include \ |
---|
67 | -I${prefix}/include/ossp |
---|
68 | |
---|
69 | build.type gnu |
---|
70 | build.target |
---|
71 | |
---|
72 | test.run yes |
---|
73 | test.target check |
---|
74 | |
---|
75 | livecheck.check regex |
---|
76 | livecheck.url ${homepage}/versions.rss |
---|
77 | livecheck.regex (8.3.\[0-9\]+) |
---|
78 | |
---|
79 | set contribs "adminpack dblink fuzzystrmatch lo uuid-ossp pg_buffercache pg_trgm pgcrypto tsearch2 vacuumlo xml2" |
---|
80 | |
---|
81 | post-build { |
---|
82 | foreach contrib ${contribs} { |
---|
83 | system "cd ${worksrcpath}/contrib/${contrib}/ && ${build.cmd}" |
---|
84 | } |
---|
85 | } |
---|
86 | |
---|
87 | post-destroot { |
---|
88 | foreach contrib ${contribs} { |
---|
89 | system "echo contrib: \"${contrib}\"" |
---|
90 | system "cd ${worksrcpath}/contrib/${contrib}/ && \ |
---|
91 | ${destroot.cmd} install ${destroot.destdir} && touch DONE" |
---|
92 | } |
---|
93 | system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql83" |
---|
94 | file delete -force ${destroot}${prefix}/share/doc/${name} \ |
---|
95 | ${destroot}${prefix}/share/man |
---|
96 | } |
---|
97 | |
---|
98 | post-install { |
---|
99 | ui_msg "\ |
---|
100 | \nTo use the postgresql server, install the ${name}-server port\ |
---|
101 | \n" |
---|
102 | |
---|
103 | if {[variant_isset doc]} { |
---|
104 | ui_msg "\nDocumentation can be found in\n\ |
---|
105 | ${prefix}/share/doc/${name}/html/\n\ |
---|
106 | Update this path in pgAdmin3 Preferences:General\n" |
---|
107 | } |
---|
108 | } |
---|
109 | |
---|
110 | |
---|
111 | default_variants +doc +bonjour +krb5 +tclSys +perl +python |
---|
112 | |
---|
113 | |
---|
114 | # --enable section |
---|
115 | |
---|
116 | variant dependency description {automatic dependency tracking} { |
---|
117 | configure.args-append --enable-depend |
---|
118 | } |
---|
119 | |
---|
120 | variant profiling description {add profiling support} { |
---|
121 | configure.args-append --enable-profiling |
---|
122 | } |
---|
123 | |
---|
124 | variant debug description {add debug symbols and enable assertion checking} { |
---|
125 | configure.args-append --enable-debug --enable-cassert |
---|
126 | } |
---|
127 | |
---|
128 | variant nls description {add native language support} { |
---|
129 | configure.args-append --enable-nls |
---|
130 | } |
---|
131 | |
---|
132 | variant NOlargefile description {DISABLE large file support} { |
---|
133 | configure.args-append --disable-largefile |
---|
134 | } |
---|
135 | |
---|
136 | variant NOshared description {DISABLE shared libs} { |
---|
137 | configure.args-append --disable-shared |
---|
138 | } |
---|
139 | |
---|
140 | variant NOrpath description {DISABLE rpath search for executables} { |
---|
141 | configure.args-append --disable-rpath |
---|
142 | } |
---|
143 | |
---|
144 | variant NOspinlocks description {DISABLE spinlocks} { |
---|
145 | configure.args-append --disable-spinlocks |
---|
146 | } |
---|
147 | |
---|
148 | |
---|
149 | # --with section |
---|
150 | |
---|
151 | variant bonjour description {add support for Bonjour} { |
---|
152 | configure.args-append --with-bonjour |
---|
153 | } |
---|
154 | |
---|
155 | variant doc description {add documentation} { |
---|
156 | configure.args-delete --without-docdir |
---|
157 | configure.args-append --with-docdir=${prefix}/share/doc/${name} |
---|
158 | } |
---|
159 | |
---|
160 | variant krb5 description {add support for Kerberos 5 authentication} { |
---|
161 | configure.args-append --with-krb5 |
---|
162 | } |
---|
163 | |
---|
164 | variant ldap description {add support for LDAP} { |
---|
165 | configure.args-append --with-ldap |
---|
166 | } |
---|
167 | |
---|
168 | variant pam description {add support for PAM authentication} { |
---|
169 | configure.args-append --with-pam |
---|
170 | } |
---|
171 | |
---|
172 | variant perl description {add Perl modules (PL/Perl)} { |
---|
173 | depends_lib-append bin:perl:perl5.8 |
---|
174 | configure.args-append --with-perl |
---|
175 | } |
---|
176 | |
---|
177 | variant python description {add Python modules (PL/Python)} { |
---|
178 | depends_lib-append port:python25 |
---|
179 | configure.args-append --with-python |
---|
180 | configure.env-append PYTHON=${prefix}/bin/python2.5 |
---|
181 | } |
---|
182 | |
---|
183 | variant tclPort conflicts tclSys description {add Tcl modules (PL/Tcl; MacPorts Tcl)} { |
---|
184 | configure.args-append --with-tcl \ |
---|
185 | --with-tclconfig=${prefix}/lib/ |
---|
186 | } |
---|
187 | |
---|
188 | variant tclSys conflicts tclPort description {add Tcl modules (PL/Tcl; System Tcl framework)} { |
---|
189 | configure.args-append --with-tcl \ |
---|
190 | --with-tclconfig=/System/Library/Frameworks/Tcl.framework/ |
---|
191 | } |
---|