tech-pkg archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: ocaml, dune, environment, PKG_CONFIG in the environment
> Date: Sun, 24 Nov 2024 09:42:04 -0500
> From: Greg Troxel <gdt%lexort.com@localhost>
>
> I just committed a kludge to ocaml-lablgtk3 that lets it build.
> Essentially, dune seems to choke if PKG_CONFIG is defined in the
> environment. That's probably a dune bug to be fixed, but for now
> avoiding that seems to build a working package.
The attached patch fixes the bug in dune, which is that it tries to
search PATH for $PKG_CONFIG even if $PKG_CONFIG is absolute.
With this patch applied and your recent changes to ocaml-lablgtk3
reverted, ocaml-lablgtk3 builds for me. I'll leave it to you folks to
decide whether it's risky to commit and maybe test in a bulk build
first.
(Filing a report upstream left as an exercise for the reader.)
From 0b1f8c0ce03cc9ea7cfcc0ba3bab9e8f7e776119 Mon Sep 17 00:00:00 2001
From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
Date: Sat, 30 Nov 2024 00:31:17 +0000
Subject: [PATCH] ocaml-dune: Allow absolute path for PKG_CONFIG in
environment.
---
devel/ocaml-dune-configurator/Makefile | 1 +
devel/ocaml-dune/Makefile | 1 +
devel/ocaml-dune/Makefile.common | 1 +
devel/ocaml-dune/distinfo | 1 +
.../patch-otherlibs_configurator_src_v1.ml | 23 +++++++++++++++++++
5 files changed, 27 insertions(+)
create mode 100644 devel/ocaml-dune/patches/patch-otherlibs_configurator_src_v1.ml
diff --git a/devel/ocaml-dune-configurator/Makefile b/devel/ocaml-dune-configurator/Makefile
index 67e892f34a40..3f646d71b777 100644
--- a/devel/ocaml-dune-configurator/Makefile
+++ b/devel/ocaml-dune-configurator/Makefile
@@ -3,6 +3,7 @@
.include "../../devel/ocaml-dune/Makefile.common"
PKGNAME= ocaml-dune-configurator-${DUNE_VERSION}
+PKGREVISION= 1
CATEGORIES= devel
MAINTAINER= jaapb%NetBSD.org@localhost
diff --git a/devel/ocaml-dune/Makefile b/devel/ocaml-dune/Makefile
index 48204630a5f5..df708c224388 100644
--- a/devel/ocaml-dune/Makefile
+++ b/devel/ocaml-dune/Makefile
@@ -3,6 +3,7 @@
.include "Makefile.common"
PKGNAME= ocaml-${DISTNAME}
+PKGREVISION= 1
CATEGORIES= devel
MAINTAINER= jaapb%NetBSD.org@localhost
diff --git a/devel/ocaml-dune/Makefile.common b/devel/ocaml-dune/Makefile.common
index 797338b2c37f..99ca77f922a5 100644
--- a/devel/ocaml-dune/Makefile.common
+++ b/devel/ocaml-dune/Makefile.common
@@ -11,3 +11,4 @@ MASTER_SITES= ${MASTER_SITE_GITHUB:=ocaml/}
GITHUB_PROJECT= dune
DISTINFO_FILE= ${PKGDIR}/../../devel/ocaml-dune/distinfo
+PATCHDIR= ${PKGDIR}/../../devel/ocaml-dune/patches
diff --git a/devel/ocaml-dune/distinfo b/devel/ocaml-dune/distinfo
index 79203e8edb53..24e14d4e36f9 100644
--- a/devel/ocaml-dune/distinfo
+++ b/devel/ocaml-dune/distinfo
@@ -4,5 +4,6 @@ BLAKE2s (dune-3.11.1.tar.gz) = 3e657f115bcd7fca087a8dfff9a3a95802bf955626d492544
SHA512 (dune-3.11.1.tar.gz) = 8d2eef71ae04a95b1d69784311726cafc3b275e1f202851eb116d6e7740015ce2453ec00278ef3b28c0b1544b10dbff36d942b063d7bb0ebc0a03a9a5f8261d4
Size (dune-3.11.1.tar.gz) = 2753844 bytes
SHA1 (patch-Makefile) = 71fc564487d7cc317948cb9243ae9f8e7d62ca2e
+SHA1 (patch-otherlibs_configurator_src_v1.ml) = 645e3897150f8fdaff86344c0cae0feddf480c69
SHA1 (patch-otherlibs_stdune__filesystem__stubs_readdir.c) = 35b116317b5dcca85fe62467544e71935720bc69
SHA1 (patch-vendor_notty_src-unix_native_winsize.c) = 73dcee62a1356f859eef092e967f4f48383cd5ce
diff --git a/devel/ocaml-dune/patches/patch-otherlibs_configurator_src_v1.ml b/devel/ocaml-dune/patches/patch-otherlibs_configurator_src_v1.ml
new file mode 100644
index 000000000000..3cf74ed11ee1
--- /dev/null
+++ b/devel/ocaml-dune/patches/patch-otherlibs_configurator_src_v1.ml
@@ -0,0 +1,23 @@
+$NetBSD$
+
+Don't attempt to resolve absolute paths by PATH search.
+
+--- otherlibs/configurator/src/v1.ml.orig 2023-10-09 11:08:29.000000000 +0000
++++ otherlibs/configurator/src/v1.ml
+@@ -634,6 +634,7 @@ const char *s%i = "BEGIN-%i-false-END";
+ end
+
+ let which t prog =
++ if not (Filename.is_relative prog) then Some prog else (
+ logf t "which: %s" prog;
+ let x = Find_in_path.which prog in
+ logf
+@@ -643,6 +644,7 @@
+ | None -> "not found"
+ | Some fn -> "found: " ^ quote_if_needed fn);
+ x
++)
+ ;;
+
+ module Pkg_config = struct
+
- Prev by Date:
Re: ocaml, dune, environment, PKG_CONFIG in the environment
- Next by Date:
Re: ocaml, dune, environment, PKG_CONFIG in the environment
- Previous by Thread:
Re: ocaml, dune, environment, PKG_CONFIG in the environment
- Next by Thread:
Re: ocaml, dune, environment, PKG_CONFIG in the environment
- Indexes:
Home |
Main Index |
Thread Index |
Old Index