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 91854 2012-04-12 00:44:58Z jeremyhu@macports.org $ |
---|
3 | |
---|
4 | PortSystem 1.0 |
---|
5 | PortGroup select 1.0 |
---|
6 | |
---|
7 | name postgresql-devel |
---|
8 | version 9.2.0beta1 |
---|
9 | revision 2 |
---|
10 | epoch 2t |
---|
11 | |
---|
12 | categories databases |
---|
13 | platforms darwin |
---|
14 | license Permissive |
---|
15 | description The most advanced open-source database available anywhere. ALPHA release! |
---|
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-9.2beta1 |
---|
26 | |
---|
27 | checksums md5 1a7ce5bfae9bc2e6c20756b7f97eb20f |
---|
28 | |
---|
29 | depends_lib port:readline port:openssl port:zlib port:libxml2 port:libxslt port:ossp-uuid |
---|
30 | depends_build port:bison |
---|
31 | depends_run port:postgresql_select |
---|
32 | |
---|
33 | worksrcdir ${distname} |
---|
34 | |
---|
35 | #patchfiles src_pl_plpython_Makefile.patch |
---|
36 | |
---|
37 | set libdir ${prefix}/lib/postgresql92-beta1 |
---|
38 | configure.args --sysconfdir=${prefix}/etc/${name} \ |
---|
39 | --bindir=${libdir}/bin \ |
---|
40 | --libdir=${libdir} \ |
---|
41 | --includedir=${prefix}/include/${name} \ |
---|
42 | --datadir=${prefix}/share/${name} \ |
---|
43 | --mandir=${prefix}/share/man \ |
---|
44 | --with-includes=${prefix}/include \ |
---|
45 | --with-libraries=${prefix}/lib \ |
---|
46 | --with-openssl \ |
---|
47 | --with-bonjour \ |
---|
48 | --with-readline \ |
---|
49 | --with-zlib \ |
---|
50 | --with-libxml \ |
---|
51 | --with-libxslt \ |
---|
52 | --enable-thread-safety \ |
---|
53 | --enable-integer-datetimes \ |
---|
54 | --with-ossp-uuid |
---|
55 | configure.cppflags-append -I${prefix}/include/ossp |
---|
56 | |
---|
57 | # building psql with clang causes segfault on query; see #31717 |
---|
58 | #if {${configure.compiler} == "clang" && [vercmp ${xcodeversion} 4.4] < 0} { |
---|
59 | # configure.compiler llvm-gcc-4.2 |
---|
60 | #} |
---|
61 | |
---|
62 | #if {[variant_isset universal]} { |
---|
63 | # configure.cflags-append -DAC_APPLE_UNIVERSAL_BUILD |
---|
64 | # post-configure { |
---|
65 | # system "cd ${worksrcpath}/src/include \ |
---|
66 | # && ed - pg_config.h < ${filespath}/pg_config.h.ed \ |
---|
67 | # && touch stamp-h" |
---|
68 | # system "cd ${worksrcpath}/src/interfaces/ecpg/include \ |
---|
69 | # && ed - ecpg_config.h < ${filespath}/ecpg_config.h.ed \ |
---|
70 | # && touch stamp-h" |
---|
71 | # } |
---|
72 | #} |
---|
73 | |
---|
74 | build.type gnu |
---|
75 | build.target |
---|
76 | |
---|
77 | test.run yes |
---|
78 | test.target check |
---|
79 | |
---|
80 | livecheck false |
---|
81 | #livecheck.type regex |
---|
82 | #livecheck.url ${homepage} |
---|
83 | #livecheck.regex (9\\.1\\.\[.0-9\]+) |
---|
84 | #livecheck.url ${homepage}/developer/beta |
---|
85 | #livecheck.regex (9\\.1\[a-z\]+\[.0-9\]+) |
---|
86 | |
---|
87 | set contribs "adminpack dblink fuzzystrmatch lo uuid-ossp pg_buffercache pg_trgm pgcrypto tsearch2 vacuumlo xml2" |
---|
88 | |
---|
89 | post-build { |
---|
90 | foreach contrib ${contribs} { |
---|
91 | system "cd ${worksrcpath}/contrib/${contrib}/ && ${build.cmd}" |
---|
92 | } |
---|
93 | } |
---|
94 | |
---|
95 | post-destroot { |
---|
96 | foreach contrib ${contribs} { |
---|
97 | system "echo contrib: \"${contrib}\"" |
---|
98 | system "cd ${worksrcpath}/contrib/${contrib}/ && \ |
---|
99 | ${destroot.cmd} install ${destroot.destdir} && touch DONE" |
---|
100 | } |
---|
101 | system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql92-trunk" |
---|
102 | file delete -force ${destroot}${prefix}/share/doc/postgresql \ |
---|
103 | ${destroot}${prefix}/share/man |
---|
104 | } |
---|
105 | |
---|
106 | select.group postgresql |
---|
107 | select.file ${filespath}/${name} |
---|
108 | |
---|
109 | variant python description {add support for python} { |
---|
110 | depends_lib-append port:python27 |
---|
111 | configure.args-append --with-python |
---|
112 | configure.python ${prefix}/bin/python2.7 |
---|
113 | } |
---|
114 | |
---|
115 | variant krb5 description {add support for Kerberos 5 authentication} { |
---|
116 | configure.args-append --with-krb5 |
---|
117 | } |
---|
118 | |
---|
119 | variant perl description {add Perl support} { |
---|
120 | depends_lib-append bin:perl:perl5 |
---|
121 | configure.args-append --with-perl |
---|
122 | } |
---|
123 | |
---|
124 | variant tcl description {add Tcl support} { |
---|
125 | depends_lib-append port:tcl |
---|
126 | configure.args-append --with-tcl --with-tclconfig=${prefix}/lib |
---|
127 | configure.env-append TCLSH=${prefix}/bin/tclsh |
---|
128 | } |
---|
129 | |
---|
130 | post-install { |
---|
131 | ui_msg "\nTo use the postgresql server, install the ${name}-server port" |
---|
132 | } |
---|
133 | |
---|