rapidsvn-0.12.1-r3.ebuild 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. # Copyright 1999-2016 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. PYTHON_COMPAT=( python2_7 )
  5. WX_GTK_VER=3.0
  6. inherit autotools eutils fdo-mime flag-o-matic python-single-r1 versionator wxwidgets
  7. MY_PV=$(get_version_component_range 1-2)
  8. MY_REL="1"
  9. DESCRIPTION="Cross-platform GUI front-end for the Subversion revision system"
  10. HOMEPAGE="http://rapidsvn.tigris.org/"
  11. SRC_URI="
  12. http://www.rapidsvn.org/download/release/${PV}/${P}.tar.gz
  13. doc? ( https://dev.gentoo.org/~jlec/distfiles/svncpp.dox.xz )"
  14. LICENSE="GPL-2 LGPL-2.1 FDL-1.2"
  15. SLOT="0"
  16. KEYWORDS="amd64 arm ppc ~ppc64 x86 ~amd64-linux ~x86-linux"
  17. IUSE="doc static-libs"
  18. REQUIRED_USE="${PYTHON_REQUIRED_USE}"
  19. COMMON_DEP="
  20. ${PYTHON_DEPS}
  21. dev-libs/apr
  22. dev-libs/apr-util
  23. dev-vcs/subversion
  24. x11-libs/wxGTK:${WX_GTK_VER}[X]"
  25. DEPEND="${COMMON_DEP}
  26. doc? (
  27. dev-libs/libxslt
  28. app-text/docbook-sgml-utils
  29. app-doc/doxygen
  30. app-text/docbook-xsl-stylesheets
  31. media-gfx/graphviz
  32. )"
  33. RDEPEND="${COMMON_DEP}"
  34. DOCS=( HACKING.txt TRANSLATIONS )
  35. src_prepare() {
  36. need-wxwidgets unicode
  37. if use doc; then
  38. mv "${WORKDIR}"/svncpp.dox doc/svncpp/ || die
  39. fi
  40. strip-linguas $(grep ^RAPIDSVN_LANGUAGES src/locale/Makefile.am | sed 's:RAPIDSVN_LANGUAGES=::g')
  41. sed \
  42. -e "/^RAPIDSVN_LANGUAGES/s:=.*:=${LINGUAS}:g" \
  43. -i src/locale/Makefile.am || die
  44. mv configure.in configure.ac || die
  45. epatch "${FILESDIR}/${P}-svncpp_link.patch"
  46. epatch "${FILESDIR}/${P}-locale.patch"
  47. epatch "${FILESDIR}/${P}-wx3.0.patch"
  48. epatch "${FILESDIR}/${P}-subversion1.9-private-api.patch"
  49. eautoreconf
  50. }
  51. src_configure() {
  52. append-cppflags $( apr-1-config --cppflags )
  53. econf \
  54. $(use_enable static-libs static) \
  55. $(use_with doc manpage) \
  56. $(use_with doc xsltproc) \
  57. $(use_with doc doxygen) \
  58. $(use_with doc dot) \
  59. --with-wx-config="${WX_CONFIG}" \
  60. --with-svn-lib="${EPREFIX}/usr/$(get_libdir)" \
  61. --with-svn-include="${EPREFIX}/usr/include" \
  62. --with-apr-config="${EPREFIX}/usr/bin/apr-1-config" \
  63. --with-apu-config="${EPREFIX}/usr/bin/apu-1-config"
  64. }
  65. src_compile() {
  66. default
  67. use doc && emake -C doc/manpage manpage
  68. }
  69. src_install() {
  70. default
  71. doicon src/res/rapidsvn.ico src/res/bitmaps/${PN}*.png
  72. make_desktop_entry rapidsvn "RapidSVN ${PV}" \
  73. "${EPREFIX}/usr/share/pixmaps/rapidsvn_32x32.png" \
  74. "RevisionControl;Development"
  75. if use doc ; then
  76. doman doc/manpage/${PN}.1
  77. dodoc doc/svncpp/html/*
  78. fi
  79. prune_libtool_files
  80. }
  81. src_test() {
  82. pushd src/tests/svncpp > /dev/null || die
  83. default
  84. ./svncpptest | grep OK || die
  85. }
  86. pkg_postinst() {
  87. fdo-mime_desktop_database_update
  88. }
  89. pkg_postrm() {
  90. fdo-mime_desktop_database_update
  91. }