From: "Theo Anderson" <telans@posteo.de>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] repo/proj/guru:master commit in: sys-fs/dwarfs/files/, sys-fs/dwarfs/
Date: Sun, 2 May 2021 09:27:17 +0000 (UTC) [thread overview]
Message-ID: <1619920265.7f85b03b40d50a70620210159852030bb82eb3de.telans@gentoo> (raw)
commit: 7f85b03b40d50a70620210159852030bb82eb3de
Author: Alessandro Barbieri <lssndrbarbieri <AT> gmail <DOT> com>
AuthorDate: Sun May 2 01:49:27 2021 +0000
Commit: Theo Anderson <telans <AT> posteo <DOT> de>
CommitDate: Sun May 2 01:51:05 2021 +0000
URL: https://gitweb.gentoo.org/repo/proj/guru.git/commit/?id=7f85b03b
sys-fs/dwarfs: unbundling WIP
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 | 8 +-
sys-fs/dwarfs/files/unbundle.patch | 177 +++++++++++++++++++++++++++++++++++
2 files changed, 182 insertions(+), 3 deletions(-)
diff --git a/sys-fs/dwarfs/dwarfs-0.5.4-r3.ebuild b/sys-fs/dwarfs/dwarfs-0.5.4-r3.ebuild
index 8c35e1298..0de8a6544 100644
--- a/sys-fs/dwarfs/dwarfs-0.5.4-r3.ebuild
+++ b/sys-fs/dwarfs/dwarfs-0.5.4-r3.ebuild
@@ -14,13 +14,13 @@ SRC_URI="https://github.com/mhx/dwarfs/releases/download/v${PV}/${P}.tar.bz2"
LICENSE="GPL-3"
SLOT="0"
-KEYWORDS=""
+KEYWORDS="~amd64"
IUSE="python +jemalloc test"
RESTRICT="!test? ( test )"
REQUIRED_USE="python? ( ${PYTHON_REQUIRED_USE} )"
-PATCHES=( "${WORKDIR}/unbundle-folly-fbthrift.patch" )
+PATCHES=( "${FILESDIR}/unbundle.patch" )
#TODO: unbundle libfsst
RDEPEND="
@@ -34,6 +34,7 @@ RDEPEND="
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
@@ -68,13 +69,14 @@ 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
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"
+ append-cxxflags "-I/usr/include"
einfo "setting configuration flags to:"
mycmakeargs=(
diff --git a/sys-fs/dwarfs/files/unbundle.patch b/sys-fs/dwarfs/files/unbundle.patch
new file mode 100644
index 000000000..ad9588c54
--- /dev/null
+++ b/sys-fs/dwarfs/files/unbundle.patch
@@ -0,0 +1,177 @@
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -142,8 +142,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()
+@@ -298,7 +296,6 @@
+ 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)
+ set_property(TARGET test_helpers PROPERTY CXX_STANDARD 17)
+ endif()
+
+@@ -364,70 +361,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 +379,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 +402,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)
+@@ -535,25 +434,8 @@
+ 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
+- metadata_thrift
+- thrift_light
+- folly
+- fsst
+ ${Boost_LIBRARIES}
+ PkgConfig::LIBARCHIVE
+ PkgConfig::LIBLZ4
+@@ -582,11 +464,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)
next reply other threads:[~2021-05-02 9:27 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-05-02 9:27 Theo Anderson [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-11-04 18:27 [gentoo-commits] repo/proj/guru:master commit in: sys-fs/dwarfs/files/, sys-fs/dwarfs/ David Roman
2023-07-25 15:02 David Roman
2021-04-29 8:23 Michał Górny
2021-04-29 8:23 Michał Górny
2021-03-11 13:16 Andrew Ammerlaan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1619920265.7f85b03b40d50a70620210159852030bb82eb3de.telans@gentoo \
--to=telans@posteo.de \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox