Install this version:
emerge -a =app-emacs/dune-3.22.2
If this version is masked, you can unmask it using the autounmask tool or standard emerge options:
autounmask =app-emacs/dune-3.22.2
Or alternatively:
emerge --autounmask-write -a =app-emacs/dune-3.22.2
# automatically generated by g-sorcery
# please do not edit this file
EAPI=8
REPO_URI="https://stable.melpa.org/packages/"
SOURCE_TYPE="tar"
REALNAME="dune"
DIGEST_SOURCES="yes"
inherit g-sorcery gs-elpa
DESCRIPTION="Integration with the dune build system"
HOMEPAGE="https://github.com/ocaml/dune"
SRC_URI="${REPO_URI}${REALNAME}-${PV}.${SUFFIX}"
SLOT="0"
KEYWORDS="~amd64 ~x86"
DEPEND=""
RDEPEND=""