mirror of
https://git.freebsd.org/ports.git
synced 2026-06-02 11:08:52 +00:00
biology/seqwish: Unbundle sdsl-lite and fix some clang19 compilation errors
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
PORTNAME= seqwish
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 0.7.11
|
||||
PORTREVISION= 1
|
||||
PORTREVISION= 2
|
||||
CATEGORIES= biology
|
||||
MASTER_SITES= https://github.com/ekg/seqwish/releases/download/v${DISTVERSION}/
|
||||
|
||||
@@ -12,11 +12,9 @@ WWW= https://github.com/ekg/seqwish
|
||||
LICENSE= MIT
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
BROKEN_FreeBSD_13= compilation fails: undefined symbol: __sync_val_compare_and_swap_16 ... referenced by transclosure.cpp
|
||||
BROKEN_FreeBSD_15= compilation fails with clang-19, see https://github.com/ekg/seqwish/issues/126
|
||||
BROKEN_i386= compilation fails: error: use of undeclared identifier '_pdep_u64'
|
||||
LIB_DEPENDS= libsdsl.so:devel/sdsl-lite
|
||||
|
||||
USES= cmake:noninja compiler:c++14-lang
|
||||
USES= cmake:noninja compiler:c++14-lang pkgconfig
|
||||
|
||||
CMAKE_ARGS= -DEXTRA_FLAGS="" # disable -march=native
|
||||
|
||||
@@ -33,4 +31,7 @@ OPENMP_CMAKE_BOOL= USE_OPENMP
|
||||
OPENMP_CXXFLAGS= -fopenmp
|
||||
OPENMP_BROKEN_OFF= https://github.com/ekg/seqwish/issues/114
|
||||
|
||||
post-extract:
|
||||
@${RM} -r ${WRKSRC}/deps/sdsl-lite
|
||||
|
||||
.include <bsd.port.mk>
|
||||
|
||||
@@ -1,14 +1,56 @@
|
||||
# unbundle sdsl-lite
|
||||
|
||||
--- CMakeLists.txt.orig 2023-04-19 15:25:32 UTC
|
||||
+++ CMakeLists.txt
|
||||
@@ -256,9 +256,9 @@ target_link_libraries(seqwish
|
||||
"${sdsl-lite_LIB}/libsdsl.a"
|
||||
"${sdsl-lite-divsufsort_LIB}/libdivsufsort.a"
|
||||
"${sdsl-lite-divsufsort_LIB}/libdivsufsort64.a"
|
||||
@@ -79,18 +79,15 @@ include_directories("${PROJECT_SOURCE_DIR}")
|
||||
# Add external projects
|
||||
include(${CMAKE_ROOT}/Modules/ExternalProject.cmake)
|
||||
|
||||
-# sdsl-lite (full build using its cmake config)
|
||||
-ExternalProject_Add(sdsl-lite
|
||||
- SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/sdsl-lite"
|
||||
- CMAKE_ARGS "${CMAKE_ARGS};-DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>"
|
||||
- UPDATE_COMMAND ""
|
||||
- INSTALL_COMMAND "")
|
||||
-ExternalProject_Get_property(sdsl-lite INSTALL_DIR)
|
||||
-set(sdsl-lite_INCLUDE "${INSTALL_DIR}/src/sdsl-lite-build/include")
|
||||
-set(sdsl-lite-divsufsort_INCLUDE "${INSTALL_DIR}/src/sdsl-lite-build/external/libdivsufsort/include")
|
||||
-set(sdsl-lite_LIB "${INSTALL_DIR}/src/sdsl-lite-build/lib")
|
||||
-set(sdsl-lite-divsufsort_LIB "${INSTALL_DIR}/src/sdsl-lite-build/external/libdivsufsort/lib")
|
||||
+# sdsl-lite - use system library
|
||||
+find_package(PkgConfig REQUIRED)
|
||||
+pkg_check_modules(SDSL REQUIRED sdsl-lite)
|
||||
+pkg_check_modules(DIVSUFSORT REQUIRED libdivsufsort)
|
||||
+pkg_check_modules(DIVSUFSORT64 REQUIRED libdivsufsort64)
|
||||
+set(sdsl-lite_INCLUDE "${SDSL_INCLUDE_DIRS}")
|
||||
+set(sdsl-lite-divsufsort_INCLUDE "${DIVSUFSORT_INCLUDE_DIRS}")
|
||||
+link_directories(${SDSL_LIBRARY_DIRS} ${DIVSUFSORT_LIBRARY_DIRS} ${DIVSUFSORT64_LIBRARY_DIRS})
|
||||
|
||||
# taywee's C++ args library, header only
|
||||
ExternalProject_Add(tayweeargs
|
||||
SOURCE_DIR "${CMAKE_SOURCE_DIR}/deps/args"
|
||||
@@ -227,7 +224,6 @@ add_executable(seqwish
|
||||
${CMAKE_SOURCE_DIR}/src/version.cpp
|
||||
)
|
||||
add_dependencies(seqwish tayweeargs)
|
||||
-add_dependencies(seqwish sdsl-lite)
|
||||
add_dependencies(seqwish gzipreader)
|
||||
add_dependencies(seqwish mmmulti)
|
||||
add_dependencies(seqwish iitii)
|
||||
@@ -253,11 +249,11 @@ target_include_directories(seqwish PUBLIC
|
||||
"${paryfor_INCLUDE}"
|
||||
"${mio_INCLUDE}")
|
||||
target_link_libraries(seqwish
|
||||
- "${sdsl-lite_LIB}/libsdsl.a"
|
||||
- "${sdsl-lite-divsufsort_LIB}/libdivsufsort.a"
|
||||
- "${sdsl-lite-divsufsort_LIB}/libdivsufsort64.a"
|
||||
- "-latomic"
|
||||
+ ${SDSL_LIBRARIES}
|
||||
+ ${DIVSUFSORT_LIBRARIES}
|
||||
+ ${DIVSUFSORT64_LIBRARIES}
|
||||
+ #"-latomic"
|
||||
Threads::Threads
|
||||
- jemalloc
|
||||
+ #jemalloc
|
||||
z)
|
||||
if (BUILD_STATIC)
|
||||
#set(CMAKE_EXE_LINKER_FLAGS "-static")
|
||||
|
||||
@@ -0,0 +1,36 @@
|
||||
- fix compilation error with clang-19
|
||||
|
||||
--- deps/atomic_queue/include/atomic_queue/atomic_queue.h.orig 2025-10-10 06:48:58.627210000 -0700
|
||||
+++ deps/atomic_queue/include/atomic_queue/atomic_queue.h 2025-10-10 06:49:07.323108000 -0700
|
||||
@@ -393,13 +393,13 @@
|
||||
|
||||
T do_pop(unsigned tail) noexcept {
|
||||
unsigned index = details::remap_index<SHUFFLE_BITS>(tail % size_);
|
||||
- return Base::template do_pop_any(states_[index], elements_[index]);
|
||||
+ return Base::template do_pop_any<>(states_[index], elements_[index]);
|
||||
}
|
||||
|
||||
template<class U>
|
||||
void do_push(U&& element, unsigned head) noexcept {
|
||||
unsigned index = details::remap_index<SHUFFLE_BITS>(head % size_);
|
||||
- Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
|
||||
+ Base::template do_push_any<>(std::forward<U>(element), states_[index], elements_[index]);
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -521,13 +521,13 @@
|
||||
|
||||
T do_pop(unsigned tail) noexcept {
|
||||
unsigned index = details::remap_index<SHUFFLE_BITS>(tail & (size_ - 1));
|
||||
- return Base::template do_pop_any(states_[index], elements_[index]);
|
||||
+ return Base::template do_pop_any<>(states_[index], elements_[index]);
|
||||
}
|
||||
|
||||
template<class U>
|
||||
void do_push(U&& element, unsigned head) noexcept {
|
||||
unsigned index = details::remap_index<SHUFFLE_BITS>(head & (size_ - 1));
|
||||
- Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
|
||||
+ Base::template do_push_any<>(std::forward<U>(element), states_[index], elements_[index]);
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -1,4 +1,7 @@
|
||||
--- deps/paryfor/paryfor.hpp.orig 2024-10-15 18:25:21 UTC
|
||||
- fix for PPC
|
||||
- fix build with clang19
|
||||
|
||||
--- deps/paryfor/paryfor.hpp.orig 2024-10-15 18:25:21 UTC
|
||||
+++ deps/paryfor/paryfor.hpp
|
||||
@@ -51,7 +51,22 @@ static inline void spin_loop_pause() noexcept {
|
||||
}
|
||||
@@ -23,3 +26,35 @@
|
||||
#error "Unknown CPU architecture."
|
||||
#endif
|
||||
|
||||
@@ -453,13 +468,13 @@ class AtomicQueue2 : public AtomicQueueCommon<AtomicQ
|
||||
|
||||
T do_pop(unsigned tail) noexcept {
|
||||
unsigned index = details::remap_index<SHUFFLE_BITS>(tail % size_);
|
||||
- return Base::template do_pop_any(states_[index], elements_[index]);
|
||||
+ return Base::template do_pop_any<>(states_[index], elements_[index]);
|
||||
}
|
||||
|
||||
template<class U>
|
||||
void do_push(U&& element, unsigned head) noexcept {
|
||||
unsigned index = details::remap_index<SHUFFLE_BITS>(head % size_);
|
||||
- Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
|
||||
+ Base::template do_push_any<>(std::forward<U>(element), states_[index], elements_[index]);
|
||||
}
|
||||
|
||||
public:
|
||||
@@ -581,13 +596,13 @@ class AtomicQueue2B : public AtomicQueueCommon<Atomic
|
||||
|
||||
T do_pop(unsigned tail) noexcept {
|
||||
unsigned index = details::remap_index<SHUFFLE_BITS>(tail & (size_ - 1));
|
||||
- return Base::template do_pop_any(states_[index], elements_[index]);
|
||||
+ return Base::template do_pop_any<>(states_[index], elements_[index]);
|
||||
}
|
||||
|
||||
template<class U>
|
||||
void do_push(U&& element, unsigned head) noexcept {
|
||||
unsigned index = details::remap_index<SHUFFLE_BITS>(head & (size_ - 1));
|
||||
- Base::template do_push_any(std::forward<U>(element), states_[index], elements_[index]);
|
||||
+ Base::template do_push_any<>(std::forward<U>(element), states_[index], elements_[index]);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
Reference in New Issue
Block a user