Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
biology/btllib: New port: Bioinformatics Technology Lab common code l…
…ibrary
- Loading branch information
Showing
8 changed files
with
156 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
PORTNAME= btllib | ||
DISTVERSIONPREFIX= v | ||
DISTVERSION= 1.6.2 | ||
CATEGORIES= biology devel | ||
|
||
MAINTAINER= yuri@FreeBSD.org | ||
COMMENT= Bioinformatics Technology Lab common code library | ||
WWW= https://github.com/bcgsc/btllib | ||
|
||
LICENSE= GPLv3 | ||
LICENSE_FILE= ${WRKSRC}/LICENSE | ||
|
||
BUILD_DEPENDS= bash:shells/bash \ | ||
samtools:biology/samtools \ | ||
cmake:devel/cmake-core | ||
LIB_DEPENDS= libsdsl.so:devel/sdsl-lite | ||
RUN_DEPENDS= samtools:biology/samtools | ||
|
||
USES= meson pkgconfig python:build shebangfix | ||
|
||
SHEBANG_FILES= scripts/* | ||
|
||
USE_GITHUB= yes | ||
GH_ACCOUNT= bcgsc | ||
GH_TUPLE= p-ranav:argparse:15d745f:argparse/subprojects/argparse \ | ||
skystrife:cpptoml:fededad:cpptoml/subprojects/cpptoml | ||
|
||
BINARY_ALIAS= python3=${PYTHON_CMD} # python3-config=${PYTHON_CMD}-config # installs python binding into a wrong location, see https://github.com/bcgsc/btllib/issues/111 | ||
|
||
.include <bsd.port.mk> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
TIMESTAMP = 1689975725 | ||
SHA256 (bcgsc-btllib-v1.6.2_GH0.tar.gz) = cba796cb83791e8524f5108459892a1131748cda55189c9acea21d4bdb80e7a0 | ||
SIZE (bcgsc-btllib-v1.6.2_GH0.tar.gz) = 848942 | ||
SHA256 (p-ranav-argparse-15d745f_GH0.tar.gz) = f033d4eb4a430b4ae4bf3c2a40e087709bf77462c1f9968ae07828437219a370 | ||
SIZE (p-ranav-argparse-15d745f_GH0.tar.gz) = 105608 | ||
SHA256 (skystrife-cpptoml-fededad_GH0.tar.gz) = dd2d129b67f537ae7d6f8d8d084c8c0d772d0f5b4b3118c1892e67ff536e335e | ||
SIZE (skystrife-cpptoml-fededad_GH0.tar.gz) = 47398 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- meson.build.orig 2023-07-06 15:52:18 UTC | ||
+++ meson.build | ||
@@ -1,7 +1,7 @@ | ||
project('btllib', 'cpp', | ||
version : '1.6.2', | ||
license : 'GPL3', | ||
- default_options : [ 'cpp_std=c++17', 'warning_level=3', 'werror=true', 'b_coverage=true' ], | ||
+ default_options : [ 'cpp_std=c++17', 'warning_level=3', 'b_coverage=true' ], | ||
meson_version : '>= 0.60.0') | ||
|
||
# Configuration | ||
@@ -48,22 +48,28 @@ threads_dep = dependency('threads') | ||
openmp_dep = dependency('openmp', required : false) | ||
|
||
cmake_options = cmake.subproject_options() | ||
-cmake_options.set_override_option('werror', 'false') | ||
+#cmake_options.set_override_option('werror', 'false') | ||
cmake_options.set_install(false) | ||
|
||
cpptoml_subproject = cmake.subproject('cpptoml', options : cmake_options) | ||
cpptomp_dep = cpptoml_subproject.dependency('cpptoml') | ||
|
||
-run_command(meson.project_source_root() + '/scripts/prepare-sdsl') | ||
+#run_command(meson.project_source_root() + '/scripts/prepare-sdsl') | ||
|
||
-sdsl_subproject = cmake.subproject('sdsl-lite', options : cmake_options) | ||
-sdsl_dep = sdsl_subproject.dependency('sdsl', include_type: 'system') | ||
+#sdsl_subproject = cmake.subproject('sdsl-lite', options : cmake_options) | ||
|
||
+#sdsl_dep = sdsl_subproject.dependency('sdsl', include_type: 'system') | ||
+ | ||
+pkg = import('pkgconfig') | ||
+sdsl_dep = dependency('sdsl-lite') | ||
+#lib = library('foo', dependencies : [bar]) | ||
+#pkg.generate(lib) | ||
+ | ||
deps = [ threads_dep, openmp_dep, cpptomp_dep, sdsl_dep ] | ||
|
||
# These are unfortunate hacks. Currently, neither cpptoml nor sdsl-lite install their headers (even when set_install(true) is called), and so we need to do it manually | ||
meson.add_install_script('scripts/install-cpptoml') | ||
-meson.add_install_script('scripts/install-sdsl-lite') | ||
+#meson.add_install_script('scripts/install-sdsl-lite') | ||
|
||
argparse_subproject = cmake.subproject('argparse', options : cmake_options) | ||
argparse_dep = argparse_subproject.dependency('argparse') | ||
@@ -126,7 +132,7 @@ run_target('test-wrappers', command: join_paths(rootpa | ||
btllib_include = [ include_directories('include'), include_directories('.') ] | ||
btllib_sources = run_command('scripts/get-files', 'src').stdout().strip().split() | ||
|
||
-btllib_lib = static_library('btllib', | ||
+btllib_lib = shared_library('btllib', | ||
btllib_sources, | ||
include_directories : btllib_include, | ||
dependencies : deps, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- src/btllib/status.cpp.orig 2023-07-21 18:23:40 UTC | ||
+++ src/btllib/status.cpp | ||
@@ -84,7 +84,7 @@ get_strerror() | ||
char buf[buflen]; | ||
// POSIX and GNU implementation of strerror_r differ, even in function signature | ||
// and so we need to check which one is used | ||
-#if __APPLE__ || \ | ||
+#if __APPLE__ || __FreeBSD__ || \ | ||
((_POSIX_C_SOURCE >= 200112L || _XOPEN_SOURCE >= 600) && !_GNU_SOURCE) | ||
strerror_r(errno, buf, buflen); | ||
return buf; | ||
@@ -111,4 +111,4 @@ check_file_accessibility(const std::string& filepath) | ||
btllib::check_error(ret != 0, get_strerror() + ": " + filepath); | ||
} | ||
|
||
-} // namespace btllib | ||
\ No newline at end of file | ||
+} // namespace btllib |
13 changes: 13 additions & 0 deletions
13
biology/btllib/files/patch-subprojects_cpptoml_CMakeLists.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
--- subprojects/cpptoml/CMakeLists.txt.orig 2023-05-06 14:38:35 UTC | ||
+++ subprojects/cpptoml/CMakeLists.txt | ||
@@ -11,8 +11,8 @@ include(CMakePushCheckState) | ||
|
||
cmake_push_check_state() | ||
|
||
-option(ENABLE_LIBCXX "Use libc++ for the C++ standard library" ON) | ||
-option(CPPTOML_BUILD_EXAMPLES "Build examples" ON) | ||
+option(ENABLE_LIBCXX "Use libc++ for the C++ standard library" OFF) | ||
+option(CPPTOML_BUILD_EXAMPLES "Build examples" OFF) | ||
|
||
set(CMAKE_EXPORT_COMPILE_COMMANDS 1) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Bioinformatics Technology Lab's common code library in C++. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
bin/indexlr | ||
bin/mi_bf_generate | ||
bin/randseq | ||
include/btllib/aahash.hpp | ||
include/btllib/aahash_consts.hpp | ||
include/btllib/bloom_filter.hpp | ||
include/btllib/counting_bloom_filter-inl.hpp | ||
include/btllib/counting_bloom_filter.hpp | ||
include/btllib/cpptoml.h | ||
include/btllib/cstring.hpp | ||
include/btllib/data_stream.hpp | ||
include/btllib/graph.hpp | ||
include/btllib/indexlr.hpp | ||
include/btllib/mi_bloom_filter-inl.hpp | ||
include/btllib/mi_bloom_filter.hpp | ||
include/btllib/nthash.hpp | ||
include/btllib/nthash_consts.hpp | ||
include/btllib/nthash_lowlevel.hpp | ||
include/btllib/order_queue.hpp | ||
include/btllib/process_pipeline.hpp | ||
include/btllib/randseq.hpp | ||
include/btllib/seq.hpp | ||
include/btllib/seq_reader.hpp | ||
include/btllib/seq_reader_fasta_module.hpp | ||
include/btllib/seq_reader_fastq_module.hpp | ||
include/btllib/seq_reader_multiline_fasta_module.hpp | ||
include/btllib/seq_reader_multiline_fastq_module.hpp | ||
include/btllib/seq_reader_sam_module.hpp | ||
include/btllib/seq_writer.hpp | ||
include/btllib/status.hpp | ||
include/btllib/util.hpp | ||
lib/libbtllib.so |