freetds-1.00.1-r1.ebuild 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=6
  4. inherit autotools eutils
  5. DESCRIPTION="Tabular Datastream Library"
  6. HOMEPAGE="http://www.freetds.org/"
  7. SRC_URI="ftp://ftp.freetds.org/pub/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. default
  20. config_rpath_update
  21. sed -ie 's:with_iodbc/include":with_iodbc/include/iodbc":' configure.ac || die
  22. eautoreconf
  23. }
  24. src_configure() {
  25. local myconf="--with-tdsver=7.0 $(use_enable mssql msdblib)"
  26. if use iodbc ; then
  27. myconf="${myconf} --enable-odbc --with-iodbc=${EPREFIX}/usr"
  28. elif use odbc ; then
  29. myconf="${myconf} --enable-odbc --with-unixodbc=${EPREFIX}/usr"
  30. fi
  31. if use kerberos ; then
  32. myconf="${myconf} --enable-krb5"
  33. fi
  34. econf ${myconf}
  35. }
  36. src_install() {
  37. emake DESTDIR="${D}" DOCDIR="doc/${PF}" install
  38. }