Ticket #16994: Portfile

File Portfile, 3.0 KB (added by dweber@…, 16 years ago)

port:libpqxx update to 3.0.0

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$
4
5PortSystem 1.0
6
7name        libpqxx
8version     3.0.0
9
10categories  databases devel
11
12maintainers dweber
13
14description Official C++ client API for PostgreSQL
15
16long_description \
17libpqxx is the official C++ client API for PostgreSQL, the enterprise-strength \
18open-source database software.  There are many similar libraries for PostgreSQL \
19and for other databases, some of them database independent.  Most of these, \
20however, are fairly C like in their programming style, and fail to take \
21advantage of the full power of the C++ language as it has matured since \
22the acceptance of the Standard in 1996.  What libpqxx brings you is effective \
23use of templates to reduce the inconvenience of dealing with type conversions, \
24standard C++ strings to keep you from having to worry about buffer allocation \
25and overflow attacks, exceptions to take the tedious and error prone plumbing \
26around error handling out of your hands, constructors and destructors to bring \
27resource management under control, and even basic object orientation to give \
28you some extra reliability features that would be hard to get with most other \
29database interfaces.
30
31homepage        http://pqxx.org/development/libpqxx/
32master_sites    https://pqxx.org/~jtv/tmp/pqxx/snapshot/
33#master_sites    http://pqxx.org/download/software/libpqxx/
34
35distname        libpqxx-${version}
36
37checksums \
38    md5 c5902e901c4166d849fa3b3eee01063b \
39    sha1 7cbc31679eeb16d4ac9be0cacdb1d55e0af2b76b \
40    rmd160 5ab45c90c2ecc934574b19939ccaada34adc7bc8
41
42checksum        {}
43
44set server      postgresql83
45
46platforms       darwin
47depends_lib     port:pkgconfig \
48                port:${server}
49
50configure.env-append \
51    PG_CONFIG=${prefix}/lib/${server}/bin/pg_config
52
53configure.args-append \
54    --enable-shared
55
56# Enable tests after the build phase; see
57# http://guide.macports.org/#reference.phases.test
58# http://pqxx.org/development/libpqxx/browser/trunk/README?rev=latest
59# http://pqxx.org/development/libpqxx/wiki/TestDocs
60
61test.run        no
62test.cmd        make
63test.target     check
64
65pre-test {
66    system "initdb -D ${worksrcdir}/test_libpqxx"
67    system "pg_ctl -w -D ${worksrcdir}/test_libpqxx -l ${worksrcdir}/test_libpqxx/logfile -o \"-p 5455\" start"
68    # test for existence of ${worksrcdir}/test_libpqxx/postmaster.pid to indicate success
69
70    # PGDATABASE    (name of database; defaults to your user name)
71    # PGHOST        (database server; defaults to local machine)
72    # PGPORT        (PostgreSQL port to connect to; default is 5432)
73    # PGUSER        (your PostgreSQL user ID; defaults to your login name)
74    # PGPASSWORD    (your PostgreSQL password, if needed)
75    test.env-append \
76        PGDATABASE=${worksrcdir}/test_libpqxx \
77        PGPORT=5455
78        #PGUSER
79        #PGPASSWORD
80}
81
82post-test {
83    system "pg_ctl -w -D ${worksrcdir}/test_libpqxx stop -m fast"
84    system "rm -rf ${worksrcdir}/test_libpqxx"
85}
86