pgadmin3-1.22.1-r1.ebuild 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. # Copyright 1999-2017 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="
  13. x11-libs/wxGTK:3.0=[X]
  14. >=dev-db/postgresql-8.4.0:=
  15. >=dev-libs/libxml2-2.6.18
  16. >=dev-libs/libxslt-1.1"
  17. RDEPEND="${DEPEND}"
  18. pkg_setup() {
  19. local pgslot=$(postgresql-config show)
  20. if [[ ${pgslot//.} < 84 ]] ; then
  21. eerror "PostgreSQL slot must be set to 8.4 or higher."
  22. eerror " postgresql-config set 8.4"
  23. die "PostgreSQL slot is not set to 8.4 or higher."
  24. fi
  25. }
  26. src_prepare() {
  27. epatch "${FILESDIR}/pgadmin3-desktop.patch"
  28. epatch_user
  29. }
  30. src_configure() {
  31. WX_GTK_VER="3.0"
  32. setup-wxwidgets
  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. }