-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Expand file tree
/
Copy pathPKGBUILD
More file actions
56 lines (48 loc) · 1.77 KB
/
Copy pathPKGBUILD
File metadata and controls
56 lines (48 loc) · 1.77 KB
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
# Maintainer: Rafal Brzegowy <rafal.brzegowy@yahoo.com>
_realname=adol-c
pkgbase=mingw-w64-${_realname}
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
pkgver=2.7.2
pkgrel=7
pkgdesc='Automatic Differentiation of Algorithms written in C/C++ (mingw-w64)'
arch=('any')
mingw_arch=('mingw64' 'ucrt64' 'clang64' 'clangarm64')
url='https://github.com/coin-or/ADOL-C'
msys2_repository_url='https://github.com/coin-or/ADOL-C'
license=('spdx:EPL-1.0')
depends=("${MINGW_PACKAGE_PREFIX}-cc-libs"
"${MINGW_PACKAGE_PREFIX}-omp")
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
"${MINGW_PACKAGE_PREFIX}-autotools"
"${MINGW_PACKAGE_PREFIX}-boost")
source=(https://github.com/coin-or/ADOL-C/archive/releases/${pkgver}/${_realname}-${pkgver}.tar.gz
001-do-not-search-for-boost-system.patch)
sha256sums=('701e0856baae91b98397960d5e0a87a549988de9d4002d0e9a56fa08f5455f6e'
'4f1b56a6399b5fafc4a0344cd47a927aa8cbe1c81e16e2e5e27bb552c1b12e85')
prepare() {
cd ${_realname}-releases-${pkgver}
patch -p1 -i "${srcdir}"/001-do-not-search-for-boost-system.patch
autoreconf -fi
}
build() {
mkdir -p "${srcdir}/build-${MSYSTEM}" && cd "${srcdir}/build-${MSYSTEM}"
local -a extra_config
extra_config+=(--with-openmp-flag="-fopenmp")
if [[ ${MINGW_PACKAGE_PREFIX} == *-clang-* ]]; then
LDFLAGS+=" -lomp"
fi
../${_realname}-releases-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--enable-static \
--with-gnu-ld \
--libdir=${MINGW_PREFIX}/lib \
--with-boost=${MINGW_PREFIX} \
"${extra_config[@]}"
make
}
package() {
cd "${srcdir}/build-${MSYSTEM}"
make install DESTDIR="${pkgdir}"
install -Dm644 "${srcdir}"/${_realname}-releases-${pkgver}/LICENSE "${pkgdir}"${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE
}
# vim: ts=2 sw=2 et: