1 # Copyright 1999-2015 Gentoo Foundation
2 # Distributed under the terms of the GNU General Public License v2
7 inherit eutils versionator
9 IUSE="gtk doc static debug threads +ocamlopt test"
11 DESCRIPTION="Two-way cross-platform file synchronizer"
12 HOMEPAGE="http://www.cis.upenn.edu/~bcpierce/unison/"
14 SLOT="$(get_version_component_range 1-2 ${PV})"
15 KEYWORDS="~amd64 ~arm ~ppc ~x86 ~amd64-linux ~x86-linux ~ppc-macos ~x86-macos ~sparc-solaris"
17 # ocaml version so we are sure it has ocamlopt use flag
18 DEPEND=">=dev-lang/ocaml-3.10.2[ocamlopt?]
19 gtk? ( >=dev-ml/lablgtk-2.2 )
20 test? ( || ( dev-util/ctags virtual/emacs ) )"
22 RDEPEND="gtk? ( >=dev-ml/lablgtk-2.2
23 || ( net-misc/x11-ssh-askpass net-misc/ssh-askpass-fullscreen ) )
25 app-eselect/eselect-unison"
27 #PDEPEND="gtk? ( media-fonts/font-schumacher-misc )"
29 SRC_URI="http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}.tar.gz
30 doc? ( http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.pdf
31 http://www.cis.upenn.edu/~bcpierce/unison/download/releases/${P}/${P}-manual.html )"
37 myconf="$myconf THREADS=true"
41 myconf="$myconf STATIC=true"
45 myconf="$myconf DEBUGGING=true"
49 myconf="$myconf UISTYLE=gtk2"
51 myconf="$myconf UISTYLE=text"
54 use ocamlopt || myconf="$myconf NATIVE=false"
56 # Discard cflags as it will try to pass them to ocamlc...
57 emake $myconf CFLAGS="" buildexecutable
65 # install manually, since it's just too much
66 # work to force the Makefile to do the right thing.
67 newbin unison unison-${SLOT}
68 dodoc BUGS.txt CONTRIB INSTALL NEWS \
69 README ROADMAP.txt TODO.txt
72 dohtml "${DISTDIR}/${P}-manual.html"
73 dodoc "${DISTDIR}/${P}-manual.pdf"
75 use ocamlopt || export STRIP_MASK="*/bin/*"
79 elog "Unison now uses SLOTs, so you can specify servercmd=/usr/bin/unison-${SLOT}"
80 elog "in your profile files to access exactly this version over ssh."
81 elog "Or you can use 'eselect unison' to set the version."