pgagent-3.4.0-r1.ebuild 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. CMAKE_IN_SOURCE_BUILD=1
  5. WX_GTK_VER="3.0"
  6. inherit cmake-utils eutils wxwidgets
  7. MY_PN=${PN/a/A}
  8. KEYWORDS="amd64 x86"
  9. DESCRIPTION="${MY_PN} is a job scheduler for PostgreSQL"
  10. HOMEPAGE="http://www.pgadmin.org/download/pgagent.php"
  11. SRC_URI="mirror://postgresql/pgadmin3/release/${PN}/${MY_PN}-${PV}-Source.tar.gz"
  12. LICENSE="POSTGRESQL GPL-2"
  13. SLOT="0"
  14. IUSE=""
  15. RDEPEND=">=dev-db/postgresql-9.0.0:*
  16. x11-libs/wxGTK:${WX_GTK_VER}
  17. "
  18. DEPEND="${RDEPEND}
  19. >=dev-util/cmake-2.6
  20. "
  21. S="${WORKDIR}/${MY_PN}-${PV}-Source"
  22. src_prepare() {
  23. sed -e "s:share):share/${P}):" \
  24. -i CMakeLists.txt || die "Couldn't patch CMakeLists.txt"
  25. sed -i -e '/SET(WX_VERSION "2.8")/d' CMakeLists.txt || die
  26. }
  27. src_configure() {
  28. if has_version "x11-libs/wxGTK[X]"; then
  29. need-wxwidgets unicode
  30. else
  31. need-wxwidgets base-unicode
  32. fi
  33. mycmakeargs="-DSTATIC_BUILD:BOOLEAN=FALSE -DWX_VERSION=${WX_GTK_VER}"
  34. cmake-utils_src_configure
  35. }
  36. src_install() {
  37. cmake-utils_src_install
  38. newinitd "${FILESDIR}/pgagent.initd" ${PN}
  39. newconfd "${FILESDIR}/pgagent.confd" ${PN}
  40. rm "${ED}"/usr/{LICENSE,README} || die "Failed to remove useless docs"
  41. }