mysql++-2.3.2.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. # Copyright 1999-2014 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit eutils
  5. DESCRIPTION="C++ API interface to the MySQL database"
  6. HOMEPAGE="http://tangentsoft.net/mysql++/"
  7. SRC_URI="http://www.tangentsoft.net/mysql++/releases/${P}.tar.gz"
  8. LICENSE="LGPL-2"
  9. SLOT="0"
  10. KEYWORDS="alpha amd64 hppa ~mips ppc sparc x86"
  11. IUSE=""
  12. RDEPEND=">=virtual/mysql-4.0"
  13. DEPEND="${RDEPEND}
  14. >=sys-devel/gcc-3"
  15. src_prepare() {
  16. epatch "${FILESDIR}"/${P}-gcc-4.3.patch
  17. for i in "${S}"/lib/*.h ; do
  18. sed -i \
  19. -e '/#include </s,mysql.h,mysql/mysql.h,g' \
  20. -e '/#include </s,mysql_version.h,mysql/mysql_version.h,g' \
  21. "${i}" || die "Failed to sed ${i} for fixing MySQL includes"
  22. done
  23. }
  24. src_configure() {
  25. local myconf
  26. # we want C++ exceptions turned on
  27. myconf="--enable-exceptions"
  28. # give threads a try
  29. myconf="${myconf} --enable-thread-check"
  30. # not including the directives to where MySQL is because it seems to
  31. # find it just fine without
  32. # force the cflags into place otherwise they get totally ignored by
  33. # configure
  34. CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" \
  35. econf ${myconf}
  36. }
  37. src_install() {
  38. default
  39. # install the docs and HTML pages
  40. dodoc README* CREDITS ChangeLog HACKERS Wishlist
  41. dohtml -r doc/html/*
  42. rm -r doc/html || die
  43. dodoc -r doc/*
  44. }