pgadmin3-1.22.0.ebuild 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils multilib versionator wxwidgets
  5. DESCRIPTION="wxWidgets GUI for PostgreSQL"
  6. HOMEPAGE="http://www.pgadmin.org/"
  7. SRC_URI="mirror://postgresql/${PN}/release/v${PV}/src/${P}.tar.gz"
  8. LICENSE="POSTGRESQL"
  9. KEYWORDS="amd64 ppc x86 ~x86-fbsd"
  10. SLOT="0"
  11. IUSE="debug +databasedesigner"
  12. DEPEND="x11-libs/wxGTK:=[X,debug=]
  13. >=dev-db/postgresql-8.4.0:=
  14. >=dev-libs/libxml2-2.6.18
  15. >=dev-libs/libxslt-1.1"
  16. RDEPEND="${DEPEND}"
  17. pkg_setup() {
  18. local pgslot=$(postgresql-config show)
  19. if [[ ${pgslot//.} < 84 ]] ; then
  20. eerror "PostgreSQL slot must be set to 8.4 or higher."
  21. eerror " postgresql-config set 8.4"
  22. die "PostgreSQL slot is not set to 8.4 or higher."
  23. fi
  24. }
  25. src_prepare() {
  26. epatch "${FILESDIR}/pgadmin3-desktop.patch"
  27. epatch_user
  28. }
  29. src_configure() {
  30. WX_GTK_PV=$(best_version x11-libs/wxGTK[X,debug=])
  31. WX_GTK_VER=$(get_version_component_range 1-2 ${WX_GTK_PV#x11-libs/wxGTK-})
  32. need-wxwidgets unicode
  33. econf --with-wx-version=${WX_GTK_VER} \
  34. $(use_enable debug) \
  35. $(use_enable databasedesigner)
  36. }
  37. src_install() {
  38. emake DESTDIR="${D}" install
  39. newicon "${S}/pgadmin/include/images/pgAdmin3.png" ${PN}.png
  40. domenu "${S}/pkg/pgadmin3.desktop"
  41. # Fixing world-writable files
  42. fperms -R go-w /usr/share
  43. }