mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 22:48:55 +02:00
36
sci-libs/alglib/additional-files/CMakeLists.txt.in
Normal file
36
sci-libs/alglib/additional-files/CMakeLists.txt.in
Normal file
@@ -0,0 +1,36 @@
|
||||
project(alglib CXX)
|
||||
cmake_minimum_required(VERSION 2.8)
|
||||
|
||||
INCLUDE(GNUInstallDirs)
|
||||
INCLUDE_DIRECTORIES(${CMAKE_SOURCE_DIR}/src)
|
||||
SET(VERSION @VERSION@)
|
||||
SET(SOVERSION @SOVERSION@)
|
||||
|
||||
option(BUILD_TEST "Build tests" OFF)
|
||||
|
||||
FILE(GLOB ALGLIB_SRC_LIB "src/*.cpp")
|
||||
FILE(GLOB ALGLIB_HDR_LIB "src/*.h")
|
||||
|
||||
ADD_LIBRARY(alglib SHARED ${ALGLIB_SRC_LIB})
|
||||
SET_TARGET_PROPERTIES(alglib PROPERTIES
|
||||
VERSION ${VERSION}
|
||||
SOVERSION ${SOVERSION})
|
||||
|
||||
INSTALL(TARGETS alglib DESTINATION ${CMAKE_INSTALL_LIBDIR}/)
|
||||
INSTALL(FILES ${ALGLIB_HDR_LIB} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
|
||||
|
||||
if (BUILD_TEST)
|
||||
#===========================================================
|
||||
ADD_EXECUTABLE(test_c tests/test_c.cpp)
|
||||
TARGET_LINK_LIBRARIES(test_c alglib)
|
||||
#INSTALL(TARGETS test_c DESTINATION ${CMAKE_INSTALL_BINDIR}/)
|
||||
#===========================================================
|
||||
ADD_EXECUTABLE(test_i tests/test_i.cpp)
|
||||
TARGET_LINK_LIBRARIES(test_i alglib)
|
||||
#INSTALL(TARGETS test_i DESTINATION ${CMAKE_INSTALL_BINDIR}/)
|
||||
#===========================================================
|
||||
|
||||
enable_testing()
|
||||
endif (BUILD_TEST)
|
||||
add_test( test_c ${CMAKE_BUILD_DIR}/test_c)
|
||||
add_test( test_i ${CMAKE_BUILD_DIR}/test_i)
|
||||
96
sci-libs/alglib/alglib-3.15.0.recipe
Normal file
96
sci-libs/alglib/alglib-3.15.0.recipe
Normal file
@@ -0,0 +1,96 @@
|
||||
SUMMARY="Numerical analysis and data processing library"
|
||||
DESCRIPTION="ALGLIB is a cross-platform numerical analysis and data \
|
||||
processing library. It supports several programming languages (C\+\+, C\#, \
|
||||
Delphi) and several operating systems (Windows and POSIX, including Linux).
|
||||
|
||||
ALGLIB features include:
|
||||
* Data analysis (classification/regression, statistics)
|
||||
* Optimization and nonlinear solvers
|
||||
* Interpolation and linear/nonlinear least-squares fitting
|
||||
* Linear algebra (direct algorithms, EVD/SVD), direct and iterative linear \
|
||||
solvers
|
||||
* Fast Fourier Transform and many other algorithms"
|
||||
HOMEPAGE="http://www.alglib.net/"
|
||||
COPYRIGHT="1999-2019 Sergey Bochkanov"
|
||||
LICENSE="GNU GPL v2"
|
||||
REVISION="1"
|
||||
SOURCE_URI="http://www.alglib.net/translator/re/alglib-$portVersion.cpp.gpl.tgz"
|
||||
CHECKSUM_SHA256="55435decad45f4b5acdc9651f40c6e9f99a4f148c983e0e4370c9f23bf3329f9"
|
||||
SOURCE_DIR="cpp"
|
||||
ADDITIONAL_FILES="CMakeLists.txt.in"
|
||||
|
||||
ARCHITECTURES="!x86_gcc2 x86 x86_64"
|
||||
SECONDARY_ARCHITECTURES="x86"
|
||||
|
||||
libVersion="$portVersion"
|
||||
libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
|
||||
|
||||
PROVIDES="
|
||||
alglib$secondaryArchSuffix = $portVersion
|
||||
lib:libalglib$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES="
|
||||
haiku$secondaryArchSuffix
|
||||
lib:libgfortran$secondaryArchSuffix
|
||||
lib:libgomp$secondaryArchSuffix
|
||||
"
|
||||
|
||||
PROVIDES_devel="
|
||||
alglib${secondaryArchSuffix}_devel = $portVersion
|
||||
devel:libalglib$secondaryArchSuffix = $libVersionCompat
|
||||
"
|
||||
REQUIRES_devel="
|
||||
alglib$secondaryArchSuffix == $portVersion base
|
||||
"
|
||||
|
||||
BUILD_REQUIRES="
|
||||
haiku${secondaryArchSuffix}_devel
|
||||
"
|
||||
BUILD_PREREQUIRES="
|
||||
cmd:cmake
|
||||
cmd:g++$secondaryArchSuffix
|
||||
cmd:make
|
||||
cmd:pkg_config$secondaryArchSuffix
|
||||
"
|
||||
|
||||
defineDebugInfoPackage alglib$secondaryArchSuffix \
|
||||
"$libDir"/libalglib.so.$portVersion \
|
||||
|
||||
BUILD()
|
||||
{
|
||||
# ALGLIB doesn't provide any build system
|
||||
local VERSION="$portVersion"
|
||||
local SOVERSION="`echo ${portVersion%.*}`"
|
||||
sed \
|
||||
-e "s|@VERSION@|$VERSION|" \
|
||||
-e "s|@SOVERSION@|$SOVERSION|" \
|
||||
$portDir/additional-files/CMakeLists.txt.in > CMakeLists.txt
|
||||
|
||||
mkdir -p build && cd build
|
||||
|
||||
cmake .. \
|
||||
-DBUILD_TEST=ON \
|
||||
$cmakeDirArgs
|
||||
|
||||
make $jobArgs
|
||||
}
|
||||
|
||||
INSTALL()
|
||||
{
|
||||
cd build
|
||||
make install
|
||||
|
||||
install -m 0755 -d "$developDocDir"
|
||||
install -m 0644 -t "$developDocDir" ../manual.cpp.html
|
||||
|
||||
prepareInstalledDevelLibs libalglib
|
||||
|
||||
packageEntries devel \
|
||||
$developDir
|
||||
}
|
||||
|
||||
TEST()
|
||||
{
|
||||
cd build
|
||||
make test
|
||||
}
|
||||
Reference in New Issue
Block a user