freetds-0.91.ebuild 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Copyright 1999-2013 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit autotools
  5. DESCRIPTION="Tabular Datastream Library"
  6. HOMEPAGE="http://www.freetds.org/"
  7. SRC_URI="http://ibiblio.org/pub/Linux/ALPHA/freetds/stable/${P}.tar.gz"
  8. LICENSE="GPL-2"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 arm hppa ia64 ~mips ppc ppc64 s390 sh sparc x86 ~amd64-fbsd ~x86-fbsd ~ppc-macos"
  11. IUSE="kerberos odbc iodbc mssql"
  12. RESTRICT="test"
  13. DEPEND="
  14. iodbc? ( dev-db/libiodbc )
  15. kerberos? ( virtual/krb5 )
  16. odbc? ( dev-db/unixODBC )"
  17. RDEPEND="${DEPEND}"
  18. src_prepare() {
  19. config_rpath_update
  20. sed -ie 's:with_iodbc/include":with_iodbc/include/iodbc":' configure.ac || die
  21. eautoreconf
  22. }
  23. src_configure() {
  24. local myconf="--with-tdsver=7.0 $(use_enable mssql msdblib)"
  25. if use iodbc ; then
  26. myconf="${myconf} --enable-odbc --with-iodbc=${EPREFIX}/usr"
  27. elif use odbc ; then
  28. myconf="${myconf} --enable-odbc --with-unixodbc=${EPREFIX}/usr"
  29. fi
  30. if use kerberos ; then
  31. myconf="${myconf} --enable-krb5"
  32. fi
  33. econf ${myconf}
  34. }
  35. src_install() {
  36. emake DESTDIR="${D}" DOCDIR="doc/${PF}" install
  37. }