summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'dev-libs/quantlib')
-rw-r--r--dev-libs/quantlib/Manifest1
-rw-r--r--dev-libs/quantlib/files/50quantlib-gentoo.el6
-rw-r--r--dev-libs/quantlib/metadata.xml12
-rw-r--r--dev-libs/quantlib/quantlib-1.6.ebuild98
4 files changed, 117 insertions, 0 deletions
diff --git a/dev-libs/quantlib/Manifest b/dev-libs/quantlib/Manifest
new file mode 100644
index 00000000000..e9b05d5771f
--- /dev/null
+++ b/dev-libs/quantlib/Manifest
@@ -0,0 +1 @@
+DIST QuantLib-1.6.tar.gz 8714267 SHA256 a135d424a59cbb00a75d7f7ac3a181d49e804abae1776b555ec0183e309f81ce SHA512 c38cc894873a36942c022c1d70eb7b0c5f2e9208ee9e949a656aef02fb9fe95436955b560b61188ea5a374f4b7674b46629178779e066135396f291788d772c4 WHIRLPOOL 5d94afd8f608ef81c207921f5b7b8237ea2eaca71844fe27206d4b0e7ed77e99d4c9e5c2e6c74649e82a95ca5d3fb8528e6c8ee929a849a7254cbee41ab9607e
diff --git a/dev-libs/quantlib/files/50quantlib-gentoo.el b/dev-libs/quantlib/files/50quantlib-gentoo.el
new file mode 100644
index 00000000000..68f6ce00329
--- /dev/null
+++ b/dev-libs/quantlib/files/50quantlib-gentoo.el
@@ -0,0 +1,6 @@
+
+;;; quantlib site-lisp configuration
+
+(add-to-list 'load-path "@SITELISP@")
+(autoload 'ql-new-header "quantlib" nil t)
+(autoload 'ql-new-source "quantlib" nil t)
diff --git a/dev-libs/quantlib/metadata.xml b/dev-libs/quantlib/metadata.xml
new file mode 100644
index 00000000000..061f38a0f8d
--- /dev/null
+++ b/dev-libs/quantlib/metadata.xml
@@ -0,0 +1,12 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+<pkgmetadata>
+ <herd>cpp</herd>
+ <longdescription>
+QuantLib (http://quantlib.org/) is a C++ library for financial
+quantitative analysts and developers.
+</longdescription>
+ <upstream>
+ <remote-id type="sourceforge">quantlib</remote-id>
+ </upstream>
+</pkgmetadata>
diff --git a/dev-libs/quantlib/quantlib-1.6.ebuild b/dev-libs/quantlib/quantlib-1.6.ebuild
new file mode 100644
index 00000000000..65ea1e2c794
--- /dev/null
+++ b/dev-libs/quantlib/quantlib-1.6.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+EAPI=5
+
+inherit elisp-common eutils toolchain-funcs
+
+MY_P="QuantLib-${PV}"
+
+DESCRIPTION="A comprehensive software framework for quantitative finance"
+HOMEPAGE="http://quantlib.org/"
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+
+LICENSE="BSD"
+SLOT="0"
+KEYWORDS="~amd64 ~x86"
+IUSE="debug doc emacs examples openmp static-libs"
+
+RDEPEND="dev-libs/boost:="
+DEPEND="${RDEPEND}
+ doc? ( app-doc/doxygen[dot] )
+ emacs? ( virtual/emacs )"
+
+DOCS="*.txt"
+
+S="${WORKDIR}/${MY_P}"
+
+SITEFILE="50${PN}-gentoo.el"
+
+pkg_setup() {
+ if use openmp ; then
+ tc-has-openmp || die "Please switch to an openmp compatible compiler"
+ fi
+}
+
+src_prepare() {
+ epatch_user
+}
+
+src_configure() {
+ # NOTE: Too fragile for single .pdf or .ps document
+ local prog
+ for prog in DVIPS LATEX MAKEINDEX PDFLATEX; do
+ export ac_cv_path_${prog}=no
+ done
+
+ use doc || export ac_cv_path_DOXYGEN=no
+ use emacs || export ac_cv_prog_EMACS=no
+
+ # NOTE: --enable-examples will only change noinst_PROGRAMS to bin_PROGRAMS
+ econf \
+ $(use_enable debug error-functions) \
+ $(use_enable debug error-lines) \
+ $(use_enable debug tracing) \
+ $(use_enable openmp) \
+ $(use_enable static-libs static) \
+ --enable-examples \
+ --with-lispdir="${SITELISP}/${PN}"
+}
+
+src_compile() {
+ default
+
+ if use doc; then
+ pushd Docs >/dev/null
+ emake docs-html
+ popd >/dev/null
+ fi
+}
+
+src_install(){
+ default
+ prune_libtool_files
+
+ if use doc; then
+ find Docs \( -name '.time-stamp*' -o -name '*.doxy' -o -name 'Makefile*' \) -delete || die
+ insinto "/usr/share/doc/${PF}"
+ doins -r Docs
+ fi
+
+ if use examples; then
+ find Examples -name '.libs' -exec rm -rf {} + || die
+ find Examples \( -name '*vc*proj*' -o -name '*.dev' -o -name 'Makefile*' -o -name '*.o' \) -delete || die
+ insinto "/usr/share/doc/${PF}"
+ doins -r Examples
+ fi
+
+ use emacs && elisp-site-file-install "${FILESDIR}/${SITEFILE}"
+}
+
+pkg_postinst() {
+ use emacs && elisp-site-regen
+}
+
+pkg_postrm() {
+ use emacs && elisp-site-regen
+}