This repository has been archived by the owner on May 20, 2023. It is now read-only.
/
PKGBUILD
66 lines (53 loc) · 1.75 KB
/
PKGBUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
# Maintainer: Jaroslav Lichtblau <svetlemodry@archlinux.org>
# Contributor: Aetf <aetf at unlimitedcodeworks dot xyz>
# Contributor: Lex Black <autumn-wind at web dot de>
# Contributor: Peng Zhang <pczhang@gmail.com>
pkgname=alglib
pkgver=3.20.0
pkgrel=1
pkgdesc="A cross-platform numerical analysis and data processing library - Free Version"
arch=('x86_64')
url="http://www.alglib.net"
license=('GPL2')
makedepends=('cmake')
source=(http://www.alglib.net/translator/re/alglib-${pkgver}.cpp.gpl.tgz)
sha256sums=('e7357f0f894313ff1b640ec9cb5e8b63f06d2d3411c2143a374aa0e9740da8a9')
prepare() {
cd "${srcdir}"/alglib-cpp
# generate a simple cmake file to build the library since the release
# doesn't provide any build system
cat > CMakeLists.txt <<END
cmake_minimum_required(VERSION 3.0)
project(alglib VERSION ${pkgver})
file(GLOB SRCS src/*.cpp)
file(GLOB HEADERS src/*.h)
add_library(alglib_static STATIC \${SRCS})
set_target_properties(alglib_static PROPERTIES
OUTPUT_NAME alglib
PUBLIC_HEADER "\${HEADERS}"
)
add_library(alglib SHARED \${SRCS})
set_target_properties(alglib PROPERTIES
VERSION "\${PROJECT_VERSION}"
SOVERSION "\${PROJECT_VERSION_MAJOR}"
PUBLIC_HEADER "\${HEADERS}"
)
include(GNUInstallDirs)
install(TARGETS alglib alglib_static
LIBRARY DESTINATION "\${CMAKE_INSTALL_LIBDIR}"
ARCHIVE DESTINATION "\${CMAKE_INSTALL_LIBDIR}"
PUBLIC_HEADER DESTINATION "\${CMAKE_INSTALL_INCLUDEDIR}/libalglib"
)
install(FILES manual.cpp.html DESTINATION "\${CMAKE_INSTALL_DOCDIR}")
END
mkdir -p build
}
build() {
cd "${srcdir}"/alglib-cpp/build
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_INSTALL_LIBDIR=lib ..
make VERBOSE=1
}
package() {
cd "${srcdir}"/alglib-cpp/build
make DESTDIR="${pkgdir}" install
}