summaryrefslogtreecommitdiff
path: root/sci-libs/dlib/dlib-19.4.ebuild
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
committerV3n3RiX <venerix@redcorelinux.org>2017-10-09 18:53:29 +0100
commit4f2d7949f03e1c198bc888f2d05f421d35c57e21 (patch)
treeba5f07bf3f9d22d82e54a462313f5d244036c768 /sci-libs/dlib/dlib-19.4.ebuild
reinit the tree, so we can have metadata
Diffstat (limited to 'sci-libs/dlib/dlib-19.4.ebuild')
-rw-r--r--sci-libs/dlib/dlib-19.4.ebuild71
1 files changed, 71 insertions, 0 deletions
diff --git a/sci-libs/dlib/dlib-19.4.ebuild b/sci-libs/dlib/dlib-19.4.ebuild
new file mode 100644
index 000000000000..c6116343a93b
--- /dev/null
+++ b/sci-libs/dlib/dlib-19.4.ebuild
@@ -0,0 +1,71 @@
+# Copyright 1999-2017 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=6
+
+inherit cmake-utils cuda
+
+DESCRIPTION="Numerical and networking C++ library"
+HOMEPAGE="http://dlib.net/"
+SRC_URI="https://github.com/davisking/dlib/archive/v${PV}.tar.gz -> ${P}.tar.gz"
+
+LICENSE="Boost-1.0"
+SLOT="0/${PV}"
+KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
+IUSE="cblas debug cuda examples gif jpeg lapack mkl png
+ sqlite static-libs test X"
+
+# doc needs a bunch of deps not in portage
+
+RDEPEND="
+ cblas? ( virtual/cblas:= )
+ cuda? ( dev-libs/cudnn:= )
+ jpeg? ( virtual/jpeg:0= )
+ lapack? ( virtual/lapack:= )
+ mkl? ( sci-libs/mkl:= )
+ png? ( media-libs/libpng:0= )
+ sqlite? ( dev-db/sqlite:3= )
+ X? ( x11-libs/libX11:= )
+"
+DEPEND="test? ( ${RDEPEND} )"
+
+src_prepare() {
+ use cuda && cuda_src_prepare
+ cmake-utils_src_prepare
+ sed -i -e '/LICENSE.txt/d' dlib/CMakeLists.txt || die
+}
+
+src_configure() {
+ local mycmakeargs=(
+ -DLIB_INSTALL_DIR="$(get_libdir)"
+ -DDLIB_ENABLE_ASSERTS="$(usex debug)"
+ -DDLIB_ENABLE_STACK_TRACE="$(usex debug)"
+ -DDLIB_GIF_SUPPORT="$(usex gif)"
+ -DDLIB_JPEG_SUPPORT="$(usex jpeg)"
+ -DDLIB_PNG_SUPPORT="$(usex png)"
+ -DDLIB_LINK_WITH_SQLITE3="$(usex sqlite)"
+ -DDLIB_NO_GUI_SUPPORT="$(usex X OFF ON)"
+ -DDLIB_USE_BLAS="$(usex cblas)"
+ -DDLIB_USE_CUDA="$(usex cuda)"
+ -DDLIB_USE_LAPACK="$(usex lapack)"
+ )
+ cmake-utils_src_configure
+}
+
+src_test() {
+ mkdir "${BUILD_DIR}"/dlib/test || die
+ pushd "${BUILD_DIR}"/dlib/test > /dev/null || die
+ cmake "${S}"/dlib/test && emake
+ ./dtest --runall || die
+ popd > /dev/null || die
+}
+
+src_install() {
+ cmake-utils_src_install
+ dodoc docs/README.txt
+ use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
+ if use examples; then
+ dodoc -r examples
+ docompress -x /usr/share/doc/${PF}
+ fi
+}