Gentoo Archives: gentoo-commits

From: Andreas Sturmlechner <asturm@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: sci-libs/dlib/
Date: Sat, 02 Mar 2019 20:11:35
Message-Id: 1551557426.8c8ce92dc34626c4397991b444985f70c3012265.asturm@gentoo
1 commit: 8c8ce92dc34626c4397991b444985f70c3012265
2 Author: Chris Mayo <aklhfex <AT> gmail <DOT> com>
3 AuthorDate: Mon Jan 7 20:35:48 2019 +0000
4 Commit: Andreas Sturmlechner <asturm <AT> gentoo <DOT> org>
5 CommitDate: Sat Mar 2 20:10:26 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c8ce92d
7
8 sci-libs/dlib: version bump 19.16 fixing Python install
9
10 Bug: https://bugs.gentoo.org/659262
11 Bug: https://bugs.gentoo.org/664194
12 Package-Manager: Portage-2.3.51, Repoman-2.3.11
13 Signed-off-by: Chris Mayo <aklhfex <AT> gmail.com>
14 Closes: https://github.com/gentoo/gentoo/pull/9655
15 Signed-off-by: Andreas Sturmlechner <asturm <AT> gentoo.org>
16
17 sci-libs/dlib/Manifest | 1 +
18 sci-libs/dlib/dlib-19.16.ebuild | 108 ++++++++++++++++++++++++++++++++++++++++
19 2 files changed, 109 insertions(+)
20
21 diff --git a/sci-libs/dlib/Manifest b/sci-libs/dlib/Manifest
22 index e29ea272a5f..f46283f5a80 100644
23 --- a/sci-libs/dlib/Manifest
24 +++ b/sci-libs/dlib/Manifest
25 @@ -1,3 +1,4 @@
26 +DIST dlib-19.16.tar.gz 10411975 BLAKE2B 93047590a4d8f4685970d3db6841cbf9cc90ca8a5e50f0929a106d887e5db1b4fd96bbe14380537a3e28369a8db6d9d8c067e7768000ac3c7d0f225b46369326 SHA512 4e040ef88acff05e1a48e499b813c876b22ad3f989d076bdf19969d01036b62e51a0dff30b70046910ba31dfa1b1c2450a7fad41ae3142b7285ed74b8d584887
27 DIST dlib-19.4.tar.gz 7226923 BLAKE2B 2d72936fc46d559a80288e7f88a64c372fb5f8dcfc69b57abee8a27519f3084fa0cf4193261dd9758f9eb718e755d46a17655e38cb74aaa0046855f11676e157 SHA512 23bf80353f9b6ce07b6a3a7df05016705645c18bcf2b3ead567935008ea12c9f6dc0722d9bbacc009bd26f78eb43c1cbecf776bfed5a3445c1f2e8e208f201e2
28 DIST dlib-19.7.tar.gz 7670615 BLAKE2B 13343f3b99bf5dd7a9c032de09eff47f1675bbc978a93edfbd952196b2347e4a887a8eed805f22985477b10ecfa1df85fc568e32f1a00b17b0292a0a51db9764 SHA512 a3877066e04a411d96e910f4229c60a86971a9290e840aa4a5b2f0b102e9b8c37bfede259b80b71ba066d21eb0aa2565808e51d0eab6397ff5fd2bac60dcedd5
29 DIST dlib-19.9.tar.gz 8892457 BLAKE2B d18548e09f8169bbc9d7f339599bd58b940410839b259a8d7be9cb999f82e634ad5cd0539adb45239dab821ea1029493d24ae9990ca32c75c744e2c5d9e218f6 SHA512 1e2123c22e1b13cc84108fa627bfa92eadc9dee63f93a9f45676bbf2b752c8728117d915ac327f5223b0cdbce87dd3bef2f4d8d5ed3f8f5a314ffa9e8962a246
30
31 diff --git a/sci-libs/dlib/dlib-19.16.ebuild b/sci-libs/dlib/dlib-19.16.ebuild
32 new file mode 100644
33 index 00000000000..bdcf3929b23
34 --- /dev/null
35 +++ b/sci-libs/dlib/dlib-19.16.ebuild
36 @@ -0,0 +1,108 @@
37 +# Copyright 1999-2019 Gentoo Authors
38 +# Distributed under the terms of the GNU General Public License v2
39 +
40 +EAPI=6
41 +
42 +PYTHON_COMPAT=( python3_{4,5,6,7} )
43 +DISTUTILS_OPTIONAL=1
44 +inherit cmake-utils cuda distutils-r1
45 +
46 +DESCRIPTION="Numerical and networking C++ library"
47 +HOMEPAGE="http://dlib.net/"
48 +SRC_URI="https://github.com/davisking/dlib/archive/v${PV}.tar.gz -> ${P}.tar.gz"
49 +
50 +LICENSE="Boost-1.0"
51 +SLOT="0/${PV}"
52 +KEYWORDS="~amd64 ~x86 ~amd64-linux ~x86-linux"
53 +IUSE="cblas cuda debug examples gif jpeg lapack mkl png python sqlite static-libs test X cpu_flags_x86_avx cpu_flags_x86_sse2 cpu_flags_x86_sse4_1"
54 +REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
55 +
56 +# doc needs a bunch of deps not in portage
57 +
58 +RDEPEND="
59 + cblas? ( virtual/cblas:= )
60 + cuda? ( dev-libs/cudnn:= )
61 + gif? ( media-libs/giflib:= )
62 + jpeg? ( virtual/jpeg:0= )
63 + lapack? ( virtual/lapack:= )
64 + mkl? ( sci-libs/mkl:= )
65 + png? ( media-libs/libpng:0= )
66 + python? ( ${PYTHON_DEPS} )
67 + sqlite? ( dev-db/sqlite:3= )
68 + X? ( x11-libs/libX11:= )"
69 +DEPEND="${RDEPEND}
70 + python? (
71 + dev-python/setuptools[${PYTHON_USEDEP}]
72 + test? ( dev-python/pytest[${PYTHON_USEDEP}] )
73 + )"
74 +
75 +DOCS=( docs/README.txt )
76 +
77 +src_prepare() {
78 + use cuda && cuda_src_prepare
79 + cmake-utils_src_prepare
80 + use python && distutils-r1_src_prepare
81 +}
82 +
83 +python_configure_all() {
84 + mydistutilsargs=(
85 + --"$(usex gif)" DLIB_GIF_SUPPORT
86 + --"$(usex jpeg)" DLIB_JPEG_SUPPORT
87 + --"$(usex png)" DLIB_PNG_SUPPORT
88 + --"$(usex X no yes)" DLIB_NO_GUI_SUPPORT
89 + --"$(usex cblas)" DLIB_USE_BLAS
90 + --"$(usex cuda)" DLIB_USE_CUDA
91 + --"$(usex lapack)" DLIB_USE_LAPACK
92 + --"$(usex cpu_flags_x86_avx)" USE_AVX_INSTRUCTIONS
93 + --"$(usex cpu_flags_x86_sse2)" USE_SSE2_INSTRUCTIONS
94 + --"$(usex cpu_flags_x86_sse4_1)" USE_SSE4_INSTRUCTIONS
95 + )
96 +}
97 +
98 +src_configure() {
99 + local mycmakeargs=(
100 + -DDLIB_ENABLE_ASSERTS="$(usex debug)"
101 + -DDLIB_ENABLE_STACK_TRACE="$(usex debug)"
102 + -DDLIB_GIF_SUPPORT="$(usex gif)"
103 + -DDLIB_JPEG_SUPPORT="$(usex jpeg)"
104 + -DDLIB_PNG_SUPPORT="$(usex png)"
105 + -DDLIB_LINK_WITH_SQLITE3="$(usex sqlite)"
106 + -DDLIB_NO_GUI_SUPPORT="$(usex X OFF ON)"
107 + -DDLIB_USE_BLAS="$(usex cblas)"
108 + -DDLIB_USE_CUDA="$(usex cuda)"
109 + -DDLIB_USE_LAPACK="$(usex lapack)"
110 + -DUSE_AVX_INSTRUCTIONS="$(usex cpu_flags_x86_avx)"
111 + -DUSE_SSE2_INSTRUCTIONS="$(usex cpu_flags_x86_sse2)"
112 + -DUSE_SSE4_INSTRUCTIONS="$(usex cpu_flags_x86_sse4_1)"
113 + )
114 + cmake-utils_src_configure
115 + use python && distutils-r1_src_configure
116 +}
117 +
118 +src_compile() {
119 + cmake-utils_src_compile
120 + use python && distutils-r1_src_compile
121 +}
122 +
123 +python_test() {
124 + esetup.py test
125 +}
126 +
127 +src_test() {
128 + mkdir "${BUILD_DIR}"/dlib/test || die
129 + pushd "${BUILD_DIR}"/dlib/test > /dev/null || die
130 + cmake "${S}"/dlib/test && emake
131 + ./dtest --runall || die
132 + popd > /dev/null || die
133 + use python && distutils-r1_src_test
134 +}
135 +
136 +src_install() {
137 + cmake-utils_src_install
138 + use python && distutils-r1_src_install
139 + use static-libs || rm -f "${ED}"/usr/$(get_libdir)/*.a
140 + if use examples; then
141 + dodoc -r examples
142 + docompress -x /usr/share/doc/${PF}
143 + fi
144 +}