From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 29E8013835A for ; Fri, 5 Jun 2020 22:36:38 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 48364E087D; Fri, 5 Jun 2020 22:36:37 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 24AD1E087D for ; Fri, 5 Jun 2020 22:36:37 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 8F55534F2F2 for ; Fri, 5 Jun 2020 22:36:35 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5FA8427E for ; Fri, 5 Jun 2020 22:36:31 +0000 (UTC) From: "Andreas Sturmlechner" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Andreas Sturmlechner" Message-ID: <1591396562.11546b57ee1c41f66f6e87a591d78356402f46e8.asturm@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/dlib/ X-VCS-Repository: repo/gentoo X-VCS-Files: sci-libs/dlib/dlib-19.16-r1.ebuild X-VCS-Directories: sci-libs/dlib/ X-VCS-Committer: asturm X-VCS-Committer-Name: Andreas Sturmlechner X-VCS-Revision: 11546b57ee1c41f66f6e87a591d78356402f46e8 X-VCS-Branch: master Date: Fri, 5 Jun 2020 22:36:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 283ce604-7750-4071-b1a4-9e8961a289f4 X-Archives-Hash: 2bd45f104f7a29a631a6bd17260e21ee commit: 11546b57ee1c41f66f6e87a591d78356402f46e8 Author: Andreas Sturmlechner gentoo org> AuthorDate: Fri Jun 5 21:46:17 2020 +0000 Commit: Andreas Sturmlechner gentoo org> CommitDate: Fri Jun 5 22:36:02 2020 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=11546b57 sci-libs/dlib: EAPI-7 bump, cmake.eclass, drop IUSE="static-libs" EAPI-7 gives us BUILD_SHARED_LIBS=ON by default. Closes: https://bugs.gentoo.org/725466 Closes: https://bugs.gentoo.org/708330 Package-Manager: Portage-2.3.100, Repoman-2.3.22 Signed-off-by: Andreas Sturmlechner gentoo.org> sci-libs/dlib/dlib-19.16-r1.ebuild | 106 +++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) diff --git a/sci-libs/dlib/dlib-19.16-r1.ebuild b/sci-libs/dlib/dlib-19.16-r1.ebuild new file mode 100644 index 00000000000..8baa4aca61b --- /dev/null +++ b/sci-libs/dlib/dlib-19.16-r1.ebuild @@ -0,0 +1,106 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 + +PYTHON_COMPAT=( python3_{6,7,8} ) +DISTUTILS_OPTIONAL=1 +inherit cmake cuda distutils-r1 + +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 cuda debug examples gif jpeg lapack mkl png python sqlite test X cpu_flags_x86_avx cpu_flags_x86_sse2 cpu_flags_x86_sse4_1" +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )" + +RESTRICT="!test? ( test )" + +# doc needs a bunch of deps not in portage +RDEPEND=" + cblas? ( virtual/cblas ) + cuda? ( dev-libs/cudnn:= ) + gif? ( media-libs/giflib:= ) + jpeg? ( virtual/jpeg:0= ) + lapack? ( virtual/lapack ) + mkl? ( sci-libs/mkl ) + png? ( media-libs/libpng:0= ) + python? ( ${PYTHON_DEPS} ) + sqlite? ( dev-db/sqlite:3 ) + X? ( x11-libs/libX11 )" +DEPEND="${RDEPEND}" +BDEPEND="python? ( test? ( dev-python/pytest[${PYTHON_USEDEP}] ) )" + +DOCS=( docs/README.txt ) + +src_prepare() { + use cuda && cuda_src_prepare + cmake_src_prepare + use python && distutils-r1_src_prepare +} + +python_configure_all() { + mydistutilsargs=( + --"$(usex gif)" DLIB_GIF_SUPPORT + --"$(usex jpeg)" DLIB_JPEG_SUPPORT + --"$(usex png)" DLIB_PNG_SUPPORT + --"$(usex X no yes)" DLIB_NO_GUI_SUPPORT + --"$(usex cblas)" DLIB_USE_BLAS + --"$(usex cuda)" DLIB_USE_CUDA + --"$(usex lapack)" DLIB_USE_LAPACK + --"$(usex cpu_flags_x86_avx)" USE_AVX_INSTRUCTIONS + --"$(usex cpu_flags_x86_sse2)" USE_SSE2_INSTRUCTIONS + --"$(usex cpu_flags_x86_sse4_1)" USE_SSE4_INSTRUCTIONS + ) +} + +src_configure() { + local mycmakeargs=( + -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)" + -DUSE_AVX_INSTRUCTIONS="$(usex cpu_flags_x86_avx)" + -DUSE_SSE2_INSTRUCTIONS="$(usex cpu_flags_x86_sse2)" + -DUSE_SSE4_INSTRUCTIONS="$(usex cpu_flags_x86_sse4_1)" + ) + cmake_src_configure + use python && distutils-r1_src_configure +} + +src_compile() { + cmake_src_compile + use python && distutils-r1_src_compile +} + +python_test() { + esetup.py test +} + +src_test() { + mkdir "${BUILD_DIR}"/dlib/test || die + pushd "${BUILD_DIR}"/dlib/test > /dev/null || die + cmake "${S}"/dlib/test || die + emake + ./dtest --runall || die + popd > /dev/null || die + use python && distutils-r1_src_test +} + +src_install() { + cmake_src_install + use python && distutils-r1_src_install + if use examples; then + dodoc -r examples + docompress -x /usr/share/doc/${PF} + fi +}