unison-2.48.3.ebuild 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils versionator
  5. IUSE="gtk doc static debug threads +ocamlopt test"
  6. DESCRIPTION="Two-way cross-platform file synchronizer"
  7. HOMEPAGE="http://www.cis.upenn.edu/~bcpierce/unison/"
  8. LICENSE="GPL-2"
  9. SLOT="$(get_version_component_range 1-2 ${PV})"
  10. KEYWORDS="amd64 ~arm ~ppc x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
  11. # ocaml version so we are sure it has ocamlopt use flag
  12. DEPEND=">=dev-lang/ocaml-3.10.2[ocamlopt?]
  13. gtk? ( >=dev-ml/lablgtk-2.2 )
  14. test? ( || ( dev-util/ctags virtual/emacs ) )"
  15. RDEPEND="gtk? ( >=dev-ml/lablgtk-2.2
  16. || ( net-misc/x11-ssh-askpass net-misc/ssh-askpass-fullscreen ) )
  17. !net-misc/unison:0
  18. app-eselect/eselect-unison"
  19. #PDEPEND="gtk? ( media-fonts/font-schumacher-misc )"
  20. SRC_URI="http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}.tar.gz
  21. doc? ( http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.pdf
  22. http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.html )"
  23. src_compile() {
  24. local myconf
  25. if use threads; then
  26. myconf="$myconf THREADS=true"
  27. fi
  28. if use static; then
  29. myconf="$myconf STATIC=true"
  30. fi
  31. if use debug; then
  32. myconf="$myconf DEBUGGING=true"
  33. fi
  34. if use gtk; then
  35. myconf="$myconf UISTYLE=gtk2"
  36. else
  37. myconf="$myconf UISTYLE=text"
  38. fi
  39. use ocamlopt || myconf="$myconf NATIVE=false"
  40. # Discard cflags as it will try to pass them to ocamlc...
  41. emake $myconf CFLAGS="" buildexecutable
  42. }
  43. src_test() {
  44. emake selftest
  45. }
  46. src_install () {
  47. # install manually, since it's just too much
  48. # work to force the Makefile to do the right thing.
  49. newbin unison unison-${SLOT}
  50. dodoc BUGS.txt CONTRIB INSTALL NEWS \
  51. README ROADMAP.txt TODO.txt
  52. if use doc; then
  53. dohtml "${DISTDIR}/${P}-manual.html"
  54. dodoc "${DISTDIR}/${P}-manual.pdf"
  55. fi
  56. use ocamlopt || export STRIP_MASK="*/bin/*"
  57. }
  58. pkg_postinst() {
  59. elog "Unison now uses SLOTs, so you can specify servercmd=/usr/bin/unison-${SLOT}"
  60. elog "in your profile files to access exactly this version over ssh."
  61. elog "Or you can use 'eselect unison' to set the version."
  62. }