-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAegisub.yaml
198 lines (198 loc) · 10.6 KB
/
Aegisub.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
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
name: Aegisub
config-opts:
- --enable-xdg-dirs
- --disable-update-checker
- --with-openal
- --with-libpulse
- --with-ffms2
- --with-fftw3
- --with-hunspell
- --with-player-audio=PulseAudio
- --with-boost-libdir=/app/lib
- --with-uchardet
- --with-system-luajit
- --with-appdata-dir=/app/share/appdata
- --with-dict-dir=/app/share/hunspell
build-options:
cppflags: -DU_USING_ICU_NAMESPACE=1
env:
agi_cv_with_openal: yes
sources:
- type: git
url: https://github.com/Aegisub/Aegisub
commit: 2cb92a5f74634764ff5aac7e3ad0d647f98142af
# Need full git history to generate revision number
disable-shallow-clone: true
# AM_GNU_GETTEXT_VERSION macro is missing from configure.ac
# https://web.archive.org/web/20160729163303/http://devel.aegisub.org/ticket/1914
# https://github.com/Aegisub/Aegisub/pull/135
# https://github.com/Aegisub/Aegisub/pull/135/commits/15fb55c7762619e910c0a9c95abf5849388a1ea2
- type: patch
path: aegisub-Add-missing-AM_GNU_GETTEXT_VERSION-macro.patch
# Respect compiler flags
# https://web.archive.org/web/20161027172607/http://devel.aegisub.org/ticket/1899
# https://web.archive.org/web/20161027171240/http://devel.aegisub.org/ticket/1900
# https://github.com/Aegisub/Aegisub/pull/29
# https://github.com/gentoo/gentoo/blob/be23ef21ed508c8e580f3ee8f302ce2abc5c3fbe/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-respect-compiler-flags.patch
# https://github.com/Aegisub/Aegisub/pull/136
# https://github.com/Aegisub/Aegisub/pull/136/commits/52f031903a7ff4aca20acef29920a9d45df04802
- type: patch
path: aegisub-respect-compiler-flags.patch
# Fix compilation by adding libatomic dependency
# https://github.com/Aegisub/Aegisub/pull/138
# https://github.com/Aegisub/Aegisub/pull/138/commits/6a5f05b3a1ebcf6b6b04f17f424d3a2e481042cf
- type: patch
path: aegisub-add-libatomic-dependency.patch
# Fixes for Boost 1.69.0
# https://github.com/Aegisub/Aegisub/issues/93
# https://github.com/Aegisub/Aegisub/commit/bb1f66a01f6e4661ab9c6610c5c2eee67bd0bd61
# https://github.com/gentoo/gentoo/blob/e2087ed19aa3327eb00833f64e5bf315d43816fa/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-boost170-build.patch
# https://github.com/Aegisub/Aegisub/pull/139
# https://github.com/Aegisub/Aegisub/pull/139/commits/9c8c162eed098f657b5b63a021ca9076c3c5accc
- type: patch
path: aegisub-boost-gil.patch
# Fixes for luajit
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=873327#10
# https://build.opensuse.org/package/view_file/multimedia:apps/aegisub/luabins.patch
# https://github.com/Aegisub/Aegisub/pull/140
# https://github.com/Aegisub/Aegisub/pull/140/commits/b78c14a0ad9773de18a040d6f8e57d3b04c0a82c
- type: patch
path: aegisub-luabins.patch
# Unbundle luajit
# Use system luajit instead
# http://web.archive.org/web/20161027172024/http://devel.aegisub.org/ticket/1904
# http://web.archive.org/web/20160628055359/http://devel.aegisub.org/ticket/1913
# http://web.archive.org/web/20161027172029/http://devel.aegisub.org/ticket/1922
# https://github.com/gentoo/gentoo/blob/e2087ed19aa3327eb00833f64e5bf315d43816fa/media-video/aegisub/files/3.2.2_p20160518/aegisub-3.2.2_p20160518-fix-system-luajit-build.patch
# https://github.com/Aegisub/Aegisub/pull/141
# https://github.com/Aegisub/Aegisub/pull/141/commits/a95b4c7875a45a67aab0af44869b8b852d4c31f8
- type: patch
path: aegisub-luajit.patch
# Fix DataBlockCache
# Fixes undefined behavior e.g. when scrolling the audio view in spectrogram mode.
# https://github.com/TypesettingTools/Aegisub/issues/33
# https://github.com/Aegisub/Aegisub/commit/4dc14eaf2c32bcdb613408919229424b8ea36a22
# https://github.com/Aegisub/Aegisub/pull/142
# https://github.com/Aegisub/Aegisub/pull/142/commits/5fb78afc4b489fcde1ac4a9bf1f0013666381403
# https://github.com/Aegisub/Aegisub/pull/142/commits/223a32ce40fc5e0650de2aedfd8e2f6235669460
# https://github.com/Aegisub/Aegisub/pull/142/commits/c8fed34f517fa04a348829b0cbbda6d9b1299aad
- type: patch
path: aegisub-DataBlockCache-Fix-crash-in-cache-invalidation.patch
# Fix crash when opening context menu due to no spell checker
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935724
# https://bugs.launchpad.net/ubuntu/+source/aegisub/+bug/1841381
# https://github.com/Aegisub/Aegisub/commit/0b8b286767bf796ecfc993c38c4ad14091703162#diff-64304e039535719d12a4a36d333a555c
# https://github.com/Aegisub/Aegisub/pull/143
# https://github.com/Aegisub/Aegisub/pull/143/commits/e848fece4f4a51411890a03fab0bf98252f04e65
- type: patch
path: aegisub-spellchecker.patch
# Fix crash when picking language
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=935724#10
# https://bugs.launchpad.net/ubuntu/+source/aegisub/+bug/1841381/comments/2
# https://github.com/Aegisub/Aegisub/issues/131
# https://github.com/Aegisub/Aegisub/pull/132
# https://github.com/Aegisub/Aegisub/pull/132/commits/717ff3885a94681ca62ca73e5587f5b8a27adad9
- type: patch
path: aegisub-langs.patch
# Fix deprecated calls to wx/STC
# ./src/stc/stc.cpp(5177): assert "unused==0" failed in StartStyling(): The second argument passed to StartStyling should be 0
# https://docs.wxwidgets.org/trunk/classwx_styled_text_ctrl.html#a0241ffbe1d8e4179d8b2ed453c4a4847
# https://github.com/Aegisub/Aegisub/issues/133
# https://github.com/Aegisub/Aegisub/pull/134
# https://github.com/Aegisub/Aegisub/pull/134/commits/8e0574d77d43ad346c32dddd476648f91bc3af2a
- type: patch
path: aegisub-wxStyledTextCtrl-StartStyling.patch
# Lift huge file limit
# Detect UTF-8 BOM when loading ass file
# Rewrite encoding detection
# https://github.com/Aegisub/Aegisub/issues/110
# https://github.com/Aegisub/Aegisub/commit/3502fd112c06d38ec17d6f9d5035ab56203c355d
# https://github.com/Aegisub/Aegisub/commit/f733297499f72ea11c166f6be23751a7b002c51c
# https://github.com/Aegisub/Aegisub/commit/d6ddea0f6577df319b5f2cbd2a54d5206693f752
# https://github.com/Aegisub/Aegisub/commit/fbca22229524210c3c9ae0f2bb423d405065d8f0#diff-db8148e40f1f9cbc536fb61329821419
# https://github.com/Aegisub/Aegisub/pull/144
# https://github.com/Aegisub/Aegisub/pull/144/commits/115be9ae6e80b527fd4db6b5119ccdbb8ebb4e25
# https://github.com/Aegisub/Aegisub/pull/144/commits/bf154a5e19ce7d3e77f551b05c78155889aab39b
# https://github.com/Aegisub/Aegisub/pull/144/commits/4a8da78626fc2509a03e645f6edc4e4d490f1613
# https://github.com/Aegisub/Aegisub/pull/144/commits/d5b5f234a2d15c24bee44ed67759ae4ab300a529
# https://github.com/Aegisub/Aegisub/pull/144/commits/6143eebe586da9fc40603e15ddb7d4e714b338ac
- type: patch
path: aegisub-encoding-detection.patch
# Fix paths
# Allow to use a custom path for dictionaries
# Respect the XDG base directories
# https://github.com/Aegisub/Aegisub/pull/148
# https://github.com/Aegisub/Aegisub/pull/148/commits/1f5c641b542c71bb71a384e92cf726921987d9ec
# https://github.com/Aegisub/Aegisub/pull/148/commits/3e2c406477ea870b1c41b6ea85761dde6081c9d6
- type: patch
path: aegisub-paths.patch
# Fix version string
# Use a more readable version string
# e.g. 3.2.2+r8947 instead of 8947-master-2cb92a5
# https://github.com/Aegisub/Aegisub/pull/145
# https://github.com/Aegisub/Aegisub/pull/145/commits/d24017d937a955be33e375a7bf1b82a953e4da6b
- type: patch
path: aegisub-version-git.patch
# Translate and install the AppData file
# https://github.com/Aegisub/Aegisub/pull/147
# https://github.com/Aegisub/Aegisub/pull/147/commits/18b8b1c1d5a6acc29a7221f99ef47d9f0f5338d4
# https://github.com/Aegisub/Aegisub/pull/147/commits/acefe5d4d528beb9512236f6ed864edc173a161d
- type: patch
path: aegisub-appdata.patch
# Template for the AppData file
# https://github.com/Aegisub/Aegisub/pull/147
# https://github.com/Aegisub/Aegisub/pull/147/commits/1fb20782b98a658212f75c392956d0d470d78ead
- type: file
path: aegisub.appdata.xml.template.in
dest: packages/desktop
- type: shell
commands:
- cp -p /usr/share/automake-*/config.{sub,guess} .;
- autoreconf -vfi;
post-install:
# Install additional icons
- |
icon_in="packages/desktop/scalable.svg";
icon_out="aegisub.png";
for s in {16,22,24,32,36,48,64,72,96,128,192,256,512}; do
[[ ! -f "${FLATPAK_DEST}/share/icons/hicolor/${s}x${s}/apps/${icon_out}" ]] || continue;
rsvg-convert "${icon_in}" -w "${s}" -h "${s}" -a -f png -o "${icon_out}";
install -p -D -m 0644 "${icon_out}" -t "${FLATPAK_DEST}/share/icons/hicolor/${s}x${s}/apps/";
done;
# Update desktop file
# https://github.com/Aegisub/Aegisub/pull/146
# https://github.com/Aegisub/Aegisub/pull/146/commits/52c5d4a41240f6f7bef3ee57aad3af3a86828590
- |
desktop-file-edit --add-category='GTK' "${FLATPAK_DEST}/share/applications/aegisub.desktop";
desktop-file-edit --set-key='StartupWMClass' --set-value='aegisub' "${FLATPAK_DEST}/share/applications/aegisub.desktop";
for key in "Keywords"; do
awk -F'=' -v "key=${key}" '$1 == key { found = 1; exit(0); } END { if (!found) exit(1); }' "${FLATPAK_DEST}/share/applications/aegisub.desktop" && continue;
desktop-file-edit --set-key="${key}" --set-value='subtitles;subtitle;captions;captioning;video;audio;' "${FLATPAK_DEST}/share/applications/aegisub.desktop";
done;
# Update AppData file
# Change the OARS rating due to disabling the update checker
- xmlstarlet ed --inplace -d "/component/content_rating/content_attribute[@id='social-info']" "${FLATPAK_DEST}/share/appdata/aegisub.appdata.xml";
# Add info about revision
- |
git_version_str="$( jq -r '.BUILD_GIT_VERSION_STRING' "build/git_version.json" )";
git_version_date="$( jq -r '.BUILD_GIT_VERSION_DATE' "build/git_version.json" )";
git_version_strold="$( xmlstarlet sel -t -v '/component/releases/release[1]/@version' -n "${FLATPAK_DEST}/share/appdata/aegisub.appdata.xml" )";
if [[ "${git_version_str}" != "" && "${git_version_date}" != "" && "${git_version_str}" != "${git_version_strold}" ]]; then
xmlstarlet ed --inplace -i '/component/releases/release[1]' -t elem -n 'release' -s '/component/releases/release[1]' -t attr -n 'version' -v "${git_version_str}" -s '/component/releases/release[1]' -t attr -n 'date' -v "${git_version_date}" "${FLATPAK_DEST}/share/appdata/aegisub.appdata.xml";
fi;
- install -p -D -m 0644 "LICENCE" -t "${FLATPAK_DEST}/share/licenses/aegisub/";
modules:
- wxwidgets.yaml
- boost.yaml
# Required for subtitle rendering on non-Windows:
- libass.yaml
# Required to open audio and video:
- ffms2.yaml
- openal-soft.yaml
- luajit.yaml
- uchardet.yaml
- hunspell.yaml
- dictionaries.yaml
- fonts.yaml
- xmlstarlet.yaml