forked from flathub/org.openchemistry.Avogadro2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathorg.openchemistry.Avogadro2.yaml
172 lines (164 loc) · 6.58 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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
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: openbabel
buildsystem: cmake-ninja
builddir: true
config-opts:
# Match the way Avogadro builds Open Babel
- -DCMAKE_BUILD_TYPE=Release
- -DENABLE_TESTS=OFF
- -DBUILD_GUI=OFF
- -DOPTIMIZE_NATIVE=OFF
- -DOB_USE_PREBUILT_BINARIES=OFF
- -DENABLE_VERSIONED_FORMATS=OFF
- -DWITH_JSON=ON
- -DWITH_COORDGEN=OFF
- -DWITH_MAEPARSER=OFF
sources:
- type: git
url: https://github.com/openbabel/openbabel.git
commit: 32cf131444c1555c749b356dab44fb9fe275271f
- 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
- -DUSE_SYSTEM_OPENBABEL=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: 4d71cf2b1e42da274ed9aab6cecd2061780d3057
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: 2addc17d59a9e1cc990c60d2714aaa8b9df6709d
dest: avogadroapp
# avogadrolibs
- type: git
url: https://github.com/OpenChemistry/avogadrolibs.git
commit: 7c04f6412472269594d2b1378bec5c56932c6345
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: c4943b58a488061615e3daf1f183acb01591e890
dest: fragments
# molecules
- type: git
url: https://github.com/OpenChemistry/molecules.git
commit: 8a37883ef47375247be5bbb41b538c85e131bc12
dest: molecules
# Now fetch third-party stuff where the source is expected in `openchemistry/thirdparty`
# VTK
- type: archive
url: https://github.com/Kitware/VTK/archive/4f02ae83179c6a1542ac3c335c73dea976578c63.tar.gz
sha256: 2d2da63dc660016628fc41c3a201e24d49a7e67b0d5d6fbbe655fb23f5099929
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
# 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}/