1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 PYTHON_COMPAT=( python{2_7,3_{6,7}} )
7 inherit cmake-utils flag-o-matic linux-info python-any-r1
9 if [[ ${PV} == 9999 ]] ; then
11 EGIT_REPO_URI="https://github.com/cryfs/cryfs"
13 SRC_URI="https://github.com/cryfs/cryfs/releases/download/${PV}/${P}.tar.xz"
14 KEYWORDS="amd64 ~arm arm64 x86"
18 DESCRIPTION="Encrypted FUSE filesystem that conceals metadata"
19 HOMEPAGE="https://www.cryfs.org/"
23 IUSE="custom-optimization debug libressl test"
24 RESTRICT="!test? ( test )"
27 >=dev-libs/boost-1.65.1:=
28 >=dev-libs/crypto++-8.2.0:=
31 !libressl? ( dev-libs/openssl:0= )
32 libressl? ( dev-libs/libressl:= )
36 test? ( dev-cpp/gtest )
41 "${FILESDIR}/${P}-unbundle-libs.patch"
42 "${FILESDIR}/${P}-install-targets.patch"
46 local CONFIG_CHECK="~FUSE_FS"
47 local WARNING_FUSE_FS="CONFIG_FUSE_FS is required for cryfs support."
53 cmake-utils_src_prepare
55 # don't install compressed manpage
56 cmake_comment_add_subdirectory doc
58 # remove tests that require internet access to comply with Gentoo policy
59 sed -e "/CurlHttpClientTest.cpp/d" -e "/FakeHttpClientTest.cpp/d" \
60 -i test/cpp-utils/CMakeLists.txt || die
62 # /dev/fuse access denied
63 sed -e "/CliTest_IntegrityCheck/d" \
64 -i test/cryfs-cli/CMakeLists.txt || die
69 -DBoost_USE_STATIC_LIBS=OFF
70 -DCRYFS_UPDATE_CHECKS=OFF
71 -DBUILD_SHARED_LIBS=OFF
73 -DBUILD_TESTING=$(usex test)
75 use custom-optimization || append-flags -O3
77 cmake-utils_src_configure
84 # fspp fuse tests hang, bug # 699044
85 for i in gitversion cpp-utils parallelaccessstore blockstore blobstore cryfs cryfs-cli ; do
86 "${BUILD_DIR}"/test/${i}/${i}-test || tests_failed+=( "${i}" )
89 if [[ -n ${tests_failed[@]} ]] ; then
90 eerror "The following tests failed:"
91 eerror "${tests_failed[@]}"
92 die "At least one test failed"
97 cmake-utils_src_install