Ticket #18855: Portfile.3

File Portfile.3, 2.9 KB (added by chepra@…, 15 years ago)

postgresql-devel Portfile

Line 
1# $Id$
2
3PortSystem 1.0
4
5name                    postgresql-devel
6version                 devel
7maintainers     nomaintainer
8categories              databases
9platforms               darwin
10description             The most advanced open-source database available anywhere.
11long_description PostgreSQL is Object-Relational Database Management System. \
12                                It supports almost all SQL constructs, including transactions, \
13                                subselects, and user-defined types and functions. Write-ahead \
14                                logging means increased performance while retaining data \
15                                integrity.
16
17homepage                http://www.postgresql.org/
18distname                pgsql
19
20fetch.type      cvs
21cvs.root        :pserver:anoncvs@anoncvs.postgresql.org:/projects/cvsroot
22cvs.password    macportrules
23cvs.date        "13-March-2009"
24
25depends_lib             port:readline port:openssl port:zlib port:libxml2 port:libxslt port:ossp-uuid
26depends_build   port:bison
27
28worksrcdir              ${distname}
29
30set libdir              ${prefix}/lib/${name}
31configure.args  --sysconfdir=${prefix}/etc/${name} \
32                                --bindir=${libdir}/bin \
33                                --libdir=${libdir} \
34                                --includedir=${prefix}/include/${name} \
35                                --datadir=${prefix}/share/${name} \
36                                --mandir=${prefix}/share/man \
37                                --without-docdir \
38                                --with-includes=${prefix}/include \
39                                --with-libraries=${prefix}/lib \
40                                --with-openssl \
41                                --with-bonjour \
42                                --with-readline \
43                                --with-zlib \
44                                --with-libxml \
45                                --with-libxslt \
46                                --enable-thread-safety \
47                                --enable-integer-datetimes \
48                                --with-ossp-uuid
49configure.cppflags-append       -I${prefix}/include/ossp
50
51build.type              gnu
52build.target
53
54test.run                yes
55test.target             check
56
57livecheck.check regex
58livecheck.url   ${homepage}
59livecheck.regex (8.4.\[0-9\]+)
60
61set contribs    "adminpack dblink fuzzystrmatch lo uuid-ossp pg_buffercache pg_trgm pgcrypto tsearch2 vacuumlo xml2"
62
63post-build {
64        foreach contrib ${contribs} {
65                system "cd ${worksrcpath}/contrib/${contrib}/ && ${build.cmd}"
66        }
67}
68
69post-destroot {
70        foreach contrib ${contribs} {
71                system "echo contrib: \"${contrib}\""
72                system "cd ${worksrcpath}/contrib/${contrib}/ && \
73                        ${destroot.cmd} install ${destroot.destdir} && touch DONE"
74        }
75        system "cd ${destroot}${prefix}/bin && ln -sf ${libdir}/bin/psql psql-devel"
76        file delete -force ${destroot}${prefix}/share/doc/${name} \
77                ${destroot}${prefix}/share/man
78}
79
80variant python description {add support for python} {
81        depends_lib-append              port:python25
82        configure.args-append   --with-python
83        configure.env-append    PYTHON=${prefix}/bin/python2.5
84}
85
86variant krb5 description {add support for Kerberos 5 authentication} {
87        configure.args-append   --with-krb5
88}
89
90variant perl description {add Perl support} {
91        depends_lib-append                      bin:perl:perl5
92        configure.args-append           --with-perl
93}
94
95variant tcl description {add Tcl support} {
96        depends_lib-append                      port:tcl
97        configure.args-append           --with-tcl --with-tclconfig=${prefix}/lib
98        configure.env-append            TCLSH=${prefix}/bin/tclsh
99}
100
101post-install {
102        ui_msg "\nTo use the postgresql server, install the postgresql-server-devel port"
103}
104