psqlodbc-09.02.0100.ebuild 984 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="4"
  4. inherit multilib versionator
  5. MY_MAJOR=$(get_major_version)
  6. MY_MINOR=$(get_version_component_range 2)
  7. PGSLOT="${MY_MAJOR#0}.${MY_MINOR#0}"
  8. DESCRIPTION="Official ODBC driver for PostgreSQL"
  9. HOMEPAGE="http://www.postgresql.org/"
  10. SRC_URI="mirror://postgresql/odbc/versions/src/${P}.tar.gz"
  11. SLOT="0"
  12. LICENSE="LGPL-2"
  13. KEYWORDS="~x86 ~amd64"
  14. IUSE="doc iodbc ssl threads unicode"
  15. DEPEND="dev-db/postgresql:${PGSLOT}
  16. !iodbc? ( dev-db/unixODBC )
  17. iodbc? ( dev-db/libiodbc )
  18. ssl? ( dev-libs/openssl )
  19. "
  20. RDEPEND="${DEPEND}"
  21. src_configure() {
  22. econf --with-libpq="${EROOT%/}/usr/$(get_libdir)/postgresql-${PGSLOT}/bin/pg_config" \
  23. $(use_with iodbc) \
  24. $(use_with !iodbc unixodbc) \
  25. $(use_enable ssl openssl) \
  26. $(use_enable threads pthreads) \
  27. $(use_enable unicode)
  28. }
  29. src_install() {
  30. emake DESTDIR="${D}" install
  31. dodoc readme.txt
  32. use doc && dohtml docs/*
  33. }