opendbx-1.4.5-r1.ebuild 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit flag-o-matic multilib
  5. DESCRIPTION="OpenDBX - A database abstraction layer"
  6. HOMEPAGE="http://www.linuxnetworks.de/doc/index.php/OpenDBX"
  7. SRC_URI="http://www.linuxnetworks.de/opendbx/download/${P}.tar.gz"
  8. LICENSE="LGPL-2.1"
  9. SLOT="0"
  10. KEYWORDS="amd64 x86"
  11. IUSE="firebird +mysql oracle postgres sqlite"
  12. RESTRICT="firebird? ( bindist )"
  13. DEPEND="mysql? ( virtual/mysql )
  14. postgres? ( dev-db/postgresql:* )
  15. sqlite? ( dev-db/sqlite:3 )
  16. oracle? ( dev-db/oracle-instantclient-basic )
  17. firebird? ( dev-db/firebird )"
  18. RDEPEND="${DEPEND}"
  19. pkg_setup() {
  20. if ! ( use firebird || use mysql || use oracle || use postgres || use sqlite )
  21. then
  22. ewarn "You should enable at least one of the following USE flags:"
  23. ewarn "firebird, mysql, oracle, postgres or sqlite"
  24. fi
  25. if use oracle && [[ ! -d ${ORACLE_HOME} ]]
  26. then
  27. die "Oracle support requested, but ORACLE_HOME not set to a valid directory!"
  28. fi
  29. use mysql && append-cppflags -I/usr/include/mysql
  30. use firebird && append-cppflags -I/opt/firebird/include
  31. use oracle && append-ldflags -L"${ORACLE_HOME}"/lib
  32. }
  33. src_configure() {
  34. local backends=""
  35. use firebird && backends="${backends} firebird"
  36. use mysql && backends="${backends} mysql"
  37. use oracle && backends="${backends} oracle"
  38. use postgres && backends="${backends} pgsql"
  39. use sqlite && backends="${backends} sqlite3"
  40. econf --with-backends="${backends}"
  41. }
  42. src_compile() {
  43. # bug #322221
  44. emake -j1
  45. }
  46. src_install() {
  47. emake -j1 install DESTDIR="${D}"
  48. dodoc AUTHORS ChangeLog README
  49. rm -f "${D}"/usr/$(get_libdir)/opendbx/*.{a,la}
  50. }