Received: by mail.netbsd.org (Postfix, from userid 605) id 93C1B84D96; Sat, 25 Mar 2023 18:29:46 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.netbsd.org (Postfix) with ESMTP id C3A9D84D4E for ; Sat, 25 Mar 2023 18:29:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at netbsd.org Received: from mail.netbsd.org ([IPv6:::1]) by localhost (mail.netbsd.org [IPv6:::1]) (amavisd-new, port 10025) with ESMTP id ISgSSTv6Ojas for ; Sat, 25 Mar 2023 18:29:45 +0000 (UTC) Received: from cvs.NetBSD.org (ivanova.netbsd.org [199.233.217.197]) by mail.netbsd.org (Postfix) with ESMTP id 2FED584D15 for ; Sat, 25 Mar 2023 18:29:45 +0000 (UTC) Received: by cvs.NetBSD.org (Postfix, from userid 500) id 28D21F99A; Sat, 25 Mar 2023 18:29:45 +0000 (UTC) Content-Transfer-Encoding: 7bit Content-Type: multipart/mixed; boundary="_----------=_1679768985221380" MIME-Version: 1.0 Date: Sat, 25 Mar 2023 18:29:45 +0000 From: "Greg Troxel" Subject: CVS commit: pkgsrc To: pkgsrc-changes@NetBSD.org Reply-To: gdt@netbsd.org X-Mailer: log_accum Message-Id: <20230325182945.28D21F99A@cvs.NetBSD.org> Sender: pkgsrc-changes-owner@NetBSD.org List-Id: Precedence: bulk List-Unsubscribe: This is a multi-part message in MIME format. --_----------=_1679768985221380 Content-Disposition: inline Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" 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. --_----------=_1679768985221380 Content-Disposition: inline Content-Length: 2098 Content-Transfer-Encoding: binary Content-Type: text/x-diff; charset=us-ascii 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 \ --_----------=_1679768985221380--