# Description: Bio++ 1 NumCalc Library # URL: http://biopp.univ-montp2.fr/ # Maintainer: Petar Petrov, slackalaxy at gmail dot com # Depends on: bpp1-utils name=bpp1-numcalc version=1.8.0 release=2 source=(https://raw.githubusercontent.com/slackalaxy/sources/main/bpp-numcalc-$version.tar.gz) build() { cd bpp-numcalc-$version # TODO: keep an eye on this, when support for CMAKE < 3.10 is dropped sed -i 's:CMAKE_MINIMUM_REQUIRED(VERSION 2.6):CMAKE_MINIMUM_REQUIRED(VERSION 3.30):' CMakeLists.txt # build fails with recent gcc export CXX=g++-5 # This is needed for vCAPS to find its libraries at runtime. LIBDIRPATH="-Wl,-rpath,/usr/lib/Bpp1" # Use custom install place, so libs can coexist with latest bpp sed -i "s:/lib/:/lib/Bpp1/:g" NumCalc.spec sed -i "s:/include/:/include/Bpp1/:g" NumCalc.spec mkdir -p build cd build cmake \ -D CMAKE_CXX_FLAGS:STRING="$CFLAGS $LIBDIRPATH" \ -D CMAKE_INSTALL_PREFIX=/usr \ -D bpp-utils_INCLUDE_DIR:PATH=/usr/include/Bpp1/ \ -D bpp-utils_LIBRARY:FILEPATH=/usr/lib/Bpp1/libbpp-utils.so \ -D CMAKE_BUILD_TYPE=Release .. sed -i 's:{CMAKE_INSTALL_PREFIX}/lib:{CMAKE_INSTALL_PREFIX}/lib/Bpp1:g' NumCalc/cmake_install.cmake sed -i 's:{CMAKE_INSTALL_PREFIX}/include:{CMAKE_INSTALL_PREFIX}/include/Bpp1:g' NumCalc/cmake_install.cmake make make DESTDIR=$PKG install mkdir -p $PKG/etc/revdep.d echo "/usr/lib/Bpp1" > $PKG/etc/revdep.d/$name }