libdbi-0.9.0.ebuild 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. # Copyright 1999-2017 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=4
  4. inherit eutils autotools multilib
  5. DESCRIPTION="A database-independent abstraction layer in C"
  6. SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"
  7. HOMEPAGE="http://libdbi.sourceforge.net/"
  8. LICENSE="LGPL-2.1"
  9. IUSE="doc static-libs"
  10. KEYWORDS="alpha amd64 arm arm64 hppa ia64 m68k ~mips ppc ppc64 s390 sh sparc x86 ~x86-fbsd"
  11. SLOT=0
  12. DOCS="AUTHORS ChangeLog README README.osx TODO"
  13. RDEPEND=""
  14. DEPEND="${RDEPEND}
  15. >=sys-apps/sed-4
  16. virtual/pkgconfig
  17. doc? ( app-text/openjade )
  18. "
  19. PDEPEND=">=dev-db/libdbi-drivers-0.9.0" # On purpose, libdbi-drivers 0.8.4 does not exist
  20. src_unpack() {
  21. unpack ${A}
  22. chown -R portage:portage "${S}"
  23. }
  24. src_prepare() {
  25. #epatch "${FILESDIR}"/${PN}-0.9.0-fix-ac-macro.patch
  26. #epatch "${FILESDIR}"/libdbi-0.8.1-pkg-config.patch
  27. #cp -f "${FILESDIR}"/dbi.pc.in "${S}"/dbi.pc.in
  28. epatch "${FILESDIR}"/libdbi-0.9.0-doc-build-fix.patch
  29. # configure.in has been changed
  30. eautoreconf
  31. # should append CFLAGS, not replace them
  32. sed -i.orig -e 's/^CFLAGS = /CFLAGS += /g' src/Makefile.in
  33. }
  34. src_configure() {
  35. econf \
  36. $(use_enable doc docs) \
  37. $(use_enable static-libs static)
  38. }
  39. src_install () {
  40. default
  41. prune_libtool_files --all
  42. # syslog-ng requires dbi.pc
  43. insinto /usr/$(get_libdir)/pkgconfig/
  44. doins dbi.pc
  45. }