diff options
author | Hiroki Tokunaga <tokusan441@gmail.com> | 2024-10-06 10:31:46 +0900 |
---|---|---|
committer | Hiroki Tokunaga <tokusan441@gmail.com> | 2024-10-06 10:32:47 +0900 |
commit | 9bef7e43499a30a950d1275fa79102ebf4269095 (patch) | |
tree | 09e20433a14abb519db45aefc09763d2c5b7f882 /dev-util | |
parent | net-p2p/p2pool: version bump (diff) | |
download | guru-9bef7e43499a30a950d1275fa79102ebf4269095.tar.gz guru-9bef7e43499a30a950d1275fa79102ebf4269095.tar.bz2 guru-9bef7e43499a30a950d1275fa79102ebf4269095.zip |
dev-util/ocamlformat: make `ocamlformat --version` print the correct version
Signed-off-by: Hiroki Tokunaga <tokusan441@gmail.com>
Diffstat (limited to 'dev-util')
-rw-r--r-- | dev-util/ocamlformat/ocamlformat-0.26.2-r1.ebuild | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/dev-util/ocamlformat/ocamlformat-0.26.2-r1.ebuild b/dev-util/ocamlformat/ocamlformat-0.26.2-r1.ebuild new file mode 100644 index 000000000..b2cd22858 --- /dev/null +++ b/dev-util/ocamlformat/ocamlformat-0.26.2-r1.ebuild @@ -0,0 +1,54 @@ +# Copyright 1999-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit dune + +DESCRIPTION="Auto-formatter for OCaml code" +HOMEPAGE="https://github.com/ocaml-ppx/ocamlformat" +SRC_URI="https://github.com/ocaml-ppx/ocamlformat/archive/${PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="MIT" + +SLOT="0/${PV}" + +KEYWORDS="~amd64" +IUSE="ocamlopt test" + +RESTRICT="!test? ( test )" + +RDEPEND=" + >=dev-ml/cmdliner-1.1.0:= + ~dev-ml/ocamlformat-lib-${PV}:= + >=dev-ml/re-1.10.3:= +" + +DEPEND=" + ${RDEPEND} +" + +# Includes testing dependencies of `ocamlformat-lib`. +BDEPEND=" + test? ( + >=dev-ml/cmdliner-1.2.0:= + ~dev-ml/ocamlformat-rpc-lib-${PV}:= + + >=dev-ml/alcotest-1.3.0:= + >=dev-util/ocp-indent-1.8.1:= + ) +" + +src_prepare() { + default + + sed -i "/^(name ocamlformat)/a (version ${PV})" dune-project || die +} + +src_compile() { + dune-compile ocamlformat +} + +src_install() { + dune-install ocamlformat +} |