Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 12 Jul 2022 19:20:27 GMT
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org
Subject:   git: d443494a71b7 - main - math/Imath: ensure PYTHON build with /usr/bin/python[3] links
Message-ID:  <202207121920.26CJKRPJ011018@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by mandree:

URL: https://cgit.FreeBSD.org/ports/commit/?id=d443494a71b73dc543cc0eddec69a01d6280ce02

commit d443494a71b73dc543cc0eddec69a01d6280ce02
Author:     Matthias Andree <mandree@FreeBSD.org>
AuthorDate: 2022-07-12 19:06:08 +0000
Commit:     Matthias Andree <mandree@FreeBSD.org>
CommitDate: 2022-07-12 19:20:13 +0000

    math/Imath: ensure PYTHON build with /usr/bin/python[3] links
    
    When /usr/bin/python[3] symlinks are present (which is nonstandard), the
    FindPython logic inside cmake will grab it over $PREFIX/bin/python[3],
    but still identify (by default) /usr/local/lib/... as the sitelib path,
    but goof up when calculating the relative path in case of /usr/bin vs
    /usr/local/bin mismatch.
    
    Fix: Provide ${PYTHON_CMD} through the cmake Python_EXECUTABLE
    variable to avoid any ambiguities and pin the right executable.
    
    I believe it should be safe to NOT bump PORTREVISION,
    but I will fetch far and err on the safe side and bump it, because that
    is easier than researching all possible paths how and where
    Python paths might find their way into the resulting package.
    
    The detailed report by Seneca helped identify and solve this issue, so:
    Thanks to:      Seneca Cunningham <seneca@vybenetworks.com>
    
    PR:             263341
    Reported by:    D'Arcy J.M. Cain <darcy@druid.net>
    Reported by:    Seneca Cunningham <seneca@vybenetworks.com>
    MFH:            2022Q3
---
 math/Imath/Makefile | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/math/Imath/Makefile b/math/Imath/Makefile
index a8dfc492bc43..1e7ee781b089 100644
--- a/math/Imath/Makefile
+++ b/math/Imath/Makefile
@@ -2,6 +2,7 @@
 
 PORTNAME=	Imath
 PORTVERSION=	3.1.5
+PORTREVISION=	1
 CATEGORIES=	math devel graphics
 
 MAINTAINER=	mandree@FreeBSD.org
@@ -45,7 +46,7 @@ _MINVER=	4
 _PLVER=		0
 
 post-patch:
-	${REINPLACE_CMD} -E 's/find_package\(Python(3?) COMPONENTS/find_package(Python\1 ${PYTHON_VER} EXACT COMPONENTS/' \
+	${REINPLACE_CMD} -E 's}find_package\(Python(3?) COMPONENTS}set(Python\1_EXECUTABLE ${PYTHON_CMD})\nfind_package(Python\1 ${PYTHON_VER} EXACT COMPONENTS}' \
 		${WRKSRC}/src/python/CMakeLists.txt
 
 post-install:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207121920.26CJKRPJ011018>