aboutsummaryrefslogtreecommitdiff
path: root/finance/quantlib/Makefile
diff options
context:
space:
mode:
authorMikhail Teterin <mi@FreeBSD.org>2018-07-23 16:15:02 +0000
committerMikhail Teterin <mi@FreeBSD.org>2018-07-23 16:15:02 +0000
commit594e093979ab206a6966c560c3715033dd01cbb7 (patch)
tree3775e90e19cb234672bb2c82081ced005de496d3 /finance/quantlib/Makefile
parent443e4ffdcc1f16ce87de254042d23a4e7c9a1fff (diff)
Re-add finance/quantlib following the official procedure.
Notes
Notes: svn path=/head/; revision=475188
Diffstat (limited to 'finance/quantlib/Makefile')
-rw-r--r--finance/quantlib/Makefile67
1 files changed, 67 insertions, 0 deletions
diff --git a/finance/quantlib/Makefile b/finance/quantlib/Makefile
new file mode 100644
index 000000000000..2d44f5bdf08a
--- /dev/null
+++ b/finance/quantlib/Makefile
@@ -0,0 +1,67 @@
+# Created by: Mikhail Teterin
+# $FreeBSD$
+
+PORTNAME= quantlib
+PORTVERSION= 1.13
+CATEGORIES= finance math devel
+MASTER_SITES= https://dl.bintray.com/${PORTNAME}/releases/
+DISTNAME= QuantLib-${PORTVERSION}
+
+MAINTAINER= mi@aldan.algebra.com
+COMMENT= C++ library for quantitative finance
+
+LICENSE= BSD3CLAUSE
+LICENSE_FILE= ${WRKSRC}/LICENSE.TXT
+
+LIB_DEPENDS= libboost_system.so:devel/boost-libs
+
+USES= compiler
+USE_LDCONFIG= yes
+GNU_CONFIGURE= yes
+CONFIGURE_ENV+= EMACS=no
+MAKE_ENV+= AM_MAKEFLAGS=${_MAKE_JOBS}
+TEST_TARGET= check-examples check
+OPTIONS_SUB= please
+
+OPTIONS_DEFAULT=OPENMP EXAMPLES BENCHMARK UNITY_BUILD NEGATIVE_RATES
+
+OPTIONS_DEFINE= TRACING INDEXED_COUPONS
+OPTIONS_DEFINE+=EXTRA_SAFETY_CHECKS SESSIONS INTRADAY
+OPTIONS_DEFINE+=THREAD_SAFE_OBSERVER_PATTERN
+OPTIONS_DEFINE+=THREAD_SAFE_SINGLETON_INIT
+OPTIONS_DEFINE+=${OPTIONS_DEFAULT}
+
+.if ${CC} == "cc"
+# The base cc/c++ on FreeBSD-10 is too old for OpenMP.
+OPTIONS_EXCLUDE_FreeBSD_10=OPENMP
+.endif
+
+BENCHMARK_DESC= Install benchmark (it is always built)
+EXTRA_SAFETY_CHECKS_DESC=Trade performance for run-time checks
+INDEXED_COUPONS_DESC= Use indexed rather than par coupons
+INTRADAY_DESC= Time precision of msecs, instead of days
+NEGATIVE_RATES_DESC= Allow rates to be negative
+TRACING_DESC= Trade performance for more detailed errors
+UNITY_BUILD_DESC= Combine sources into one before compiling
+SESSIONS_DESC= See help
+
+EXAMPLES_CONFIGURE_WITH=lispdir=${EXAMPLESDIR}
+CONFIGURE_ARGS+= --enable-parallel-unit-test-runner
+CONFIGURE_ARGS+= --with-boost-include=${LOCALBASE}/include
+CONFIGURE_ARGS+= --with-boost-lib=${LOCALBASE}/lib
+
+.for o in ${OPTIONS_DEFINE}
+$o_CONFIGURE_ENABLE= ${o:S/_/-/g:tl}
+.endfor
+
+# OPENMP_USES= compiler:openmp - XXX broken, insists on gcc,
+# but boost is built with clang...
+OPENMP_LIB_DEPENDS= libomp.so:devel/openmp
+OPENMP_CFLAGS= -I${LOCALBASE}/include
+OPENMP_LDFLAGS= -L${LOCALBASE}/lib
+# devel/openmp installs its own -lomp, which is cleaner.
+# unfortunately, devel/llvm${COMPILER_VERSION} may install
+# one too:
+OPENMP_LDFLAGS+= -L${LOCALBASE}/llvm${COMPILER_VERSION}/lib
+
+.include <bsd.port.mk>