mirror of
https://github.com/BioArchLinux/Packages.git
synced 2025-03-10 12:02:42 +00:00
gatb-core: system library
This commit is contained in:
parent
89f1b5ca2a
commit
2da6a72e3b
2 changed files with 86 additions and 24 deletions
|
@ -1,35 +1,63 @@
|
|||
# guoyi
|
||||
|
||||
pkgname=gatb-core
|
||||
pkgbase=gatb-core
|
||||
pkgname=(gatb-core gatb-core-doc)
|
||||
_pkgname=gatb-core
|
||||
pkgver=1.4.2
|
||||
pkgrel=2
|
||||
pkgdesc="Core library of the Genome Analysis Toolbox with de-Bruijn graph"
|
||||
arch=('any')
|
||||
url="https://github.com/GATB/gatb-core"
|
||||
pkgrel=1
|
||||
pkgdesc="The Genome Analysis Toolbox with de-Bruijn graph"
|
||||
arch=('x86_64')
|
||||
url="https://github.com/GATB/gatb-core/tree/master"
|
||||
license=('AGPL')
|
||||
depends=('gcc-libs')
|
||||
makedepends=('gcc' 'make' 'cmake' 'doxygen' 'hdf5' 'boost' 'graphviz')
|
||||
|
||||
depends=()
|
||||
makedepends=('gcc' 'make' 'cmake')
|
||||
optdepends=()
|
||||
source=(${_pkgname}-${pkgver}.tar.gz::https://github.com/GATB/gatb-core/archive/refs/tags/v${pkgver}.tar.gz
|
||||
"gatb.patch"
|
||||
)
|
||||
sha256sums=('824c84a3712973746b977a9d49923fd499021a894225231100eaad1a66e9742d'
|
||||
'8d5d82352cbd7680c2c560d9de92009815ea13aa05c10ae99b9bfac13d0a7f8d')
|
||||
|
||||
source=(https://github.com/GATB/gatb-core/archive/refs/tags/v${pkgver}.tar.gz)
|
||||
sha256sums=('824c84a3712973746b977a9d49923fd499021a894225231100eaad1a66e9742d')
|
||||
prepare() {
|
||||
cd "$pkgname-$pkgver"/$pkgname
|
||||
mkdir -p build
|
||||
prepare(){
|
||||
cd ${srcdir}/gatb-core-${pkgver}/gatb-core/src
|
||||
mkdir build src
|
||||
cp -rf ../thirdparty/{BooPHF,json} src
|
||||
cp -rf gatb src
|
||||
rm -rf gatb
|
||||
patch -p1 < ${srcdir}/gatb.patch
|
||||
# fix for hdf5
|
||||
find src -type f -print0 | xargs -0 sed -i "s|hdf5/hdf5.h|hdf5.h|g"
|
||||
}
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"/$pkgname
|
||||
cd build
|
||||
cmake ..
|
||||
make -j 4
|
||||
cd ${srcdir}/gatb-core-${pkgver}/gatb-core/src/build
|
||||
cmake .. -DINT128_FOUND=0 -Dgatb-core-version=${pkgver} \
|
||||
-Dgatb-core-date=$(date -I) -Dgatb-core-flags="-std=c++11 -Wno-invalid-offsetof" \
|
||||
-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr
|
||||
make
|
||||
|
||||
# doc
|
||||
cd ${srcdir}/gatb-core-${pkgver}/gatb-core/doc
|
||||
cmake . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/share/doc/${pkgbase}
|
||||
make doc
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"/$pkgname
|
||||
cd build
|
||||
install -dm755 "$pkgdir"/usr/{bin,lib,include}
|
||||
mv bin/* $pkgdir/usr/bin/
|
||||
mv lib/* $pkgdir/usr/lib/
|
||||
mv include/* $pkgdir/usr/include
|
||||
package_gatb-core() {
|
||||
cd ${srcdir}/gatb-core-${pkgver}/gatb-core/src/build
|
||||
make install DESTDIR=${pkgdir}
|
||||
}
|
||||
package_gatb-core-doc() {
|
||||
arch=('any')
|
||||
pkgdesc+=" Documentation"
|
||||
depends=()
|
||||
|
||||
cd ${srcdir}/gatb-core-${pkgver}/gatb-core/doc
|
||||
# fix bugs for CMakelists.txt
|
||||
mkdir doc
|
||||
mv html doc
|
||||
|
||||
make install DESTDIR=${pkgdir}
|
||||
cd ${pkgdir}/usr/share/doc/${pkgbase}
|
||||
find doc/html -type f -print0 | xargs -0 sed -i "s|$srcdir||g"
|
||||
mv doc/html ./
|
||||
rmdir doc
|
||||
}
|
||||
|
|
34
BioArchLinux/gatb-core/gatb.patch
Normal file
34
BioArchLinux/gatb-core/gatb.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 3ebbdc2..3bbbc7b 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -1,3 +1,4 @@
|
||||
+project(gatb-core CXX)
|
||||
################################################################################
|
||||
# KMER SIZE DEFINITION
|
||||
################################################################################
|
||||
@@ -81,13 +82,13 @@ file (GLOB_RECURSE ComponentFiles * ${PROJECT_BINARY_DIR}/src/gatb/*.cpp)
|
||||
# We add the compilation options for the library
|
||||
add_definitions (${gatb-core-flags})
|
||||
|
||||
-include_directories (${gatb-core-includes})
|
||||
+include_directories (${PROJECT_SOURCE_DIR}/src ${PROJECT_BINARY_DIR}/include)
|
||||
|
||||
add_library (gatbcore-static STATIC ${ComponentFiles} )
|
||||
-#add_library (gatbcore-dynamic SHARED ${ComponentFiles} )
|
||||
+add_library (gatbcore-dynamic SHARED ${ComponentFiles} )
|
||||
|
||||
set_target_properties (gatbcore-static PROPERTIES OUTPUT_NAME gatbcore clean_direct_output 1)
|
||||
-#set_target_properties (gatbcore-dynamic PROPERTIES OUTPUT_NAME gatbcore clean_direct_output 1)
|
||||
+set_target_properties (gatbcore-dynamic PROPERTIES OUTPUT_NAME gatbcore clean_direct_output 1)
|
||||
|
||||
################################################################################
|
||||
# INSTALLATION
|
||||
@@ -96,6 +97,7 @@ set_target_properties (gatbcore-static PROPERTIES OUTPUT_NAME gatbcore clea
|
||||
# We install the libraries
|
||||
IF (NOT DEFINED GATB_CORE_INSTALL_EXCLUDE)
|
||||
install (TARGETS gatbcore-static DESTINATION lib)
|
||||
+ install (TARGETS gatbcore-dynamic DESTINATION lib)
|
||||
install (DIRECTORY ${PROJECT_SOURCE_DIR}/src/ DESTINATION include FILES_MATCHING PATTERN "*.hpp" PATTERN "*.tpp" PATTERN "*.pri" PATTERN "*.h")
|
||||
install (FILES ${PROJECT_BINARY_DIR}/include/gatb/system/api/config.hpp DESTINATION include/gatb/system/api/)
|
||||
ENDIF ()
|
Loading…
Add table
Reference in a new issue