forked from flathub/org.openchemistry.Avogadro2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
org.openchemistry.Avogadro2.yaml
157 lines (150 loc) · 6.22 KB
/
org.openchemistry.Avogadro2.yaml
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
app-id: org.openchemistry.Avogadro2
default-branch: beta
runtime: org.kde.Platform
sdk: org.kde.Sdk
runtime-version: "6.8"
command: avogadro2
appdata-license: BSD-3-Clause AND GPL-2.0-only
finish-args:
- --socket=wayland
- --socket=fallback-x11 # To support X11
- --share=ipc # Bad performance on X11 without
- --device=dri # OpenGL rendering
- --share=network # For plugin downloads
cleanup:
- /lib/cmake
- '*.la'
- '*.a'
modules:
# Needed to compile glew apparently
- shared-modules/glu/glu-9.json
# Open Babel is broken without patched rapidjson
- name: rapidjson
buildsystem: cmake-ninja
builddir: true
config-opts:
- -DRAPIDJSON_BUILD_DOC=OFF
- -DRAPIDJSON_BUILD_EXAMPLES=OFF
- -DRAPIDJSON_BUILD_TESTS=OFF
sources:
- type: git
url: https://github.com/Tencent/rapidjson.git
# Commit used was simply most recent at the time of writing
# Would rather use 4d6cb08189cf7336821f04090b612baa2ca6a90d (same commit as openSUSE
# Tumbleweed) as known to be good, but older commits like that don't seem to compile
commit: 7c73dd7de7c4f14379b781418c6e947ad464c818
- name: avogadro2
buildsystem: cmake-ninja
builddir: true # Build outside of source tree, just like other builds
no-make-install: true # Superbuild doesn't have `install` command defined
config-opts:
# Match GitHub builds as much as possible, which generally means using defaults
- -DCMAKE_BUILD_TYPE=Release
- -DUSE_VTK=ON
- -DBUILD_GPL_PLUGINS=ON
- -DBUILD_MOLEQUEUE=OFF
- -DQT_VERSION=6
- -DDOWNLOAD_TO_SOURCE_DIR=ON
sources:
# First get the umbrella repo so we can use superbuild strategy
# Clone but not recursively, only want CMake files and dir structure
- type: git
url: https://github.com/OpenChemistry/openchemistry.git
commit: 0bd11984cdb6d8ecb13c255b7557dd8b3f0ef20d
disable-shallow-clone: true
disable-submodules: true
# Do the equivalent of checking out each in-house module
# avogadroapp
- type: git
url: https://github.com/OpenChemistry/avogadroapp.git
commit: f8753691535cfe2442582e523f1b9639afd4c52f
dest: avogadroapp
# avogadrolibs
- type: git
url: https://github.com/OpenChemistry/avogadrolibs.git
commit: 42c349aa0d76b08ab561f24b391d075e5033c64c
dest: avogadrolibs
# avogadro-i18n
- type: git
url: https://github.com/OpenChemistry/avogadro-i18n.git
commit: 07bee855ee8f34b64caf804e69cc4c0b34112ca3
dest: avogadro-i18n
# avogadrogenerators
- type: git
url: https://github.com/OpenChemistry/avogenerators.git
commit: f4e3bd7f63664a6844e732e89598bfed48b2c47e
dest: avogadrogenerators
# crystals
- type: git
url: https://github.com/OpenChemistry/crystals.git
commit: 28404bd4cceae4c7a688f78b50a59ea819186ccd
dest: crystals
# fragments
- type: git
url: https://github.com/OpenChemistry/fragments.git
commit: 3c54a8adfcc5210ed454575f0566d758b5004d63
dest: fragments
# molecules
- type: git
url: https://github.com/OpenChemistry/molecules.git
commit: ecfb0c27ce02550ff6014a35fbe6a4483032403d
dest: molecules
# Now fetch third-party stuff where the source is expected in `openchemistry/thirdparty`
# VTK
- type: archive
url: https://www.vtk.org/files/release/9.3/VTK-9.3.0.tar.gz
sha256: fdc7b9295225b34e4fdddc49cd06e66e94260cb00efee456e0f66568c9681be9
dest: thirdparty/VTK
# Other third-party sources would normally be downloaded by Avogadro build on the fly
# Flatpaks aren't allowed network access during build so have to download source archives
# ahead of time to download_dir (which we've indicated using `-DDOWNLOAD_TO_SOURCE_DIR=ON`)
# Match order in projects.cmake
# glew
# (Should be able to use shared module but not picked up for whatever reason)
- type: file
url: https://github.com/nigels-com/glew/releases/download/glew-2.2.0/glew-2.2.0.tgz
sha256: d4fc82893cfb00109578d0a1a2337fb8ca335b3ceccf97b97e5cc7f08e4353e1
dest: Downloads
# Eigen3
- type: file
url: https://gitlab.com/libeigen/eigen/-/archive/3.4.0/eigen-3.4.0.tar.gz
sha256: 8586084f71f9bde545ee7fa6d00288b264a2b7ac3607b974e54d13e7162c1c72
dest: Downloads
# OpenBabel
- type: file
url: https://github.com/openbabel/openbabel/archive/32cf131444c1555c749b356dab44fb9fe275271f.tar.gz
sha256: 7b471015df510b30057b8356f42729a35dfd1f4fa85f205c56bbaf3c64e85071
dest: Downloads
# spglib
- type: file
url: https://github.com/spglib/spglib/archive/v2.5.0.tar.gz
sha256: b6026f5e85106c0c9ee57e54b9399890d0f29982e20e96ede0428b3efbe6b914
dest: Downloads
# libarchive
- type: file
url: https://github.com/libarchive/libarchive/archive/v3.7.7.tar.gz
sha256: fa62384995e8aa4f5a901c184fb5c91e56a29e24c05b6881a7f8fd5bbea694d2
dest: Downloads
# msgpackc
- type: file
url: https://github.com/msgpack/msgpack-c/releases/download/cpp-3.3.0/msgpack-3.3.0.tar.gz
sha256: 6e114d12a5ddb8cb11f669f83f32246e484a8addd0ce93f274996f1941c1f07b
dest: Downloads
# mmtf-cpp
- type: file
url: https://github.com/rcsb/mmtf-cpp/archive/refs/tags/v1.1.0.tar.gz
sha256: 021173bdc1814b1d0541c4426277d39df2b629af53151999b137e015418f76c0
dest: Downloads
# libmsym
- type: file
url: https://github.com/mcodev31/libmsym/archive/refs/tags/v0.2.3-paper.tar.gz
sha256: 3741ebe163cf40696570d6b62e4834ca587d43dcac9de713994cc5e2960fb8fd
dest: Downloads
post-install:
# Manually copy contents of prefix dir over into main build dir
# -a option is recursive, should preserve permissions and symlinks
- cp -a prefix/bin -t ${FLATPAK_DEST}/
- cp -a prefix/lib -t ${FLATPAK_DEST}/
- cp -a prefix/lib64/* -t ${FLATPAK_DEST}/lib/ # Merge with lib
- ln -rs ${FLATPAK_DEST}/lib ${FLATPAK_DEST}/lib64 # Add a symlink so plugins get found
- cp -a prefix/share -t ${FLATPAK_DEST}/