🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.gentoo.dev
Article #201

[gentoo-dev] [PATCH 0/3] Fix generated dune-package sections

#201
From: Thomas Bracht Laumann Jespersen
Date: Thu, 19 Nov 2026 12:40
47 lines
3683 bytes
When running "dune install", a dune-package file is generated that
references different sections of the installed package (libdir, docdir,
etc). These locations are the combined values of the --prefix, --libdir,
and --mandir arguments. However, if these values contain temporary
staging install locations, the generated dune-package will reference
these locations. For example:

    (lang dune 3.23)
    (name csexp)
    (version 1.5.2)
    (sections
     (lib /var/tmp/portage/dev-ml/csexp-1.5.2-r1/image/usr/lib64/ocaml/csexp)
     (libexec /var/tmp/portage/dev-ml/csexp-1.5.2-r1/image/usr/lib64/ocaml/csexp)
     (doc /var/tmp/portage/dev-ml/csexp-1.5.2-r1/image/usr/doc/csexp))
    ... snip ...

Instead we should be setting DESTDIR to the staging install directory in
the src_install phase, and use EPREFIX instead of ED for --prefix and
other arguments, so it ends up like this:

    (lang dune 3.23)
    (name csexp)
    (version 1.5.2)
    (sections
     (lib /usr/lib64/ocaml/csexp)
     (libexec /usr/lib64/ocaml/csexp)
     (doc /usr/doc/csexp))
    ... snip ...

See: https://manual.archlinux.page/package-guidelines/ocaml/#example-pkgbuild-using-dune

Signed-off-by: Thomas Bracht Laumann Jespersen <laumann@gentoo.org>
---
Thomas Bracht Laumann Jespersen (3):
      dune.eclass: set DESTDIR as the staging dir for dune-install
      dune.eclass: use --docdir for dune install
      dune.eclass: support EAPI=9

 eclass/dune.eclass | 20 ++++++++------------
 1 file changed, 8 insertions(+), 12 deletions(-)
---
base-commit: c2e8a152d6ac3a687f199bdaf4868cb2809c020c
change-id: 20261119-dune-eclass-install-4adbc4bb3e12

Best regards,
--  
Thomas Bracht Laumann Jespersen <laumann@gentoo.org>
Technical Details
Message-ID: <O19AJ-cT6p-5@gated-at.bofh.it>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!news.tcpreset.net!newsfeed.bofh.team!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod
From: Thomas Bracht Laumann Jespersen <laumann@gentoo.org>
Newsgroups: linux.gentoo.dev
Subject: [gentoo-dev] [PATCH 0/3] Fix generated dune-package sections
Date: Thu, 19 Nov 2026 13:40:01 +0100
Message-ID: <O19AJ-cT6p-5@gated-at.bofh.it>
List-ID: Gentoo Linux mail <gentoo-dev.gentoo.org>
Reply-To: gentoo-dev@lists.gentoo.org
X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 7bit
X-B4-Tracking: v=1; b=H4sIAAAAAAAC/yXMywrCMBBG4Vcps+6AE4ugryIucvnVkRAl05ZC6
 bsb7fJbnLOSoSqMLt1KFbOavkuD9B3Fpy8PsKZmcgd3EpEzp6mAEbM3Yy02+px58CnEIYQjxFE
 rPxV3Xf7X6223TeGFOP5WtG1fPrEeg3cAAAA=
X-Change-ID: 20261119-dune-eclass-install-4adbc4bb3e12
X-Mailer: b4 0.16.0
X-Developer-Signature: v=1; a=openpgp-sha256; l=1752; i=laumann@gentoo.org;
 h=from:subject:message-id; bh=kFmW07R793jXmufO4hU8SRNuAj8eqvqc/XyIlmsZRJE=;
 b=owGbwMvMwCWm/LstS/zLCmvG02pJDFn/3qhP4ed1WKuxfuIa7cr7Tm1TG+uctWtVb092NPj54
 +o8gTlMHR9ZGMS4GGaKKbKs3rKy66K1+Anmg4z7YOawMoEMkRZpYAACFga+3MS8UiMdIz1TbUM9
 QyBDxygeIqfHoJFZXFyaWqSbVlDkkJdfkliSmZ9XrJdfkJpXkF6gl5aZVpKRkV9UnAo0Qi8vtcT
 RycnE0dLC0cXQ2MnQ3NnCwNjZ0MDQydXI2M3JwszM0dDczcTRwtiJgYtTAOaatbKMDH8OCf+2Me
 0x7C3peNKyqbJ4freWXoDSyQD353sWbO6fUMjwv9bh3rpDKsW3z/Is7PGMnnppe1fxv4L1pk5ik
 yaorn70nRMA
X-Developer-Key: i=laumann@gentoo.org; a=openpgp;
 fpr=94DC1AEB62B1E0B4FDC5DC3A85C9FB9C4405C282
Approved: robomod@news.nic.it
Lines: 47
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Cc: Thomas Bracht Laumann Jespersen <laumann@gentoo.org>
X-Original-Date: Thu, 19 Nov 2026 13:31:19 +0100
X-Original-Message-ID: <20261119-dune-eclass-install-v1-0-0c6b81eca2b1@gentoo.org>