ocamlnet-3.7.7-r1.ebuild 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI="5"
  4. inherit eutils findlib
  5. MY_P=${P/_beta/test}
  6. DESCRIPTION="Modules for OCaml application-level Internet protocols"
  7. HOMEPAGE="http://projects.camlcity.org/projects/ocamlnet.html"
  8. SRC_URI="http://download.camlcity.org/download/${MY_P}.tar.gz"
  9. LICENSE="ZLIB GPL-2+"
  10. SLOT="0/${PV}"
  11. KEYWORDS="amd64 ppc x86 ~x86-fbsd"
  12. IUSE="cryptokit gtk ssl tk httpd +ocamlopt +pcre zip"
  13. RESTRICT="installsources"
  14. # the auth-dh compile flag has been disabled as well, since it depends on
  15. # ocaml-cryptgps, which is not available.
  16. DEPEND=">=dev-ml/findlib-1.0
  17. pcre? ( >=dev-ml/pcre-ocaml-5:= )
  18. >=dev-lang/ocaml-3.10.2:=[ocamlopt?]
  19. tk? ( dev-ml/labltk:= )
  20. cryptokit? ( dev-ml/cryptokit:= )
  21. gtk? ( >=dev-ml/lablgtk-2:= )
  22. ssl? ( >=dev-ml/ocaml-ssl-0.4:= )
  23. zip? ( dev-ml/camlzip:= )
  24. "
  25. RDEPEND="${DEPEND}"
  26. S=${WORKDIR}/${MY_P}
  27. ocamlnet_use_with() {
  28. if use $1; then
  29. echo "-with-$2"
  30. else
  31. echo "-without-$2"
  32. fi
  33. }
  34. ocamlnet_use_enable() {
  35. if use $1; then
  36. echo "-enable-$2"
  37. else
  38. echo "-disable-$2"
  39. fi
  40. }
  41. src_configure() {
  42. ./configure \
  43. -bindir /usr/bin \
  44. -datadir /usr/share/${PN} \
  45. $(ocamlnet_use_enable cryptokit crypto) \
  46. $(ocamlnet_use_enable gtk gtk2) \
  47. $(ocamlnet_use_enable pcre pcre) \
  48. $(ocamlnet_use_enable ssl ssl) \
  49. $(ocamlnet_use_enable tk tcl) \
  50. $(ocamlnet_use_enable zip zip) \
  51. $(ocamlnet_use_with httpd nethttpd) \
  52. || die "Error : econf failed!"
  53. }
  54. src_compile() {
  55. emake -j1 all
  56. if use ocamlopt; then
  57. emake -j1 opt
  58. fi
  59. }
  60. src_install() {
  61. export STRIP_MASK="*/bin/*"
  62. findlib_src_install
  63. }