1- # $NetBSD: Makefile,v 1.34 2024/11/24 14:32:49 gdt Exp $
1+ # $NetBSD: Makefile,v 1.35 2024/11/24 14:45:32 gdt Exp $
22
33GITHUB_PROJECT = lablgtk
44GITHUB_TAG = ${VERSION}
@@ -21,10 +21,10 @@ OCAML_FINDLIB_DIRS= lablgtk3
2121OPAM_INSTALL_FILES = ${OCAML_FINDLIB_DIRS}
2222DUNE_BUILD_PACKAGES = ${OCAML_FINDLIB_DIRS}
2323
24- # Undo the wrapper, in the hope that dune finds real pkg-config. Does not help.
25- no-pkgconfig-wrapper :
26- ${RM} ${WRKDIR} /.tools/bin/pkg-config
27- ${CP} ${PREFIX} /bin/ pkg-config ${WRKDIR} /.tools/bin/pkg-config
24+ # # BEGIN DUNE/PKG-CONFIG KLUDGES
25+
26+ # See the dune sources, otherlibs/configurator/src/v1.ml and look for
27+ # pkg-config and "which", if trying to understand why this fails.
2828
2929# dune tries to run pkg-config, and this fails under pkgsrc for some reason.
3030# But when run in pre-configure, it seems to be ok.
@@ -33,6 +33,11 @@ test-dune-config:
3333 (cd ${WRKSRC} && \
3434 dune exec -- ./_build/default/.bin/dune_config -verbose -pkg gtk+-3.0 -version 3.18) || ${TRUE}
3535
36+ # Undo the wrapper, in the hope that dune finds real pkg-config. Does not help.
37+ no-pkgconfig-wrapper :
38+ ${RM} ${WRKDIR} /.tools/bin/pkg-config
39+ ${CP} ${PREFIX} /bin/pkg-config ${WRKDIR} /.tools/bin/pkg-config
40+
3641# This is a huge hack, to undefine PKG_CONFIG in the environment,
3742# which apparently breaks dune's searching for pkg-config. Copied
3843# from ocaml/ocaml.mk, to where it should perhaps be hoisted.
@@ -43,6 +48,8 @@ do-build:
4348 ${DUNE_BUILD_FLAGS} -p ${DUNE_BUILD_PACKAGES: ts,} \
4449 ${DUNE_BUILD_TARGETS}
4550
51+ # # END DUNE/PKG-CONFIG KLUDGES
52+
4653.include "../../lang/ocaml/ocaml.mk"
4754
4855.include "options.mk"
0 commit comments