opam-version: "2.0"
authors: "Gerd Stolpmann"
maintainer: "gerd@gerd-stolpmann.de"
homepage: "http://projects.camlcity.org/projects/ocamlnet.html"
license: ["zlib-acknowledgement" "BSD-3-Clause" "GPL-2.0-only"]
doc: "http://projects.camlcity.org/projects/dl/ocamlnet-4.1.9/doc/html-main/index.html"
bug-reports: "https://gitlab.com/gerdstolpmann/lib-ocamlnet3/-/issues"
dev-repo: "git+https://gitlab.com/gerdstolpmann/lib-ocamlnet3.git"
patches: [
  "fix-version-number.patch"
  "pkg-config.patch"
  "0001-Import-upstream-merge-request-24-to-add-OCaml-5.x-su.patch"
  "0002-More-OCaml-5.x-fixes.patch"
  "0003-Fix-build-with-OCaml-5.2.0.patch"
]
build: [
  [
    "env" "MAKE=%{make}%"
    "./configure"
    "-bindir" bin
    "-%{conf-gssapi:enable}%-gssapi"
    "-%{conf-gnutls:enable}%-gnutls"
    "-%{pcre:enable}%-pcre"
    "-%{lablgtk:enable}%-gtk2"
    "-%{camlzip:enable}%-zip"
    "-with-nethttpd"
  ]
  [make "all"]
  [make "opt"]
]
depends: [
  "ocaml" {>= "5.2"}
  "ocamlfind"
  "ocamlbuild" {build}
  "base-bytes"
]
depopts: [
  "conf-gnutls"
  "conf-gssapi"
  "lablgtk"
  "pcre"
  "camlzip"
]
install: [make "install"]
synopsis:
  "Internet protocols (HTTP, CGI, e-mail etc.) and helper data structures"
description: """
(mail messages, character sets, etc.)

Ocamlnet is an enhanced system platform library for Ocaml. As the name
suggests, large parts of it have to do with network programming, but
it is actually not restricted to this. Other parts deal with the
management of multiple worker processes, and the interaction with
other programs running on the same machine. You can also view Ocamlnet
as an extension of the system interface as provided by the Unix module
of the standard library."""
conflicts: [
  "ocaml-variants"
    {= "4.04.0+flambda" | = "4.04.1+flambda" | = "4.04.2+flambda"}
  "shell"
]
url {
  src: "http://download.camlcity.org/download/ocamlnet-4.1.9.tar.gz"
  checksum: "sha256=f98ed19979848f1949b1b001e30ac132b254d0f4a705150c6dcf9094bbec9cee"
  mirrors: "http://download2.camlcity.org/download/ocamlnet-4.1.9.tar.gz"
}
extra-source "pkg-config.patch" {
  src:
    "https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/ocamlnet/pkg-config.patch"
  checksum: [
    "sha256=3384e98826830e5d06a9dd02c7d4776da4b6d74579691eccbc4d3eb03d4af330"
    "md5=394f0ddce2441561bd1dfcf726e13a23"
  ]
}
extra-source "ocamlnet.install" {
  src:
    "https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/ocamlnet/ocamlnet.install"
  checksum: [
    "sha256=8670b7452ef00ffc6609da81266e3c956297a35ed91421fed36bc9323e10f5b7"
    "md5=ed54a9f3d6382ccc01ea1cf1af8f2c38"
  ]
}
extra-source "fix-version-number.patch" {
  src:
    "https://raw.githubusercontent.com/ocaml/opam-source-archives/main/patches/ocamlnet/fix-version-number.patch"
  checksum: [
    "sha256=2d9c76c03e0b29aaf38af01fb7615c03aee57c228e12e1bfe7143833c2ba885f"
    "md5=23c41def93bfc8bdbd9805a36849fe74"
  ]
}
extra-files: [
  ["0001-Import-upstream-merge-request-24-to-add-OCaml-5.x-su.patch" "md5=68830dfa6be7cada1b6e8d30e0823cf1"]
  ["0002-More-OCaml-5.x-fixes.patch" "md5=62dc7701c0b12445e67f50b92aa774b8"]
  ["0003-Fix-build-with-OCaml-5.2.0.patch" "md5=eb26534d9469f1f9e79ae79c9fdaeced"]
]
