Libpqxx version 3.0.1 - How to Download and Install on Mac OS X
Saturday the 7th of November, 2009

    libpqxx  most recent diff


    version 3.0.1

      View the most recent changes for the libpqxx port at: libpqxx.darwinports.com/diff
      Scroll down toward the bottom of the page to get installation instructions for libpqxx.
      The raw portfile for libpqxx 3.0.1 is located here:
      http://libpqxx.darwinports.com/dports/databases/libpqxx/Portfile
      Find related portfiles with the unique DarwinPorts.com search feature.
      Check for any related Fink projects here: pdb.finkproject.org/pdb/package.php/libpqxx


      # -*- 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
      The libpqxx Portfile 52808 2009-06-23 17:48:20Z dweber macports.org $

      PortSystem 1.0

      Name: libpqxx
      Version: 3.0.1

      Category: databases devel

      Maintainers: dweber openmaintainer

      Description: Official C++ client API for PostgreSQL

      Long Description: libpqxx is the official C++ client API for PostgreSQL, the enterprise-strength open-source database software. There are many similar libraries for PostgreSQL and for other databases, some of them database independent. Most of these, however, are fairly C like in their programming style, and fail to take advantage of the full power of the C++ language as it has matured since the acceptance of the Standard in 1996. What libpqxx brings you is effective use of templates to reduce the inconvenience of dealing with type conversions, standard C++ strings to keep you from having to worry about buffer allocation and overflow attacks, exceptions to take the tedious and error prone plumbing around error handling out of your hands, constructors and destructors to bring resource management under control, and even basic object orientation to give you some extra reliability features that would be hard to get with most other database interfaces.

      Homepage: http://pqxx.org/development/libpqxx/
      Master Sites: http://pqxx.org/download/software/libpqxx/
      #http://pqxx.org/download/software/libpqxx/libpqxx-3.0.1.tar.gz

      distname libpqxx-${version}

      Checksums: md5 23557f306821bf4cae39cca45acdf9e1 sha1 a37874511946ba340d5df2d92252177f9eb906f6 rmd160 1f842ea95ad6dd2cba2cdc2d2bd8e0be5063fb9b

      set server postgresql83

      Platform: darwin
      depends_build path:bin/pkg-config:pkgconfig
      depends_lib port:${server}

      configure.env-append PG_CONFIG=${prefix}/lib/${server}/bin/pg_config

      configure.args-append --enable-shared

      # Enable tests after the build phase; see
      # http://guide.macports.org/#reference.phases.test
      # http://pqxx.org/development/libpqxx/browser/trunk/README?rev=latest
      # http://pqxx.org/development/libpqxx/wiki/TestDocs

      test.run no
      test.cmd make
      test.target check

      pre-test {
      system "initdb -D ${worksrcdir}/test_libpqxx"
      system "pg_ctl -w -D ${worksrcdir}/test_libpqxx -l ${worksrcdir}/test_libpqxx/logfile -o \"-p 5455\" start"
      # test for existence of ${worksrcdir}/test_libpqxx/postmaster.pid to indicate success

      # PGDATABASE (name of database; defaults to your user name)
      # PGHOST (database server; defaults to local machine)
      # PGPORT (PostgreSQL port to connect to; default is 5432)
      # PGUSER (your PostgreSQL user ID; defaults to your login name)
      # PGPASSWORD (your PostgreSQL password, if needed)
      test.env-append PGDATABASE=${worksrcdir}/test_libpqxx PGPORT=5455
      #PGUSER
      #PGPASSWORD
      }

      post-test {
      system "pg_ctl -w -D ${worksrcdir}/test_libpqxx stop -m fast"
      system "rm -rf ${worksrcdir}/test_libpqxx"
      }


    If you haven't already installed Darwin Ports, you can find easy instructions for doing so at the main Darwin Ports page.

    Once Darwin Ports has been installed, in a terminal window and while online, type the following and hit return:


      %  cd /opt/local/bin/portslocation/dports/libpqxx
      % sudo port install libpqxx
      Password:
    You will then be prompted for your root password, which you should enter. You may have to wait for a few minutes while the software is retrieved from the network and installed for you. Y ou should see something that looks similar to:

      ---> Fetching libpqxx
      ---> Verifying checksum for libpqxx
      ---> Extracting libpqxx
      ---> Configuring libpqxx
      ---> Building libpqxx with target all
      ---> Staging libpqxx into destroot
      ---> Installing libpqxx
    - Make sure that you do not close the terminal window while Darwin Ports is working. Once the software has been installed, you can find further information about using libpqxx with these commands:
      %  man libpqxx
      % apropos libpqxx
      % which libpqxx
      % locate libpqxx

     Where to find more information:

    Darwin Ports



    Lightbox this page.