ports@,

I just discovered that add ${WRKSRC} to MODPY_TEST_LIBDIR brokes
MODPY_TEST_LINK_SO because it introduced a cyclic loop for resulted
symlinks.

Here a diff which fixes it.

Ok?

Index: lang/python/python.port.mk
===================================================================
RCS file: /home/cvs/ports/lang/python/python.port.mk,v
diff -u -p -r1.215 python.port.mk
--- lang/python/python.port.mk  13 May 2025 15:43:12 -0000      1.215
+++ lang/python/python.port.mk  14 May 2025 21:24:43 -0000
@@ -316,9 +316,12 @@ MODPY_TEST_LINK_SO ?=      No
 MODPY_TEST_LINK_SRC ?= ${WRKSRC}
 MODPY_TEST_SO_CMD = for _dir in ${MODPY_TEST_LIBDIR:S,:, ,g}; do \
        if [ -d $${_dir} ]; then \
-               cd $${_dir} && \
-               find . -name '*.so' -type f \
-                       -exec ln -sf $${_dir}/{} ${MODPY_TEST_LINK_SRC}/{} \; ;\
+               if [ $${_dir} != ${MODPY_TEST_LINK_SRC} ]; then \
+                       cd $${_dir} && \
+                       find . -name '*.so' -type f \
+                               -exec ln -sf $${_dir}/{} \
+                                       ${MODPY_TEST_LINK_SRC}/{} \; ;\
+               fi; \
        fi; done
 MODPY_TEST_TARGET +=   ${MODPY_TEST_SO_CMD};
 .endif


--
wbr, Kirill

Reply via email to