# $OpenBSD: Makefile,v 1.10 2019/07/17 14:46:33 danj Exp $

COMMENT =		lightweight C++ template library for linear algebra
VERSION =		1.14.0
DISTNAME =		ceres-solver-${VERSION}

CATEGORIES =		math

HOMEPAGE =		http://ceres-solver.org

SHARED_LIBS +=		ceres			0.0 # 1.14

# New BSD license
PERMIT_PACKAGE =	Yes

MASTER_SITES =		http://ceres-solver.org/

# c++11
COMPILER =		base-clang ports-gcc ports-clang

# We can also pull in TBB, but C++ threads are better supported.

BUILD_DEPENDS =		devel/gflags \
			devel/glog \
			math/blas \
			math/eigen3 \
			math/lapack \
			math/suitesparse \
			textproc/sphinx

# Python is for generating the documentation.

MODULES =		devel/cmake \
			lang/python

# If this reports "assuming suitesparse is compiled with TBB" (when it's
# not), it's harmless.

CONFIGURE_ARGS =	-DOPENMP=OFF \
			-DCXX11=ON \
			-DCXX11_THREADS=ON \
			-DBUILD_EXAMPLES=OFF \
			-DBUILD_DOCUMENTATION=ON \
			-DPYTHON_EXECUTABLE="${MODPY_BIN}"

# Sometimes tests fail because tolerances doesn't pass muster.
# I can only guess that this is due to aberrations in FP?

TEST_TARGET =		test

.include <bsd.port.mk>
