diff options
author | Denis Reva <denis7774@gmail.com> | 2024-09-24 19:54:22 +0500 |
---|---|---|
committer | Denis Reva <denis7774@gmail.com> | 2024-09-24 19:54:32 +0500 |
commit | 0231b7d21224c2a37ea7049d2283da6e326ed688 (patch) | |
tree | 4153fffcc762d8291668cc8f40dc16fd26107428 | |
parent | media-libs/openxr-loader: make sure to build with system jsoncpp (diff) | |
download | guru-0231b7d21224c2a37ea7049d2283da6e326ed688.tar.gz guru-0231b7d21224c2a37ea7049d2283da6e326ed688.tar.bz2 guru-0231b7d21224c2a37ea7049d2283da6e326ed688.zip |
sys-fs/dwarfs: add 0.10.1
Signed-off-by: Denis Reva <denis7774@gmail.com>
-rw-r--r-- | sys-fs/dwarfs/Manifest | 1 | ||||
-rw-r--r-- | sys-fs/dwarfs/dwarfs-0.10.1.ebuild | 109 | ||||
-rw-r--r-- | sys-fs/dwarfs/files/dwarfs-libfmt9.patch | 42 | ||||
-rw-r--r-- | sys-fs/dwarfs/metadata.xml | 8 |
4 files changed, 160 insertions, 0 deletions
diff --git a/sys-fs/dwarfs/Manifest b/sys-fs/dwarfs/Manifest index f534590c3..4ce81afd6 100644 --- a/sys-fs/dwarfs/Manifest +++ b/sys-fs/dwarfs/Manifest @@ -1 +1,2 @@ +DIST dwarfs-0.10.1.tar.xz 11731244 BLAKE2B 5885e7dc4092dd678383958839afcc02e906c95dcb8e2af2a649738a3d41196ec51f17a4362b413863136bd67cbd3d8225c147ed2da1a089561ec6e5d2587d4b SHA512 5dcfde0698f0ea9aecda51387b392cf58abbd5b94af178bfe741331bc78b24e2f837cbfbe63bc36c7c6117b4c8206418946ca93e91b5660f6b7d0a14f2817101 DIST dwarfs-0.9.10.tar.xz 18618308 BLAKE2B be992c645b76c277e08c5ccaa80665c7303a8a218ead430b2f382b1f537d42debd095c94697dfff24246985d70efb70aeae8d4f4e68f3461bc0dca3f6135a184 SHA512 c67ac3586a7f36e4439a1c63b292ad1f1c61e6bc307b9711785a97d7146c686bc3918ff031188bfaa741829114a661e80bb7e4b5d7ce4f4b3f6d1e86e8532ec9 diff --git a/sys-fs/dwarfs/dwarfs-0.10.1.ebuild b/sys-fs/dwarfs/dwarfs-0.10.1.ebuild new file mode 100644 index 000000000..7f629f6c9 --- /dev/null +++ b/sys-fs/dwarfs/dwarfs-0.10.1.ebuild @@ -0,0 +1,109 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit check-reqs cmake flag-o-matic + +DESCRIPTION="A fast high compression read-only file system for Linux, Windows and macOS" +HOMEPAGE="https://github.com/mhx/dwarfs" +SRC_URI="https://github.com/mhx/dwarfs/releases/download/v${PV}/${P}.tar.xz" + +LICENSE="GPL-3" +SLOT="0" +KEYWORDS="~amd64" +IUSE="+jemalloc test +tools +fuse +perfmon flac ricepp stacktrace" +S="${WORKDIR}/dwarfs-${PV}" + +PATCHES=( + "${FILESDIR}"/dwarfs-libfmt9.patch +) + +RDEPEND=" + >=app-arch/libarchive-3.6.0 + >=app-arch/brotli-1.0.9 + >=app-arch/lz4-1.9.3 + >=app-arch/xz-utils-5.2.5 + >=app-arch/zstd-1.4.8 + dev-cpp/gflags + dev-cpp/glog[gflags] + >=dev-cpp/parallel-hashmap-1.3.8 + dev-libs/boost[context] + dev-libs/double-conversion + dev-libs/libevent + >=dev-libs/libfmt-9.1.0 + dev-libs/utfcpp + >=dev-libs/xxhash-0.8.1 + flac? ( >=media-libs/flac-1.4.2 ) + fuse? ( sys-fs/fuse:3 ) + sys-libs/binutils-libs + stacktrace? ( sys-libs/libunwind ) + sys-libs/zlib + jemalloc? ( >=dev-libs/jemalloc-5.2.1 ) + test? ( >=dev-cpp/gtest-1.13.0 ) +" + +DEPEND=" + ${RDEPEND} +" +BDEPEND=" + virtual/pkgconfig +" + +FEATURES=" + stacktrace? ( nostrip ) +" + +DOCS=( "README.md" "CHANGES.md" "TODO" ) +RESTRICT="!test? ( test )" + +CHECKREQS_DISK_BUILD="500M" +CMAKE_WARN_UNUSED_CLI=0 + +src_prepare(){ + cmake_src_prepare + sed "s/DESTINATION lib/DESTINATION $(get_libdir)/" -i cmake/libdwarfs.cmake || die +} + +src_configure(){ + mycmakeargs=( + -DUSE_JEMALLOC=$(usex jemalloc ON OFF) + -DWITH_TESTS=$(usex test ON OFF) + -DWITH_MAN_PAGES=ON + -DWITH_MAN_OPTION=ON + -DWITH_LIBDWARFS=ON + -DWITH_TOOLS=$(usex tools ON OFF) + -DWITH_FUSE_DRIVER=$(usex fuse ON OFF) + -DENABLE_PERFMON=$(usex perfmon ON OFF) + -DTRY_ENABLE_FLAC=$(usex flac ON OFF) + -DENABLE_RICEPP=$(usex ricepp ON OFF) + -DENABLE_STACKTRACE=$(usex stacktrace ON OFF) + -DWITH_LEGACY_FUSE=OFF + -DPREFER_SYSTEM_GTEST=ON + ) + cmake_src_configure +} + +src_test(){ + export DWARFS_SKIP_FUSE_TESTS=1 + local CMAKE_SKIP_TESTS=( + # Perfmon is not working within sandbox + dwarfsextract_test.perfmon + ) + + cmake_src_test +} + +pkg_postinst(){ + elog "More information: ${HOMEPAGE}" + if use tools ; then + elog " creating images: mkdwarfs --man" + elog " creating images: man mkdwarfs" + elog " creating images: ${HOMEPAGE}/blob/main/doc/mkdwarfs.md" + fi + if use fuse ; then + elog " mounting images: dwarfs --man" + elog " mounting images: man dwarfs" + elog " mounting images: ${HOMEPAGE}/blob/main/doc/dwarfs.md" + fi +} diff --git a/sys-fs/dwarfs/files/dwarfs-libfmt9.patch b/sys-fs/dwarfs/files/dwarfs-libfmt9.patch new file mode 100644 index 000000000..18f991403 --- /dev/null +++ b/sys-fs/dwarfs/files/dwarfs-libfmt9.patch @@ -0,0 +1,42 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 09bbdb07..bc1b7397 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -77,7 +77,7 @@ endif() + # We only use these libraries for building the binary targets, we won't + # install them. + +-set(LIBFMT_REQUIRED_VERSION 10.0) ++set(LIBFMT_REQUIRED_VERSION 9.1) + set(LIBFMT_PREFERRED_VERSION 11.0.2) + + set(GOOGLETEST_REQUIRED_VERSION 1.13.0) +diff --git a/src/logger.cpp b/src/logger.cpp +index 99ad5885..f8121600 100644 +--- a/src/logger.cpp ++++ b/src/logger.cpp +@@ -278,8 +278,9 @@ std::string get_logger_context(char const* path, int line) { + + std::string get_current_time_string() { + using namespace std::chrono; +- auto now = floor<microseconds>(system_clock::now()); +- return fmt::format("{:%H:%M:%S}", now); ++ auto now = system_clock::now(); ++ int us = floor<microseconds>(now.time_since_epoch()).count() % 1'000'000; ++ return fmt::format("{:%H:%M:%S}.{:06}", floor<seconds>(now), us); + } + + } // namespace dwarfs +diff --git a/test/tool_main_test.cpp b/test/tool_main_test.cpp +index e56f7b34..53203f29 100644 +--- a/test/tool_main_test.cpp ++++ b/test/tool_main_test.cpp +@@ -2488,7 +2488,7 @@ class segmenter_repeating_sequence_test : public testing::TestWithParam<char> { + }; + + TEST_P(segmenter_repeating_sequence_test, github161) { +- auto byte = GetParam(); ++ uint8_t byte = GetParam(); + + static constexpr int const final_bytes{10'000'000}; + static constexpr int const repetitions{2'000}; diff --git a/sys-fs/dwarfs/metadata.xml b/sys-fs/dwarfs/metadata.xml index 38be78d24..688ba594e 100644 --- a/sys-fs/dwarfs/metadata.xml +++ b/sys-fs/dwarfs/metadata.xml @@ -24,5 +24,13 @@ <bugs-to>https://github.com/mhx/dwarfs/issues</bugs-to> <remote-id type="github">mhx/dwarfs</remote-id> </upstream> + <use> + <flag name="perfmon">Simple dwarfs performance monitoring. See https://github.com/mhx/dwarfs?tab=readme-ov-file#performance-monitoring . It has no impact on performance</flag> + <flag name="ricepp">Enable ricepp compression algorithm, which builds on the basic idea of Rice compression (see the https://en.wikipedia.org/wiki/Golomb_coding ) with a few enhancements.</flag> + <flag name="fuse">Build dwarfs Fuse driver for image mounting</flag> + <flag name="tools">Build dwarfs tools for creating and extracting images</flag> + <flag name="stacktrace">Enable support for debug build with stacktracing</flag> + <flag name="flac">Add support for FLAC: Free Lossless Audio Codec as compression algorithm</flag> + </use> </pkgmetadata> |