summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 4604ddfe74ab8a946f72ed5119bcf08882085876 (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
# Maintainer: Carlos Aznarán <caznaranl@uni.pe>
# Contributor: Anton Kudelin <kudelin at proton dot me>
# Contributor: chn <g897331845@gmail.com>
# Contributor: Ross Whitfield <whitfieldre@ornl.gov>
# Contributor: Brian Lam <blamm9[at]gmail[dot]com>
# Contributor: AG_Caesar <caesar[at]drachenhain[dot]net>
# Contributor: Jan Oliver Oelerich <janoliver[at]oelerich[dot]org>
pkgname=ovito
pkgver=3.11.3
pkgrel=1
pkgdesc="Open Visualization Tool"
url="https://www.${pkgname}.org"
arch=(x86_64 aarch64)
license=(GPL-3.0-or-later)
depends=(netcdf-openmpi ffmpeg qt6-base)
makedepends=(cmake boost qscintilla-qt6 qt6-svg libxslt python-sphinx_rtd_theme git)
conflicts=($pkgname-git)
source=(${pkgname}-${pkgver}::git+https://gitlab.com/stuko/${pkgname}.git#tag=v${pkgver}
  gitlab.com-tests-files::git+https://gitlab.com/${pkgname}-org/${pkgname}_test_files.git
  github.com-src-3rdparty-zstd::git+https://github.com/facebook/zstd.git
  ${url}/wp-content/uploads/logo_rgb-768x737.png
  ${pkgname}.desktop)
sha512sums=('050ee3ec079e1e702443d8d20a7b2a469f3af60144bd013965fb441ce17ec7853ff2cb556730c85353a06fee5096250ad374df15348c239184233c76ab595515'
            'SKIP'
            'SKIP'
            '1afe91e9634a6574ba58535cb9b636b63daa02d9157f50d9c5c959c9da151e9635ca73d0616fd8ccac2e7742f2289a6eba05e62b206baee4f738c53526ec4bb8'
            'fdf21d1821855b1ea93c598ef062669c29c15975a288f72240c183b8f10e8b6d38f96b15fdf02949d66bd94f76df0daed87e9c4d2201db61d4c2750be574e8cd')

prepare() {
  cd ${pkgname}-${pkgver}
  # Use zstd as share library
  sed -i 's/libzstd_static/libzstd/' src/ovito/core/CMakeLists.txt
  git submodule init
  git config submodule.tests/files.url "${srcdir}/gitlab.com-tests-files"
  git config submodule.src/3rdparty/zstd.url "${srcdir}/github.com-src-3rdparty-zstd"
  git -c protocol.file.allow=always submodule update
}

build() {
  cmake -S ${pkgname}-${pkgver} \
    -B build \
    -DCMAKE_BUILD_TYPE=None \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DBUILD_SHARED_LIBS=TRUE \
    -DCMAKE_CXX_STANDARD=20 \
    -DOpenGL_GL_PREFERENCE=GLVND \
    -DOVITO_BUILD_DOCUMENTATION=ON \
    -DOVITO_BUILD_SSH_CLIENT=ON

  cmake --build build --target all
}

package() {
  DESTDIR="${pkgdir}" cmake --build build --target install

  install -Dm644 "$srcdir/logo_rgb-768x737.png" \
    "$pkgdir/usr/share/pixmaps/ovito.png"
  install -Dm644 "$srcdir/ovito.desktop" -t \
    "$pkgdir/usr/share/applications/"

  install -Dm644 ${pkgname}-${pkgver}/LICENSE.GPL.txt "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
}