1 # Copyright 1999-2020 Gentoo Authors
2 # Distributed under the terms of the GNU General Public License v2
6 CMAKE_MAKEFILE_GENERATOR="emake"
7 PYTHON_COMPAT=( python3_{6,7} )
8 inherit cmake flag-o-matic linux-info python-any-r1
10 if [[ ${PV} == 9999 ]] ; then
12 EGIT_REPO_URI="https://github.com/cryfs/cryfs"
14 SRC_URI="https://github.com/cryfs/cryfs/releases/download/${PV}/${P}.tar.xz"
15 KEYWORDS="~amd64 ~arm ~arm64 ~x86"
19 DESCRIPTION="Encrypted FUSE filesystem that conceals metadata"
20 HOMEPAGE="https://www.cryfs.org/"
24 # crypto++ - Boost-1.0
25 LICENSE="LGPL-3 MIT Boost-1.0"
27 IUSE="custom-optimization debug libressl test"
28 RESTRICT="!test? ( test )"
31 >=dev-libs/boost-1.65.1:=
34 !libressl? ( dev-libs/openssl:0= )
35 libressl? ( dev-libs/libressl:= )
42 local CONFIG_CHECK="~FUSE_FS"
43 local WARNING_FUSE_FS="CONFIG_FUSE_FS is required for cryfs support."
51 # don't install compressed manpage
52 cmake_comment_add_subdirectory doc
54 # remove tests that require internet access to comply with Gentoo policy
55 sed -e "/CurlHttpClientTest.cpp/d" -e "/FakeHttpClientTest.cpp/d" \
56 -i test/cpp-utils/CMakeLists.txt || die
58 # /dev/fuse access denied
59 sed -e "/CliTest_IntegrityCheck/d" \
60 -i test/cryfs-cli/CMakeLists.txt || die
65 -DBoost_USE_STATIC_LIBS=OFF
66 -DCRYFS_UPDATE_CHECKS=OFF
67 -DBUILD_SHARED_LIBS=OFF
68 -DBUILD_TESTING=$(usex test)
70 use custom-optimization || append-flags -O3
79 # fspp fuse tests hang, bug # 699044
80 for i in gitversion cpp-utils parallelaccessstore blockstore blobstore cryfs cryfs-cli ; do
81 "${BUILD_DIR}"/test/${i}/${i}-test || tests_failed+=( "${i}" )
84 if [[ -n ${tests_failed[@]} ]] ; then
85 eerror "The following tests failed:"
86 eerror "${tests_failed[@]}"
87 die "At least one test failed"
92 # work around upstream issue with cmake not creating install target
93 # in Makefile if we enable BUILD_TESTING
94 dobin "${BUILD_DIR}/src/cryfs-cli/cryfs"