blob: f344e3d0a94e102630d2e03b65e7bff58075893c (
plain)
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
# Maintainer: Adam Perkowski <adas1per@protonmail.com>
# https://github.com/adamperkowski/PKGBUILDs
pkgname=brlcad
pkgver=7.36.0
pkgrel=1
pkgdesc='Extensive 3D solid modeling system'
url='https://brlcad.org'
license=('LGPL-2.1-only' 'BSD-3-Clause' 'LicenseRef-BDL')
arch=('i686' 'x86_64')
depends=('gdal' 'libgl' 'libxft' 'libxi')
makedepends=('cmake' 'ninja')
install="$pkgname.install"
_tag_name="rel-${pkgver//./-}"
source=(
'build.patch'
"https://github.com/BRL-CAD/${pkgname}/archive/refs/tags/${_tag_name}.tar.gz")
sha256sums=('9ab01f9148cc0dc0771fcc64d77f9b8d1d52e2ea031444db5fdc55ef49c88dfd'
'1108ae3bb031c5ab84c1c5eaf752bc253ae8a81853113afeba9d4b1ec61db835')
_build_config='Release'
_prefix="/opt/${pkgname}"
prepare() {
patch \
--strip=0 \
"--directory=${srcdir}/${pkgname}-${_tag_name}" \
"--input=${srcdir}/build.patch"
}
build() {
cmake \
-G Ninja \
-S "${srcdir}/${pkgname}-${_tag_name}" \
-B "${srcdir}/build" \
-Wno-dev \
"-DCMAKE_INSTALL_PREFIX=${_prefix}" \
"-DCMAKE_BUILD_TYPE=${_build_config}" \
-DBUILD_STATIC_LIBS=OFF \
-DBRLCAD_ENABLE_COMPILER_WARNINGS=OFF \
-DBRLCAD_ENABLE_STRICT=OFF \
-DBRLCAD_FLAGS_DEBUG=OFF \
-DBRLCAD_BUNDLED_LIBS=BUNDLED \
-DBRLCAD_GDAL=OFF \
-DBRLCAD_PNG=OFF \
-DBRLCAD_REGEX=OFF \
-DBRLCAD_ZLIB=OFF \
-DBRLCAD_ENABLE_OPENGL=ON \
-DBRLCAD_ENABLE_QT=OFF
cmake --build "${srcdir}/build" --config "${_build_config}"
echo \
"export PATH=\"\$PATH:${_prefix}/bin\"" \
>"${srcdir}/build/${pkgname}.sh"
}
package() {
cmake \
--install "${srcdir}/build" \
--config "${_build_config}" \
--prefix "${pkgdir}${_prefix}"
install \
-D \
--mode=u=rw,go=r \
"--target-directory=${pkgdir}/usr/share/licenses/${pkgname}" \
"${srcdir}/build/share/doc/legal/"{bdl,bsd}.txt
install \
-D \
--mode=u=rw,go=r \
"--target-directory=${pkgdir}/etc/profile.d" \
"${srcdir}/build/${pkgname}.sh"
}
# vim: ts=2 sw=2 et:
|