forked from Lainports/freebsd-ports
45 lines
1.2 KiB
Makefile
45 lines
1.2 KiB
Makefile
# levmar library (math/levmar) is bundled
|
|
|
|
PORTNAME= levmar
|
|
DISTVERSION= 0.2.3
|
|
PORTREVISION= 2
|
|
CATEGORIES= math python
|
|
MASTER_SITES= PYPI
|
|
PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX}
|
|
|
|
MAINTAINER= yuri@FreeBSD.org
|
|
COMMENT= Binding to levmar library (Levenberg-Marquardt optimization algorithm)
|
|
WWW= https://github.com/bjodah/levmar
|
|
|
|
LICENSE= MIT
|
|
LICENSE_FILE= ${WRKSRC}/LICENSE.txt
|
|
|
|
BUILD_DEPENDS= ${PYNUMPY}
|
|
LIB_DEPENDS= libblas.so:math/blas \
|
|
liblapack.so:math/lapack
|
|
TEST_DEPENDS= ${PYTHON_PKGNAMEPREFIX}pytest4>0:devel/py-pytest4@${PY_FLAVOR} \
|
|
${PYNUMPY}
|
|
|
|
USES= python
|
|
USE_PYTHON= distutils autoplist
|
|
|
|
.include <bsd.port.pre.mk>
|
|
|
|
.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400079 || ( ${OSVERSION} >= 1302505 && ${OSVERSION} < 1400000 ))
|
|
CFLAGS+= -Wno-error=int-conversion
|
|
.endif
|
|
|
|
.if ${OPSYS} == FreeBSD && ( ${OSVERSION} >= 1400091 || ( ${OSVERSION} >= 1302507 && ${OSVERSION} < 1400000 ))
|
|
CFLAGS+= -Wno-error=incompatible-function-pointer-types
|
|
.endif
|
|
|
|
post-patch:
|
|
@${REINPLACE_CMD} -e 's|ö|o|' ${WRKSRC}/AUTHORS # breaks because of non-ascii chars
|
|
|
|
post-install:
|
|
@${STRIP_CMD} ${STAGEDIR}${PYTHON_SITELIBDIR}/${PORTNAME}/_${PORTNAME}*.so
|
|
|
|
do-test:
|
|
@cd ${WRKSRC}/levmar/tests && ${PYTHON_CMD} -m pytest --pyargs levmar
|
|
|
|
.include <bsd.port.post.mk>
|