public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] repo/proj/guru:dev commit in: sys-fs/dwarfs/files/, sys-fs/dwarfs/
@ 2021-03-09  3:24 Denis Reva
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Reva @ 2021-03-09  3:24 UTC (permalink / raw
  To: gentoo-commits

commit:     cdad97b8e0077bde07d9a43f381d2546dab91eed
Author:     Denis Reva <denis7774 <AT> gmail <DOT> com>
AuthorDate: Tue Mar  9 03:24:36 2021 +0000
Commit:     Denis Reva <denis7774 <AT> gmail <DOT> com>
CommitDate: Tue Mar  9 03:24:46 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=cdad97b8

sys-fs/dwarfs: new version 0.4.0

Key features:
* Up to twice as fast and up to 10% better compression
* New dwarfsextract tool
  Allow extracting dwarfs images as archives.
* Bugfixes.
  Fixed bug with revdep-rebuild.
  Package now proper use system libraries.

Package-Manager: Portage-3.0.13, Repoman-3.0.2
Signed-off-by: Denis Reva <denis7774 <AT> gmail.com>

 sys-fs/dwarfs/Manifest                      |  1 +
 sys-fs/dwarfs/dwarfs-0.4.0.ebuild           | 98 +++++++++++++++++++++++++++++
 sys-fs/dwarfs/files/dwarfs-0.4.0-link.patch | 20 ++++++
 3 files changed, 119 insertions(+)

diff --git a/sys-fs/dwarfs/Manifest b/sys-fs/dwarfs/Manifest
index 4a31b877..76f32318 100644
--- a/sys-fs/dwarfs/Manifest
+++ b/sys-fs/dwarfs/Manifest
@@ -1,4 +1,5 @@
 DIST dwarfs-0.2.4.tar.gz 131125 BLAKE2B 06dd11a90d203882a6b2398d6a3e763a269746a57394444e67913bbb66176305e3d6d606a7f35b4c3692d1d761e90d853b268f876004be1e8274b5b16174dcde SHA512 2136f1159eaf80afd6f5a1edda65c7a7f2cb147c7b14a5d19981fbd417e8785c2d7f986df3787587b4b5157bfd299159f4015a017d289bb0c9fba77b337ed3b5
 DIST dwarfs-0.3.1.tar.bz2 8704811 BLAKE2B f7f5a2affae5da78d526891017ac66ed16f73919c7b990b558413c028590e3e3efa2f7e8cc70d97cbad2a0332d91458444898611ea86343a5978bcdf2ed1bf3b SHA512 5776f5da14a5ccbe0e1cf11acec1c9360aa23e2f6751f54a5df200d4625ffc1892658bd4d987ae15fb08ec1f97d7db2a8c42ed80bb6aae062a45e50513e09f51
+DIST dwarfs-0.4.0.tar.bz2 11634383 BLAKE2B a401e891f5453bd8cccbc664066f759c5ffa60568305b44d57fbcc239d6759ff2e6d5fb1450c7424be14e9eb7ab4f9996dce54a78de6e6e5d8b1cbe2d15dc4eb SHA512 b815c4bdb1ac61798ead817f27d8fbfaf234d2698d9f72427b7cd55fd334214f595baf286c979fee344b34c7589d5859df8c6e8259473bf13d7461f1f63d90a6
 DIST fbthrift-2020.11.30.00.tar.gz 5274706 BLAKE2B ad13eb7b66f804c7a667746d72298e05726d1f78a49523a10f2712cc4dbea71999590a2c420e8081d32dc24a7d203e11d5c7e5c15f2627594295cd5533096dd9 SHA512 33b4c1a4cfc8783f99d5da8ae113f877e1f23586f5a854833107805fe35834604e677d7abe690cefeb70baed20cb3cc14449cfae35a9af89594974377bbe0329
 DIST folly-2020.11.30.00.tar.gz 3261437 BLAKE2B 5070819f1f8bac2030e761a8d2330379e8e5ba242d21330b98dcd598cb18e12046a9ad3fb6462f82dbc47c53cf0905c330e707201bfbbedb81f203ef1b30731e SHA512 e7e06bd8c8e38af345d20a04886b4497c4f0c9877263dbcb5a3f2d17c7a3252a2529086a5a04d07c2d3a457ca3930c43672fc4f74b7bdbc2ec0d07abdf1ed425

diff --git a/sys-fs/dwarfs/dwarfs-0.4.0.ebuild b/sys-fs/dwarfs/dwarfs-0.4.0.ebuild
new file mode 100644
index 00000000..2f42f924
--- /dev/null
+++ b/sys-fs/dwarfs/dwarfs-0.4.0.ebuild
@@ -0,0 +1,98 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit cmake check-reqs python-single-r1
+
+DESCRIPTION="A fast very high compression read-only FUSE file system"
+HOMEPAGE="https://github.com/mhx/dwarfs"
+
+SRC_URI="https://github.com/mhx/dwarfs/releases/download/v${PV}/dwarfs-${PV}.tar.bz2 -> ${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS="~amd64 ~arm64 ~x86"
+IUSE="python +jemalloc"
+
+#test IUSE disabled because there is no googletest in portage tree at this moment
+#-DWITH_TESTS=$(usex test ON OFF)
+
+PYTHON_REQ_USE="python"
+
+DEPEND="sys-devel/flex
+		sys-devel/binutils:*"
+RDEPEND="dev-libs/boost[context,threads,python?]
+		dev-libs/double-conversion
+		dev-libs/libfmt
+		dev-libs/libevent
+		dev-libs/xxhash
+		jemalloc? ( >=dev-libs/jemalloc-5.2.1 )
+		app-arch/libarchive
+		app-arch/zstd
+		app-arch/lz4
+		app-arch/xz-utils
+		app-arch/snappy
+		dev-cpp/sparsehash
+		dev-cpp/gflags
+		dev-cpp/glog[gflags]
+		sys-fs/fuse:3
+		sys-libs/binutils-libs
+		sys-libs/zlib
+		sys-libs/libunwind
+		!dev-cpp/folly"
+BDEPEND="app-text/ronn
+		dev-util/cmake
+		sys-apps/sed
+		sys-devel/bison
+		virtual/pkgconfig"
+
+CHECKREQS_DISK_BUILD="1.2G"
+
+PATCHES=( ${FILESDIR}/dwarfs-0.4.0-link.patch )
+
+DOCS=( "README.md" "CHANGES.md" "TODO" )
+
+CMAKE_IN_SOURCE_BUILD=1
+CMAKE_WARN_UNUSED_CLI=0
+
+src_prepare(){
+	cmake_src_prepare
+	einfo "setting library path to $(get_libdir)"
+	sed "s/DESTINATION lib/DESTINATION $(get_libdir)/" -i CMakeLists.txt || die
+}
+
+src_configure(){
+	einfo "setting configuration flags to:"
+	mycmakeargs=(
+		-DUSE_JEMALLOC=$(usex jemalloc ON OFF)
+		-DWITH_PYTHON=$(usex python ON OFF)
+		-DPREFER_SYSTEM_ZSTD=1
+		-DPREFER_SYSTEM_XXHASH=1
+		-DWITH_LEGACY_FUSE=0
+	)
+	if use python; then mycmakeargs+=( -DWITH_PYTHON_VERSION=${EPYTHON#python} ); fi
+	einfo ${mycmakeargs}
+	cmake_src_configure
+}
+
+src_install(){
+	cmake_src_install
+	dolib.so libmetadata_thrift.so libthrift_light.so
+	dolib.so folly/libfolly.so.0.58.0-dev folly/libfolly.so
+}
+
+pkg_postinst(){
+	elog "Test shows that dwarfs compiled with Clang is substantially faster than GCC ones"
+	elog "See https://github.com/mhx/dwarfs/issues/14"
+	elog "So you may want to compile it independently with Clang by the"
+	elog "https://wiki.gentoo.org/wiki/Clang"
+	elog "And with the per-package settings:"
+	elog "https://wiki.gentoo.org/wiki/Handbook:AMD64/Portage/Advanced#Per-package_environment_variables"
+	elog "Also you may find more information in the"
+	elog "${HOMEPAGE}"
+	elog "About creating: ${HOMEPAGE}/blob/main/doc/mkdwarfs.md"
+	elog "About mounting: ${HOMEPAGE}/blob/main/doc/dwarfs.md"
+}

diff --git a/sys-fs/dwarfs/files/dwarfs-0.4.0-link.patch b/sys-fs/dwarfs/files/dwarfs-0.4.0-link.patch
new file mode 100644
index 00000000..93c4b4f2
--- /dev/null
+++ b/sys-fs/dwarfs/files/dwarfs-0.4.0-link.patch
@@ -0,0 +1,20 @@
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index 18fa5cd..36fc0b3 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -258,8 +258,6 @@ add_executable(dwarfsextract src/dwarfsextract.cpp)
+ 
+ list(APPEND BINARY_TARGETS mkdwarfs dwarfsck dwarfsbench dwarfsextract)
+ 
+-target_link_libraries(dwarfsextract PkgConfig::LIBARCHIVE)
+-
+ if(FUSE3_FOUND)
+   add_executable(dwarfs-bin src/dwarfs.cpp)
+   target_compile_definitions(dwarfs-bin PRIVATE _FILE_OFFSET_BITS=64
+@@ -482,6 +480,7 @@ target_link_libraries(
+   thrift_light
+   folly
+   ${Boost_LIBRARIES}
++  PkgConfig::LIBARCHIVE
+   PkgConfig::LIBLZ4
+   PkgConfig::LIBLZMA)


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: sys-fs/dwarfs/files/, sys-fs/dwarfs/
@ 2021-04-28 21:15 Alessandro Barbieri
  0 siblings, 0 replies; 6+ messages in thread
From: Alessandro Barbieri @ 2021-04-28 21:15 UTC (permalink / raw
  To: gentoo-commits

commit:     0b9e1a113f834824b89ecdadf6ecef29ab31689e
Author:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Wed Apr 28 21:06:34 2021 +0000
Commit:     Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
CommitDate: Wed Apr 28 21:15:06 2021 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0b9e1a11

sys-fs/dwarfs: unbundling WIP

doesn't build but it's a start
hope I didn't mess up while rebasing

Package-Manager: Portage-3.0.18, Repoman-3.0.3
Signed-off-by: Alessandro Barbieri <lssndrbarbieri <AT> gmail.com>

 sys-fs/dwarfs/dwarfs-0.5.4-r3.ebuild              | 106 +++++++++++++++
 sys-fs/dwarfs/files/unbundle-folly-fbthrift.patch | 153 ++++++++++++++++++++++
 2 files changed, 259 insertions(+)

diff --git a/sys-fs/dwarfs/dwarfs-0.5.4-r3.ebuild b/sys-fs/dwarfs/dwarfs-0.5.4-r3.ebuild
new file mode 100644
index 000000000..f45a47b0b
--- /dev/null
+++ b/sys-fs/dwarfs/dwarfs-0.5.4-r3.ebuild
@@ -0,0 +1,106 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{7,8,9} )
+
+inherit check-reqs cmake flag-o-matic python-single-r1
+
+DESCRIPTION="A fast very high compression read-only FUSE file system"
+HOMEPAGE="https://github.com/mhx/dwarfs"
+
+SRC_URI="https://github.com/mhx/dwarfs/releases/download/v${PV}/${P}.tar.bz2"
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+
+IUSE="python +jemalloc test"
+RESTRICT="!test? ( test )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+
+PATCHES=( "${WORKDIR}/unbundle-folly-fbthrift.patch" )
+
+RDEPEND="
+	${PYTHON_DEPS}
+	app-arch/libarchive
+	app-arch/lz4
+	app-arch/snappy
+	app-arch/xz-utils
+	app-arch/zstd
+	dev-cpp/fbthrift:=
+	dev-cpp/folly:=
+	dev-cpp/gflags
+	dev-cpp/glog[gflags]
+	dev-cpp/sparsehash
+	dev-libs/boost[context,threads,python?]
+	dev-libs/double-conversion
+	dev-libs/libevent
+	dev-libs/libfmt
+	dev-libs/xxhash
+	sys-fs/fuse:3
+	sys-libs/binutils-libs
+	sys-libs/libunwind
+	sys-libs/zlib
+
+	jemalloc? ( >=dev-libs/jemalloc-5.2.1 )
+"
+DEPEND="
+	${RDEPEND}
+	sys-devel/flex
+"
+BDEPEND="
+	app-text/ronn
+	sys-devel/bison
+	virtual/pkgconfig
+
+	test? ( dev-cpp/gtest )
+"
+>>>>>>> f29f4045 (sys-fs/dwarfs: unbundling WIP):sys-fs/dwarfs/dwarfs-0.5.4-r1.ebuild
+
+CHECKREQS_DISK_BUILD="1300M"
+
+DOCS=( "README.md" "CHANGES.md" "TODO" )
+
+CMAKE_IN_SOURCE_BUILD=1
+CMAKE_WARN_UNUSED_CLI=0
+
+src_prepare(){
+	cmake_src_prepare
+	einfo "setting library path to $(get_libdir)"
+	sed "s/DESTINATION lib/DESTINATION $(get_libdir)/" -i CMakeLists.txt || die
+}
+
+src_configure(){
+	append-cxxflag "-I/usr/include/folly"
+
+	einfo "setting configuration flags to:"
+	mycmakeargs=(
+		-DUSE_JEMALLOC=$(usex jemalloc ON OFF)
+		-DWITH_PYTHON=$(usex python ON OFF)
+		-DWITH_TESTS=$(usex test ON OFF)
+		-DPREFER_SYSTEM_ZSTD=1
+		-DPREFER_SYSTEM_XXHASH=1
+		-DPREFER_SYSTEM_GTEST=1
+		-DWITH_LEGACY_FUSE=0
+	)
+	if use python; then mycmakeargs+=( -DWITH_PYTHON_VERSION=${EPYTHON#python} ); fi
+	einfo ${mycmakeargs}
+	cmake_src_configure
+}
+
+src_install(){
+	cmake_src_install
+	#TODO: unbundle libfsst
+	dolib.so libdwarfs.so libfsst.so
+}
+
+pkg_postinst(){
+	elog "Suggest to enable USE 'threads' globally if you have multicore machine"
+	elog "Since version 0.4.1 GGC builds has been fixed. Now both Clang and GCC are working very well"
+	elog "You may find more information in the"
+	elog "${HOMEPAGE}"
+	elog "About creating: ${HOMEPAGE}/blob/main/doc/mkdwarfs.md"
+	elog "About mounting: ${HOMEPAGE}/blob/main/doc/dwarfs.md"
+}

diff --git a/sys-fs/dwarfs/files/unbundle-folly-fbthrift.patch b/sys-fs/dwarfs/files/unbundle-folly-fbthrift.patch
new file mode 100644
index 000000000..62f4ee1f9
--- /dev/null
+++ b/sys-fs/dwarfs/files/unbundle-folly-fbthrift.patch
@@ -0,0 +1,153 @@
+--- CMakeLists.txt	2021-04-28 16:56:24.432666631 +0200
++++ CMakeLists.txt2	2021-04-28 17:00:04.622812742 +0200
+@@ -298,7 +298,7 @@
+ if(WITH_TESTS OR WITH_BENCHMARKS)
+   add_library(test_helpers test/test_helpers.cpp test/test_strings.cpp
+                            test/loremipsum.cpp)
+-  target_link_libraries(test_helpers dwarfs folly)
++  target_link_libraries(test_helpers dwarfs)
+   set_property(TARGET test_helpers PROPERTY CXX_STANDARD 17)
+ endif()
+ 
+@@ -364,70 +364,7 @@
+ 
+ list(
+   APPEND
+-  FROZEN_THRIFT_SRC
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_data.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_data.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_types.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_types.tcc
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_types.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_types_custom_protocol.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_constants.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_constants.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_metadata.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_metadata.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_visitation.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_for_each_field.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_visit_union.h)
+-
+-list(
+-  APPEND
+-  METADATA_THRIFT_SRC
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_constants.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_constants.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_data.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_data.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_for_each_field.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_layouts.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_layouts.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_metadata.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_metadata.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_types.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_types.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_types.tcc
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_types_custom_protocol.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_visit_union.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_visitation.h)
+-
+-add_custom_command(
+-  OUTPUT ${FROZEN_THRIFT_SRC}
+-  COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift
+-  COMMAND
+-    cp ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/thrift/frozen.thrift
+-    ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/
+-  COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift &&
+-          ${CMAKE_CURRENT_BINARY_DIR}/bin/thrift1 --gen mstch_cpp2 frozen.thrift
+-  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bin/thrift1
+-          ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/thrift/frozen.thrift)
+-
+-add_custom_command(
+-  OUTPUT ${METADATA_THRIFT_SRC}
+-  COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs
+-  COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/thrift/metadata.thrift
+-          thrift/dwarfs/metadata.thrift
+-  COMMAND
+-    cd ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs &&
+-    ${CMAKE_CURRENT_BINARY_DIR}/bin/thrift1 --gen mstch_cpp2:frozen2
+-    metadata.thrift
+-  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bin/thrift1
+-          ${CMAKE_CURRENT_SOURCE_DIR}/thrift/metadata.thrift)
+-
+-list(
+-  APPEND
+   INCLUDE_DIRS
+-  ${CMAKE_CURRENT_BINARY_DIR}/folly
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift
+-  ${CMAKE_CURRENT_SOURCE_DIR}/folly
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift
+   ${CMAKE_CURRENT_BINARY_DIR})
+ 
+ if(NOT (ZSTD_FOUND AND PREFER_SYSTEM_ZSTD))
+@@ -445,39 +382,6 @@
+   list(APPEND INCLUDE_DIRS ${Jemalloc_INCLUDE_DIRS})
+ endif()
+ 
+-add_library(
+-  thrift_light
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/FieldRef.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/protocol/CompactProtocol.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/protocol/BinaryProtocol.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/protocol/DebugProtocol.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/protocol/JSONProtocolCommon.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/protocol/JSONProtocol.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp/protocol/TProtocolException.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp/util/VarintUtils.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/gen/module_types_cpp.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/frozen/Frozen.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/frozen/FrozenUtil.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/frozen/schema/MemorySchema.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_data.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_types.cpp)
+-
+-set_property(TARGET thrift_light PROPERTY CXX_STANDARD 17)
+-
+-target_include_directories(thrift_light PRIVATE ${INCLUDE_DIRS})
+-
+-add_library(
+-  metadata_thrift
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_layouts.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_types.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_data.cpp)
+-
+-set_property(TARGET metadata_thrift PROPERTY CXX_STANDARD 17)
+-
+-target_include_directories(metadata_thrift PRIVATE ${INCLUDE_DIRS})
+-
+-add_dependencies(metadata_thrift thrift_light)
+-
+ foreach(tgt dwarfs ${BINARY_TARGETS})
+   target_include_directories(
+     ${tgt} SYSTEM
+@@ -501,8 +405,6 @@
+   set_property(TARGET ${tgt} PROPERTY CXX_STANDARD_REQUIRED ON)
+   set_property(TARGET ${tgt} PROPERTY CXX_EXTENSIONS OFF)
+ 
+-  add_dependencies(${tgt} metadata_thrift)
+-
+   if(ENABLE_ASAN)
+     target_compile_options(${tgt} PRIVATE -fsanitize=address
+                                           -fno-omit-frame-pointer)
+@@ -550,9 +452,6 @@
+ 
+ target_link_libraries(
+   dwarfs
+-  metadata_thrift
+-  thrift_light
+-  folly
+   fsst
+   ${Boost_LIBRARIES}
+   PkgConfig::LIBARCHIVE
+@@ -582,11 +481,6 @@
+   if(USE_JEMALLOC)
+     target_link_libraries(${tgt} ${Jemalloc_LIBRARIES})
+   endif()
+-  if(TARGET folly_exception_tracer)
+-    target_link_libraries(
+-      ${tgt} -Wl,--whole-archive folly_exception_tracer_base
+-      folly_exception_tracer -Wl,--no-whole-archive)
+-  endif()
+ endforeach()
+ 
+ if(STATIC_BUILD_DO_NOT_USE)


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: sys-fs/dwarfs/files/, sys-fs/dwarfs/
@ 2023-02-28 12:58 Denis Reva
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Reva @ 2023-02-28 12:58 UTC (permalink / raw
  To: gentoo-commits

commit:     253b9fd4d798d3f817b4d9f735cff0580202375a
Author:     Denis Reva <denis7774 <AT> gmail <DOT> com>
AuthorDate: Tue Feb 28 12:53:52 2023 +0000
Commit:     Denis Reva <denis7774 <AT> gmail <DOT> com>
CommitDate: Tue Feb 28 12:57:56 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=253b9fd4

dwarfs: unorphaned, work in progress

Signed-off-by: Denis Reva <denis7774 <AT> gmail.com>

 sys-fs/dwarfs/Manifest                             |   1 +
 sys-fs/dwarfs/dwarfs-0.7.0_rc4.ebuild              | 103 +++++++++++++
 .../dwarfs/files/dwarfs-0.7.0_rc4-unbundle.patch   | 161 +++++++++++++++++++++
 sys-fs/dwarfs/metadata.xml                         |  24 +++
 4 files changed, 289 insertions(+)

diff --git a/sys-fs/dwarfs/Manifest b/sys-fs/dwarfs/Manifest
new file mode 100644
index 000000000..f6a1d88fe
--- /dev/null
+++ b/sys-fs/dwarfs/Manifest
@@ -0,0 +1 @@
+DIST dwarfs-0.7.0-RC4.tar.xz 14425176 BLAKE2B fdb2852da81f8d567c19dc83e3f7dd74e0de35e56579d50b6ce9ee6adda2d540bbbc7d5655a499f19ee340a2f904bfe9b2b977b9539e8e99dc9e8667b9b7435e SHA512 1e0d603507f93b6bcb79050877de0ac64eed931b192b43466d3b5e1ee55a759261ad937d33f24d145a61e8b3d431405a35bbd8ff95ead10ccdabe14ba4d840a5

diff --git a/sys-fs/dwarfs/dwarfs-0.7.0_rc4.ebuild b/sys-fs/dwarfs/dwarfs-0.7.0_rc4.ebuild
new file mode 100644
index 000000000..d1a86ea98
--- /dev/null
+++ b/sys-fs/dwarfs/dwarfs-0.7.0_rc4.ebuild
@@ -0,0 +1,103 @@
+# Copyright 1999-2021 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+EAPI=7
+
+PYTHON_COMPAT=( python3_{10..11} )
+
+inherit check-reqs cmake flag-o-matic python-single-r1
+
+MY_P="${P/_rc/-RC}"
+
+DESCRIPTION="A fast very high compression read-only FUSE file system"
+HOMEPAGE="https://github.com/mhx/dwarfs"
+SRC_URI="https://github.com/mhx/dwarfs/releases/download/v0.7.0-RC4/dwarfs-0.7.0-RC4.tar.xz" #TODO: change to ${PV}
+
+LICENSE="GPL-3"
+SLOT="0"
+KEYWORDS=""
+IUSE="python +jemalloc test man"
+S="${WORKDIR}/${MY_P}"
+
+RDEPEND="
+	${PYTHON_DEPS}
+	app-arch/libarchive
+	app-arch/lz4
+	app-arch/snappy
+	app-arch/xz-utils
+	app-arch/zstd
+	dev-cpp/fbthrift:=
+	dev-cpp/folly:=
+	dev-cpp/gflags
+	dev-cpp/glog[gflags]
+	dev-cpp/parallel-hashmap:=
+	dev-cpp/sparsehash
+	dev-libs/boost[context,threads(+),python?]
+	dev-libs/double-conversion
+	dev-libs/fsst:=
+	dev-libs/libevent
+	dev-libs/libfmt
+	dev-libs/xxhash
+	sys-fs/fuse:3
+	sys-libs/binutils-libs
+	sys-libs/libunwind
+	sys-libs/zlib
+
+	jemalloc? ( >=dev-libs/jemalloc-5.3.0-r1 )
+"
+DEPEND="
+	${RDEPEND}
+	sys-devel/flex
+	!sys-fs/dwarfs-bin
+"
+BDEPEND="
+	man? ( || ( app-text/ronn app-text/ronn-ng ) )
+	sys-devel/bison
+	virtual/pkgconfig
+
+	test? ( dev-cpp/gtest )
+"
+
+DOCS=( "README.md" "CHANGES.md" "TODO" )
+RESTRICT="!test? ( test )"
+REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
+PATCHES=( "${FILESDIR}/${P}-unbundle.patch" )
+
+CHECKREQS_DISK_BUILD="1300M"
+CMAKE_IN_SOURCE_BUILD=1
+CMAKE_WARN_UNUSED_CLI=0
+
+src_prepare(){
+	rm -r fsst zstd fbthrift/* folly xxHash parallel-hashmap || die
+	cmake_src_prepare
+	sed "s/DESTINATION lib/DESTINATION $(get_libdir)/" -i CMakeLists.txt || die
+}
+
+src_configure(){
+	append-cxxflags "-I/usr/include"
+
+	mycmakeargs=(
+		-DUSE_JEMALLOC=$(usex jemalloc ON OFF)
+		-DWITH_PYTHON=$(usex python ON OFF)
+		-DWITH_TESTS=$(usex test ON OFF)
+		-WITH_MAN_PAGES=$(usex man ON OFF)
+		-DPREFER_SYSTEM_ZSTD=1
+		-DPREFER_SYSTEM_XXHASH=1
+		-DPREFER_SYSTEM_GTEST=1
+		-DWITH_LEGACY_FUSE=0
+	)
+	use python && mycmakeargs+=( "-DWITH_PYTHON_VERSION=${EPYTHON#python}" )
+	cmake_src_configure
+}
+
+src_install(){
+	cmake_src_install
+	dolib.so libdwarfs.so
+}
+
+pkg_postinst(){
+	elog "You may find more information in the"
+	elog "${HOMEPAGE}"
+	elog "About creating: ${HOMEPAGE}/blob/main/doc/mkdwarfs.md"
+	elog "About mounting: ${HOMEPAGE}/blob/main/doc/dwarfs.md"
+}

diff --git a/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-unbundle.patch b/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-unbundle.patch
new file mode 100644
index 000000000..101af0dc6
--- /dev/null
+++ b/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-unbundle.patch
@@ -0,0 +1,161 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -151,8 +151,6 @@
+     ON
+     CACHE BOOL "only build thrift compiler")
+ 
+-add_subdirectory(folly EXCLUDE_FROM_ALL)
+-add_subdirectory(fbthrift EXCLUDE_FROM_ALL)
+ if(NOT (ZSTD_FOUND AND PREFER_SYSTEM_ZSTD))
+   add_subdirectory(zstd/build/cmake EXCLUDE_FROM_ALL)
+ endif()
+@@ -383,23 +381,6 @@
+ 
+ list(
+   APPEND
+-  FROZEN_THRIFT_SRC
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_data.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_data.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_types.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_types.tcc
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_types.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_types_custom_protocol.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_constants.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_constants.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_metadata.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_metadata.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_visitation.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_for_each_field.h
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_visit_union.h)
+-
+-list(
+-  APPEND
+   METADATA_THRIFT_SRC
+   ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_constants.cpp
+   ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_constants.h
+@@ -418,35 +399,20 @@
+   ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_visitation.h)
+ 
+ add_custom_command(
+-  OUTPUT ${FROZEN_THRIFT_SRC}
+-  COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift
+-  COMMAND
+-    cp ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/thrift/frozen.thrift
+-    ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/
+-  COMMAND cd ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift &&
+-          ${CMAKE_CURRENT_BINARY_DIR}/bin/thrift1 --gen mstch_cpp2 frozen.thrift
+-  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bin/thrift1
+-          ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/thrift/frozen.thrift)
+-
+-add_custom_command(
+   OUTPUT ${METADATA_THRIFT_SRC}
+   COMMAND mkdir -p ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs
+   COMMAND cp ${CMAKE_CURRENT_SOURCE_DIR}/thrift/metadata.thrift
+           thrift/dwarfs/metadata.thrift
+   COMMAND
+     cd ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs &&
+-    ${CMAKE_CURRENT_BINARY_DIR}/bin/thrift1 --gen mstch_cpp2:frozen2
++    thrift1 --gen mstch_cpp2:frozen2
+     metadata.thrift
+-  DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/bin/thrift1
+-          ${CMAKE_CURRENT_SOURCE_DIR}/thrift/metadata.thrift)
++  DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/thrift/metadata.thrift)
+ 
+ list(
+   APPEND
+   INCLUDE_DIRS
+-  ${CMAKE_CURRENT_BINARY_DIR}/folly
+   ${CMAKE_CURRENT_BINARY_DIR}/thrift
+-  ${CMAKE_CURRENT_SOURCE_DIR}/folly
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift
+   ${CMAKE_CURRENT_BINARY_DIR})
+ 
+ if(NOT (ZSTD_FOUND AND PREFER_SYSTEM_ZSTD))
+@@ -472,43 +438,24 @@
+ endif()
+ 
+ add_library(
+-  thrift_light
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/FieldRef.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/protocol/CompactProtocol.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/protocol/BinaryProtocol.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/protocol/DebugProtocol.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/protocol/JSONProtocolCommon.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/protocol/JSONProtocol.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp/protocol/TProtocolException.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp/util/VarintUtils.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/gen/module_types_cpp.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/frozen/Frozen.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/frozen/FrozenUtil.cpp
+-  ${CMAKE_CURRENT_SOURCE_DIR}/fbthrift/thrift/lib/cpp2/frozen/schema/MemorySchema.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_data.cpp
+-  ${CMAKE_CURRENT_BINARY_DIR}/thrift/lib/thrift/gen-cpp2/frozen_types.cpp)
+-
+-set_property(TARGET thrift_light PROPERTY CXX_STANDARD 17)
+-
+-target_include_directories(thrift_light PRIVATE ${INCLUDE_DIRS})
+-
+-add_library(
+   metadata_thrift
++  STATIC
+   ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_layouts.cpp
+   ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_types.cpp
+   ${CMAKE_CURRENT_BINARY_DIR}/thrift/dwarfs/gen-cpp2/metadata_data.cpp)
+ 
+ set_property(TARGET metadata_thrift PROPERTY CXX_STANDARD 17)
+-
++set_property(TARGET metadata_thrift PROPERTY POSITION_INDEPENDENT_CODE ON)
++set_property(TARGET metadata_thrift PROPERTY CXX_VISIBILITY_PRESET hidden)
++set_property(TARGET metadata_thrift PROPERTY VISIBILITY_INLINES_HIDDEN 1)
+ target_include_directories(metadata_thrift PRIVATE ${INCLUDE_DIRS})
+-
+-add_dependencies(metadata_thrift thrift_light)
++target_link_libraries(metadata_thrift fmt glog folly)
+ 
+ foreach(tgt dwarfs ${BINARY_TARGETS})
+   target_include_directories(
+     ${tgt} SYSTEM
+     PRIVATE ${Boost_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS} ${INCLUDE_DIRS}
+-            ${CMAKE_CURRENT_SOURCE_DIR}/parallel-hashmap)
++            )
+ 
+   target_include_directories(${tgt} PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/include)
+ 
+@@ -565,23 +512,11 @@
+   endif()
+ endforeach()
+ 
+-# not sure why exactly, copied from fsst/CMakeLists.txt
+-if(CMAKE_BUILD_TYPE STREQUAL Release)
+-  set_source_files_properties(fsst/fsst_avx512.cpp PROPERTIES COMPILE_FLAGS -O1)
+-endif()
+-
+-add_library(
+-  fsst
+-  fsst/libfsst.cpp fsst/fsst_avx512.cpp fsst/fsst_avx512_unroll1.inc
+-  fsst/fsst_avx512_unroll2.inc fsst/fsst_avx512_unroll3.inc
+-  fsst/fsst_avx512_unroll4.inc)
+-
+-target_include_directories(dwarfs PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/fsst)
+-
+ target_link_libraries(
+   dwarfs
++  thriftprotocol
++  thriftfrozen2
+   metadata_thrift
+-  thrift_light
+   folly
+   fsst
+   ${Boost_LIBRARIES}
+@@ -612,11 +547,6 @@
+   if(USE_JEMALLOC)
+     target_link_libraries(${tgt} ${Jemalloc_LIBRARIES})
+   endif()
+-  if(DWARFS_USE_EXCEPTION_TRACER)
+-    target_link_libraries(
+-      ${tgt} -Wl,--whole-archive folly_exception_tracer_base
+-      folly_exception_tracer -Wl,--no-whole-archive)
+-  endif()
+ endforeach()
+ 
+ if(STATIC_BUILD_DO_NOT_USE)

diff --git a/sys-fs/dwarfs/metadata.xml b/sys-fs/dwarfs/metadata.xml
new file mode 100644
index 000000000..7d948c451
--- /dev/null
+++ b/sys-fs/dwarfs/metadata.xml
@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM 'http://www.gentoo.org/dtd/metadata.dtd'>
+<pkgmetadata>
+	<maintainer type="person">
+		<email>denis7774@gmail.com</email>
+		<name>Denis Reva</name>
+		<description>rarogcmex</description>
+	</maintainer>
+	<longdescription lang="en">
+		DwarFS is a read-only file system with a focus on achieving very high compression ratios in particular for very redundant data.
+		This probably doesn't sound very exciting, because if it's redundant, it should compress well. However, I found that other read-only, compressed file systems don't do a very good job at making use of this redundancy. See here for a comparison with other compressed file systems.
+		DwarFS also doesn't compromise on speed and for my use cases I've found it to be on par with or perform better than SquashFS. For my primary use case, DwarFS compression is an order of magnitude better than SquashFS compression, it's 4 times faster to build the file system, it's typically faster to access files on DwarFS and it uses less CPU resources.
+		Distinct features of DwarFS are:
+		* Clustering of files by similarity using a similarity hash function. This makes it easier to exploit the redundancy across file boundaries.
+		* Segmentation analysis across file system blocks in order to reduce the size of the uncompressed file system. This saves memory when using the compressed file system and thus potentially allows for higher cache hit rates as more data can be kept in the cache.
+		* Highly multi-threaded implementation. Both the file system creation tool as well as the FUSE driver are able to make good use of the many cores of your system.
+		* Optional experimental Lua support to provide custom filtering and ordering functionality.
+	</longdescription>
+	<upstream>
+		<bugs-to>https://github.com/mhx/dwarfs/issues</bugs-to>
+		<remote-id type="github">mhx/dwarfs</remote-id>
+	</upstream>
+
+</pkgmetadata>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: sys-fs/dwarfs/files/, sys-fs/dwarfs/
@ 2023-05-16 10:03 Denis Reva
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Reva @ 2023-05-16 10:03 UTC (permalink / raw
  To: gentoo-commits

commit:     9aaa47b79edc3a540b108fef69289c83f008983a
Author:     Denis Reva <denis7774 <AT> gmail <DOT> com>
AuthorDate: Tue May 16 10:03:14 2023 +0000
Commit:     Denis Reva <denis7774 <AT> gmail <DOT> com>
CommitDate: Tue May 16 10:03:14 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=9aaa47b7

sys-fs/dwarfs: fixed bug that appears with modern compilers

clang-16 or gcc-13

Closes: https://bugs.gentoo.org/906181
Signed-off-by: Denis Reva <denis7774 <AT> gmail.com>

 sys-fs/dwarfs/dwarfs-0.7.0_rc4.ebuild                      |  5 +++++
 .../dwarfs/files/dwarfs-0.7.0_rc4-fbthrift-cstdint.patch   | 13 +++++++++++++
 sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-stdexcept.patch       | 14 ++++++++++++++
 3 files changed, 32 insertions(+)

diff --git a/sys-fs/dwarfs/dwarfs-0.7.0_rc4.ebuild b/sys-fs/dwarfs/dwarfs-0.7.0_rc4.ebuild
index 3eed1ced5..74ed8fd15 100644
--- a/sys-fs/dwarfs/dwarfs-0.7.0_rc4.ebuild
+++ b/sys-fs/dwarfs/dwarfs-0.7.0_rc4.ebuild
@@ -19,6 +19,11 @@ KEYWORDS="~amd64"
 IUSE="python +jemalloc test man"
 S="${WORKDIR}/dwarfs-${MY_PV}"
 
+PATCHES=(
+	"${FILESDIR}/dwarfs-0.7.0_rc4-stdexcept.patch"
+	"${FILESDIR}/dwarfs-0.7.0_rc4-fbthrift-cstdint.patch"
+)
+
 RDEPEND="
 	${PYTHON_DEPS}
 	app-arch/libarchive

diff --git a/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-fbthrift-cstdint.patch b/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-fbthrift-cstdint.patch
new file mode 100644
index 000000000..c52f795ee
--- /dev/null
+++ b/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-fbthrift-cstdint.patch
@@ -0,0 +1,13 @@
+diff --git a/fbthrift/thrift/compiler/generate/json.cc b/fbthrift/thrift/compiler/generate/json.cc
+index c4d87a3..015e81f 100644
+--- a/fbthrift/thrift/compiler/generate/json.cc
++++ b/fbthrift/thrift/compiler/generate/json.cc
+@@ -18,7 +18,7 @@
+ 
+ #include <ostream>
+ #include <sstream>
+-
++#include <cstdint>
+ namespace apache {
+ namespace thrift {
+ namespace compiler {

diff --git a/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-stdexcept.patch b/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-stdexcept.patch
new file mode 100644
index 000000000..a2a671e17
--- /dev/null
+++ b/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-stdexcept.patch
@@ -0,0 +1,14 @@
+diff --git a/folly/folly/system/AtFork.cpp b/folly/folly/system/AtFork.cpp
+index e888e52..8c9eee5 100644
+--- a/folly/folly/system/AtFork.cpp
++++ b/folly/folly/system/AtFork.cpp
+@@ -20,7 +20,8 @@
+ #include <folly/lang/Exception.h>
+ #include <folly/portability/PThread.h>
+ #include <folly/synchronization/SanitizeThread.h>
+-
++#include <system_error>
++#include <stdexcept>
+ namespace folly {
+ 
+ void AtForkList::prepare() noexcept {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: sys-fs/dwarfs/files/, sys-fs/dwarfs/
@ 2023-07-25 14:16 Denis Reva
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Reva @ 2023-07-25 14:16 UTC (permalink / raw
  To: gentoo-commits

commit:     45ecf314d8e972070f91dd81092d1637a1bcd141
Author:     Denis Reva <denis7774 <AT> gmail <DOT> com>
AuthorDate: Tue Jul 25 14:07:02 2023 +0000
Commit:     Denis Reva <denis7774 <AT> gmail <DOT> com>
CommitDate: Tue Jul 25 14:07:02 2023 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=45ecf314

sys-fs/dwarfs: Treeclean

Signed-off-by: Denis Reva <denis7774 <AT> gmail.com>

 sys-fs/dwarfs/Manifest                             |   1 -
 sys-fs/dwarfs/dwarfs-0.7.0_rc4-r1.ebuild           | 111 ---------------------
 .../files/dwarfs-0.7.0_rc4-fbthrift-cstdint.patch  |  13 ---
 .../dwarfs/files/dwarfs-0.7.0_rc4-stdexcept.patch  |  14 ---
 4 files changed, 139 deletions(-)

diff --git a/sys-fs/dwarfs/Manifest b/sys-fs/dwarfs/Manifest
index 5fbad5759..224bd094a 100644
--- a/sys-fs/dwarfs/Manifest
+++ b/sys-fs/dwarfs/Manifest
@@ -1,2 +1 @@
-DIST dwarfs-0.7.0-RC4.tar.xz 14425176 BLAKE2B fdb2852da81f8d567c19dc83e3f7dd74e0de35e56579d50b6ce9ee6adda2d540bbbc7d5655a499f19ee340a2f904bfe9b2b977b9539e8e99dc9e8667b9b7435e SHA512 1e0d603507f93b6bcb79050877de0ac64eed931b192b43466d3b5e1ee55a759261ad937d33f24d145a61e8b3d431405a35bbd8ff95ead10ccdabe14ba4d840a5
 DIST dwarfs-0.7.0.tar.xz 14516672 BLAKE2B c48527f84af0c96ca573af94d1cdc9637ab5bc99934f02b457eec80548399ba362ebc20f6bc5d44d780e29d9538d6045f334a24b4264d49ab02c39fdfddc54bf SHA512 52ea209590a97ee11a902103b3862c55d733a899e199c5e436c4ad5f5278c10f6425c7e35853dd173e260f93e946628e2ac5677706af4ab4486c5af712265f27

diff --git a/sys-fs/dwarfs/dwarfs-0.7.0_rc4-r1.ebuild b/sys-fs/dwarfs/dwarfs-0.7.0_rc4-r1.ebuild
deleted file mode 100644
index 74ed8fd15..000000000
--- a/sys-fs/dwarfs/dwarfs-0.7.0_rc4-r1.ebuild
+++ /dev/null
@@ -1,111 +0,0 @@
-# Copyright 1999-2023 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=8
-
-PYTHON_COMPAT=( python3_{10..11} )
-
-inherit check-reqs cmake flag-o-matic python-single-r1
-
-MY_PV="${PV/_rc/-RC}"
-
-DESCRIPTION="A fast very high compression read-only FUSE file system"
-HOMEPAGE="https://github.com/mhx/dwarfs"
-SRC_URI="https://github.com/mhx/dwarfs/releases/download/v${MY_PV}/${PN}-${MY_PV}.tar.xz"
-
-LICENSE="GPL-3"
-SLOT="0"
-KEYWORDS="~amd64"
-IUSE="python +jemalloc test man"
-S="${WORKDIR}/dwarfs-${MY_PV}"
-
-PATCHES=(
-	"${FILESDIR}/dwarfs-0.7.0_rc4-stdexcept.patch"
-	"${FILESDIR}/dwarfs-0.7.0_rc4-fbthrift-cstdint.patch"
-)
-
-RDEPEND="
-	${PYTHON_DEPS}
-	app-arch/libarchive
-	app-arch/lz4
-	app-arch/snappy
-	app-arch/xz-utils
-	app-arch/zstd
-	dev-cpp/gflags
-	dev-cpp/glog[gflags]
-	dev-cpp/parallel-hashmap:=
-	dev-libs/boost[context,python?]
-	dev-libs/double-conversion
-	dev-libs/libevent
-	dev-libs/libfmt
-	dev-libs/xxhash
-	sys-fs/fuse:3
-	dev-libs/fsst
-	sys-libs/binutils-libs
-	sys-libs/libunwind
-	sys-libs/zlib
-	!dev-cpp/fbthrift
-	!dev-cpp/fizz
-	!dev-cpp/folly
-	!dev-cpp/wangle
-	jemalloc? ( >=dev-libs/jemalloc-5.3.0-r1 )
-"
-
-DEPEND="${RDEPEND}"
-BDEPEND="
-	dev-util/patchelf
-	sys-devel/bison
-	sys-devel/flex
-	virtual/pkgconfig
-	man? ( app-text/ronn-ng )
-	test? ( dev-cpp/gtest )
-"
-
-DOCS=( "README.md" "CHANGES.md" "TODO" )
-RESTRICT="!test? ( test )"
-REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-
-CHECKREQS_DISK_BUILD="1300M"
-CMAKE_IN_SOURCE_BUILD=1
-CMAKE_WARN_UNUSED_CLI=0
-
-src_prepare(){
-	rm -r zstd xxHash parallel-hashmap || die
-	cmake_src_prepare
-	sed "s/DESTINATION lib/DESTINATION $(get_libdir)/" -i CMakeLists.txt || die
-}
-
-src_configure(){
-	append-cxxflags "-I/usr/include"
-
-	mycmakeargs=(
-		-DUSE_JEMALLOC=$(usex jemalloc ON OFF)
-		-DWITH_PYTHON=$(usex python ON OFF)
-		-DWITH_TESTS=$(usex test ON OFF)
-		-DWITH_MAN_PAGES=$(usex man ON OFF)
-		-DPREFER_SYSTEM_ZSTD=ON
-		-DPREFER_SYSTEM_XXHASH=ON
-		-DPREFER_SYSTEM_GTEST=ON
-		-DPREFER_SYSTEM_LIBFMT=ON
-		-DWITH_LEGACY_FUSE=OFF
-	)
-	use python && mycmakeargs+=( "-DWITH_PYTHON_VERSION=${EPYTHON#python}" )
-	cmake_src_configure
-}
-
-src_install(){
-	cmake_src_install
-	# Remove insecure RPATH from bundled lib
-	patchelf --remove-rpath libdwarfs.so || die
-	patchelf --remove-rpath libdwarfs_tool.so || die
-
-	dolib.so libdwarfs.so libdwarfs_tool.so libdwarfs_compression.so libthrift_light.so libmetadata_thrift.so
-	dolib.so folly/libfolly.so folly/libfolly.so.0.58.0-dev
-}
-
-pkg_postinst(){
-	elog "You may find more information in the"
-	elog "${HOMEPAGE}"
-	elog "About creating: ${HOMEPAGE}/blob/main/doc/mkdwarfs.md"
-	elog "About mounting: ${HOMEPAGE}/blob/main/doc/dwarfs.md"
-}

diff --git a/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-fbthrift-cstdint.patch b/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-fbthrift-cstdint.patch
deleted file mode 100644
index c52f795ee..000000000
--- a/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-fbthrift-cstdint.patch
+++ /dev/null
@@ -1,13 +0,0 @@
-diff --git a/fbthrift/thrift/compiler/generate/json.cc b/fbthrift/thrift/compiler/generate/json.cc
-index c4d87a3..015e81f 100644
---- a/fbthrift/thrift/compiler/generate/json.cc
-+++ b/fbthrift/thrift/compiler/generate/json.cc
-@@ -18,7 +18,7 @@
- 
- #include <ostream>
- #include <sstream>
--
-+#include <cstdint>
- namespace apache {
- namespace thrift {
- namespace compiler {

diff --git a/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-stdexcept.patch b/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-stdexcept.patch
deleted file mode 100644
index a2a671e17..000000000
--- a/sys-fs/dwarfs/files/dwarfs-0.7.0_rc4-stdexcept.patch
+++ /dev/null
@@ -1,14 +0,0 @@
-diff --git a/folly/folly/system/AtFork.cpp b/folly/folly/system/AtFork.cpp
-index e888e52..8c9eee5 100644
---- a/folly/folly/system/AtFork.cpp
-+++ b/folly/folly/system/AtFork.cpp
-@@ -20,7 +20,8 @@
- #include <folly/lang/Exception.h>
- #include <folly/portability/PThread.h>
- #include <folly/synchronization/SanitizeThread.h>
--
-+#include <system_error>
-+#include <stdexcept>
- namespace folly {
- 
- void AtForkList::prepare() noexcept {


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] repo/proj/guru:dev commit in: sys-fs/dwarfs/files/, sys-fs/dwarfs/
@ 2024-09-24 14:54 Denis Reva
  0 siblings, 0 replies; 6+ messages in thread
From: Denis Reva @ 2024-09-24 14:54 UTC (permalink / raw
  To: gentoo-commits

commit:     0231b7d21224c2a37ea7049d2283da6e326ed688
Author:     Denis Reva <denis7774 <AT> gmail <DOT> com>
AuthorDate: Tue Sep 24 14:54:22 2024 +0000
Commit:     Denis Reva <denis7774 <AT> gmail <DOT> com>
CommitDate: Tue Sep 24 14:54:32 2024 +0000
URL:        https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=0231b7d2

sys-fs/dwarfs: add 0.10.1

Signed-off-by: Denis Reva <denis7774 <AT> gmail.com>

 sys-fs/dwarfs/Manifest                   |   1 +
 sys-fs/dwarfs/dwarfs-0.10.1.ebuild       | 109 +++++++++++++++++++++++++++++++
 sys-fs/dwarfs/files/dwarfs-libfmt9.patch |  42 ++++++++++++
 sys-fs/dwarfs/metadata.xml               |   8 +++
 4 files changed, 160 insertions(+)

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>


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2024-09-24 14:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-24 14:54 [gentoo-commits] repo/proj/guru:dev commit in: sys-fs/dwarfs/files/, sys-fs/dwarfs/ Denis Reva
  -- strict thread matches above, loose matches on Subject: below --
2023-07-25 14:16 Denis Reva
2023-05-16 10:03 Denis Reva
2023-02-28 12:58 Denis Reva
2021-04-28 21:15 Alessandro Barbieri
2021-03-09  3:24 Denis Reva

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox