tech-pkg archive

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

py-Scientific fix




py-Scientific (MAINTAINER=pkgsrc-users) was failing to build on CentOS.

The failure was due to the python build system using sys.platform to construct the library path while the pkgrsc Makefile was trying to replicate it using pkgsrc variables.

The patch below works on CentOS 7 and NetBSD 7.  I'm unable to test on Solaris, but I think this method should work on any platform.

Any objections or suggestions?

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/math/py-Scientific/Makefile,v
retrieving revision 1.54
diff -u -r1.54 Makefile
--- Makefile    13 Dec 2018 19:52:09 -0000    1.54
+++ Makefile    27 Mar 2019 21:45:12 -0000
@@ -14,8 +14,11 @@

 MAKE_ENV+=    NETCDF_PREFIX=${BUILDLINK_PREFIX.netcdf}

-PLIST_SUBST+=    OSNAME=${LOWER_OPSYS:S/solaris/sunos/}
-PLIST_SUBST+=    OSVER=${OS_VERSION:C/^(.).*/\1/}
+.include "../../lang/python/pyversion.mk"
+
+PLATFORM!=    ${PYTHONBIN} -c "import sys; print sys.platform"
+PLIST_SUBST+=    PLATFORM=${PLATFORM}
+
 PYTHON_VERSIONS_INCOMPATIBLE=    34 35 36 37 # not yet ported as of 2.8.1

 INSTALLATION_DIRS=    bin
Index: PLIST
===================================================================
RCS file: /cvsroot/pkgsrc/math/py-Scientific/PLIST,v
retrieving revision 1.10
diff -u -r1.10 PLIST
--- PLIST    25 Sep 2014 12:59:30 -0000    1.10
+++ PLIST    27 Mar 2019 21:45:12 -0000
@@ -223,8 +223,8 @@
 ${PYSITELIB}/Scientific/indexing.py
 ${PYSITELIB}/Scientific/indexing.pyc
 ${PYSITELIB}/Scientific/indexing.pyo
-${PYSITELIB}/Scientific/${OSNAME}${OSVER}/Scientific_affinitypropagation.so
-${PYSITELIB}/Scientific/${OSNAME}${OSVER}/Scientific_interpolation.so
-${PYSITELIB}/Scientific/${OSNAME}${OSVER}/Scientific_netcdf.so
-${PYSITELIB}/Scientific/${OSNAME}${OSVER}/Scientific_numerics_package_id.so
-${PYSITELIB}/Scientific/${OSNAME}${OSVER}/Scientific_vector.so
+${PYSITELIB}/Scientific/${PLATFORM}/Scientific_affinitypropagation.so
+${PYSITELIB}/Scientific/${PLATFORM}/Scientific_interpolation.so
+${PYSITELIB}/Scientific/${PLATFORM}/Scientific_netcdf.so
+${PYSITELIB}/Scientific/${PLATFORM}/Scientific_numerics_package_id.so
+${PYSITELIB}/Scientific/${PLATFORM}/Scientific_vector.so



Home | Main Index | Thread Index | Old Index