Ticket #16750: Portfile

File Portfile, 5.7 KB (added by darren.weber.lists@…, 16 years ago)

My current Portfile (no diffs against the current macport version)

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
3# $Id: Portfile 39612 2008-08-26 16:49:49Z jwa@macports.org $
4
5PortSystem 1.0
6
7name            postgresql83
8version         8.3.4
9
10distname        postgresql-${version}
11worksrcdir      postgresql-${version}
12
13categories      databases
14platforms       darwin
15maintainers     mww jwa
16description     The world's most advanced open-source database.
17long_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
24homepage        http://www.postgresql.org/
25master_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
29use_bzip2       yes
30
31checksums       md5 c339b9d3c0c4add64c7a76640fc93744 \
32                sha1 3e6fd905fd3fe9698b50e5376ed15b7d6e3bb602 \
33                rmd160 13cb20672b0dc6fe52346d7c906a0842e0c872ac
34
35depends_lib     port:readline \
36                port:openssl \
37                port:ossp-uuid \
38                port:zlib \
39                port:libxml2 \
40                port:libxslt
41
42depends_build   port:bison
43
44set libdir      ${prefix}/lib/${name}
45
46configure.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
65configure.cflags-append \
66                -I${prefix}/include \
67                -I${prefix}/include/ossp
68
69build.type      gnu
70build.target
71
72test.run        yes
73test.target     check
74
75livecheck.check regex
76livecheck.url   ${homepage}/versions.rss
77livecheck.regex (8.3.\[0-9\]+)
78
79set contribs    "adminpack dblink fuzzystrmatch lo uuid-ossp pg_buffercache pg_trgm pgcrypto tsearch2 vacuumlo xml2"
80
81post-build {
82    foreach contrib ${contribs} {
83        system "cd ${worksrcpath}/contrib/${contrib}/ && ${build.cmd}"
84    }
85}
86
87post-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
98post-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
111default_variants +doc +bonjour +krb5 +tclSys +perl +python
112
113
114# --enable section
115
116variant dependency description {automatic dependency tracking} {
117    configure.args-append   --enable-depend
118}
119
120variant profiling description {add profiling support} {
121    configure.args-append   --enable-profiling
122}
123
124variant debug description {add debug symbols and enable assertion checking} {
125    configure.args-append   --enable-debug --enable-cassert
126}
127
128variant nls description {add native language support} {
129    configure.args-append   --enable-nls
130}
131
132variant NOlargefile description {DISABLE large file support} {
133    configure.args-append   --disable-largefile
134}
135
136variant NOshared description {DISABLE shared libs} {
137    configure.args-append   --disable-shared
138}
139
140variant NOrpath description {DISABLE rpath search for executables} {
141    configure.args-append   --disable-rpath
142}
143
144variant NOspinlocks description {DISABLE spinlocks} {
145    configure.args-append   --disable-spinlocks
146}
147
148
149# --with section
150
151variant bonjour description {add support for Bonjour} {
152    configure.args-append   --with-bonjour
153}
154
155variant doc description {add documentation} {
156    configure.args-delete  --without-docdir
157    configure.args-append  --with-docdir=${prefix}/share/doc/${name}
158}
159
160variant krb5 description {add support for Kerberos 5 authentication} {
161    configure.args-append   --with-krb5
162}
163
164variant ldap description {add support for LDAP} {
165    configure.args-append   --with-ldap
166}
167
168variant pam description {add support for PAM authentication} {
169    configure.args-append   --with-pam
170}
171
172variant perl description {add Perl modules (PL/Perl)} {
173    depends_lib-append      bin:perl:perl5.8
174    configure.args-append   --with-perl
175}
176
177variant 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
183variant tclPort conflicts tclSys description {add Tcl modules (PL/Tcl; MacPorts Tcl)} {
184    configure.args-append   --with-tcl \
185                            --with-tclconfig=${prefix}/lib/
186}
187
188variant 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}