pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc



Module Name:    pkgsrc
Committed By:   gdt
Date:           Sat Mar 25 18:29:45 UTC 2023

Modified Files:
        pkgsrc/devel/cmake: build.mk
        pkgsrc/lang/python: pyversion.mk

Log Message:
cmake/python: Set version explicitly with cmake/build.mk

With the old cmake method, USE_CMAKE would cause pyversion.mk to add
variables to CMAKE_ARGS, resulting in the build using the correct
python.  With the new cmake/build.mk, that didn't happen and cmake
would find some python.  If the found python is missing some packages
(that the packges depends on, e.g. py-expat), the build can fail.

Define a variable BUILD_USES_CMAKE when using cmake/build.mk, and
perform cmake-specific processing in pyversion.mk if that is set, in
addition to still doing it if USE_CMAKE is set.

This should be rototilled after the branch; this is an attempt at a
minimally risky fix now.

Resolves failure to build doxygen when python2.7 but not py27-expat is
installed.

Reviewed by wiz@.


To generate a diff of this commit:
cvs rdiff -u -r1.7 -r1.8 pkgsrc/devel/cmake/build.mk
cvs rdiff -u -r1.146 -r1.147 pkgsrc/lang/python/pyversion.mk

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/cmake/build.mk
diff -u pkgsrc/devel/cmake/build.mk:1.7 pkgsrc/devel/cmake/build.mk:1.8
--- pkgsrc/devel/cmake/build.mk:1.7     Wed Jan 25 16:46:37 2023
+++ pkgsrc/devel/cmake/build.mk Sat Mar 25 18:29:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: build.mk,v 1.7 2023/01/25 16:46:37 wiz Exp $
+# $NetBSD: build.mk,v 1.8 2023/03/25 18:29:44 gdt Exp $
 #
 # This Makefile fragment supports building using the CMake build tool.
 #
@@ -43,6 +43,10 @@ CMAKE_REQD?= 0
 TOOL_DEPENDS+= cmake>=${version}:../../devel/cmake
 .endfor
 
+# Declare that this package is using cmake, for bl3 files to know
+# to add to CMAKE_CONFIGURE_ARGS.
+BUILD_USES_CMAKE=      yes
+
 CMAKE_CONFIGURE_ARGS?= ${CMAKE_ARGS}
 
 CONFIGURE_ENV+=                BUILDLINK_DIR=${BUILDLINK_DIR}

Index: pkgsrc/lang/python/pyversion.mk
diff -u pkgsrc/lang/python/pyversion.mk:1.146 pkgsrc/lang/python/pyversion.mk:1.147
--- pkgsrc/lang/python/pyversion.mk:1.146       Thu Jan 12 10:56:12 2023
+++ pkgsrc/lang/python/pyversion.mk     Sat Mar 25 18:29:44 2023
@@ -1,4 +1,4 @@
-# $NetBSD: pyversion.mk,v 1.146 2023/01/12 10:56:12 markd Exp $
+# $NetBSD: pyversion.mk,v 1.147 2023/03/25 18:29:44 gdt Exp $
 
 # This file should be included by packages as a way to depend on
 # python when none of the other methods are appropriate, e.g. a
@@ -211,7 +211,7 @@ PRINT_PLIST_AWK+=   /^${PYLIB:S|/|\\/|g}/ 
                        { gsub(/${PYLIB:S|/|\\/|g}/, "$${PYLIB}") }
 
 ALL_ENV+=              PYTHON=${PYTHONBIN}
-.if defined(USE_CMAKE)
+.if defined(USE_CMAKE) || defined(BUILD_USES_CMAKE)
 # used by FindPython
 CMAKE_ARGS+=           -DPython_EXECUTABLE:FILEPATH=${PYTHONBIN}
 CMAKE_ARGS+=           -DPython_INCLUDE_DIR:PATH=${BUILDLINK_DIR}/${PYINC}
@@ -238,7 +238,7 @@ _VARGROUPS+=                pyversion
 _USER_VARS.pyversion=  PYTHON_VERSION_DEFAULT
 _PKG_VARS.pyversion=   \
        PYTHON_VERSIONS_ACCEPTED PYTHON_VERSIONS_INCOMPATIBLE           \
-       PYTHON_SELF_CONFLICT PYTHON_FOR_BUILD_ONLY USE_CMAKE
+       PYTHON_SELF_CONFLICT PYTHON_FOR_BUILD_ONLY USE_CMAKE BUILD_USES_CMAKE
 _SYS_VARS.pyversion=   \
        PYTHON_VERSION_REQD PYPACKAGE PYVERSSUFFIX PYPKGSRCDIR          \
        PYPKGPREFIX PYTHONBIN PYTHONCONFIG PY_COMPILE_ALL               \



Home | Main Index | Thread Index | Old Index