alglib-3.15.0.recipe revision bf291b21
1SUMMARY="Numerical analysis and data processing library"
2DESCRIPTION="ALGLIB is a cross-platform numerical analysis and data \
3processing library. It supports several programming languages (C\+\+, C\#, \
4Delphi) and several operating systems (Windows and POSIX, including Linux).
5
6ALGLIB features include:
7* Data analysis (classification/regression, statistics)
8* Optimization and nonlinear solvers
9* Interpolation and linear/nonlinear least-squares fitting
10* Linear algebra (direct algorithms, EVD/SVD), direct and iterative linear \
11solvers
12* Fast Fourier Transform and many other algorithms"
13HOMEPAGE="http://www.alglib.net/"
14COPYRIGHT="1999-2019 Sergey Bochkanov"
15LICENSE="GNU GPL v2"
16REVISION="3"
17SOURCE_URI="http://www.alglib.net/translator/re/alglib-$portVersion.cpp.gpl.tgz"
18CHECKSUM_SHA256="55435decad45f4b5acdc9651f40c6e9f99a4f148c983e0e4370c9f23bf3329f9"
19SOURCE_DIR="cpp"
20ADDITIONAL_FILES="CMakeLists.txt.in"
21
22ARCHITECTURES="!x86_gcc2 x86 x86_64"
23SECONDARY_ARCHITECTURES="x86"
24
25libVersion="$portVersion"
26libVersionCompat="$libVersion compat >= ${libVersion%%.*}"
27
28PROVIDES="
29	alglib$secondaryArchSuffix = $portVersion
30	lib:libalglib$secondaryArchSuffix = $libVersionCompat
31	"
32REQUIRES="
33	haiku$secondaryArchSuffix
34	lib:libgfortran$secondaryArchSuffix
35	lib:libgomp$secondaryArchSuffix
36	"
37
38PROVIDES_devel="
39	alglib${secondaryArchSuffix}_devel = $portVersion
40	devel:libalglib$secondaryArchSuffix = $libVersionCompat
41	"
42REQUIRES_devel="
43	alglib$secondaryArchSuffix == $portVersion base
44	"
45
46BUILD_REQUIRES="
47	haiku${secondaryArchSuffix}_devel
48	"
49BUILD_PREREQUIRES="
50	cmd:cmake
51	cmd:g++$secondaryArchSuffix
52	cmd:make
53	cmd:pkg_config$secondaryArchSuffix
54	"
55
56defineDebugInfoPackage alglib$secondaryArchSuffix \
57	"$libDir"/libalglib.so.$portVersion \
58
59BUILD()
60{
61	# ALGLIB doesn't provide any build system
62	local VERSION="$portVersion"
63	local SOVERSION="`echo ${portVersion%.*}`"
64	sed \
65		-e "s|@VERSION@|$VERSION|" \
66		-e "s|@SOVERSION@|$SOVERSION|" \
67		$portDir/additional-files/CMakeLists.txt.in > CMakeLists.txt
68
69	mkdir -p build && cd build
70
71	cmake .. \
72		-DBUILD_TEST=ON \
73		$cmakeDirArgs
74
75	make $jobArgs
76}
77
78INSTALL()
79{
80	cd build
81	make install
82
83	install -m 0755 -d "$developDocDir"
84	install -m 0644 -t "$developDocDir" ../manual.cpp.html
85
86	prepareInstalledDevelLibs libalglib
87
88	packageEntries devel \
89		$developDir
90}
91
92TEST()
93{
94	cd build
95	make test
96}
97