-
Notifications
You must be signed in to change notification settings - Fork 15
/
org.texstudio.TeXstudio.yaml
158 lines (152 loc) · 5.72 KB
/
org.texstudio.TeXstudio.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
app-id: org.texstudio.TeXstudio
runtime: org.kde.Platform
runtime-version: '6.7'
sdk: org.kde.Sdk
sdk-extensions:
- org.freedesktop.Sdk.Extension.openjdk
add-extensions:
org.freedesktop.Sdk.Extension.texlive:
directory: texlive
subdirectories: true
autodelete: true
version: '23.08'
no-autodownload: true
org.texstudio.TeXstudio.Extension.ngrams:
directory: ngrams
subdirectories: true
autodelete: true
no-autodownload: true
command: texstudio.sh
rename-icon: texstudio
rename-appdata-file: texstudio.metainfo.xml
rename-desktop-file: texstudio.desktop
finish-args:
- --socket=wayland
- --socket=fallback-x11
- --share=ipc
- --share=network # required for template repository. Does not interfere with LanguageTool, which is now accessible on the host as well
- --device=dri
# filesystem access: required e.g. for \include, \input or \includegraphics
- --filesystem=host
- --filesystem=/tmp # this way lualatex etc. can access files newly ceated by TeXstudio stored in the hosts's /tmp
- --talk-name=org.freedesktop.Flatpak # required for flatpak-spawn --host
- --talk-name=com.canonical.AppMenu.Registrar # required for global menu
- --env=PATH=/usr/bin:/app/bin:/app/texlive/bin:/app/texlive/bin/x86_64-linux:/app/texlive/bin/aarch64-linux:/app/jre/bin # add paths of TeXlive Flatpak extension binaries
- --env=LD_LIBRARY_PATH=/app/texlive/lib/ # add library paths
cleanup:
- /include
- /lib/pkgconfig
- /share/man
modules:
- name: extension-points
buildsystem: simple
build-commands:
- mkdir /app/texlive
- mkdir ${FLATPAK_DEST}/ngrams # intended for https://github.com/flathub/flathub/pull/4446
- name: poppler # build dependency of TeXstudio
buildsystem: cmake-ninja
config-opts: # for command line switches, cf. CMakeLists.txt
- -DCMAKE_BUILD_TYPE=RelWithDebInfo
- -DBUILD_GTK_TESTS=OFF
- -DBUILD_QT5_TESTS=OFF
- -DBUILD_QT6_TESTS=OFF
- -DBUILD_CPP_TESTS=OFF
- -DBUILD_MANUAL_TESTS=OFF
- -DENABLE_GLIB=OFF
- -DENABLE_QT5=OFF
- -DENABLE_LIBCURL=OFF
- -DENABLE_BOOST=OFF
sources:
- type: archive
url: https://poppler.freedesktop.org/poppler-24.08.0.tar.xz
sha256: 97453fbddf0c9a9eafa0ea45ac710d3d49bcf23a62e864585385d3c0b4403174
x-checker-data:
type: anitya
project-id: 3686
url-template: https://poppler.freedesktop.org/poppler-$version.tar.xz
- name: poppler-data # required to properly display CJK chars in PDF viewer
buildsystem: cmake-ninja
builddir: true
config-opts:
- -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo
sources:
- type: archive
url: https://poppler.freedesktop.org/poppler-data-0.4.12.tar.gz
sha256: c835b640a40ce357e1b83666aabd95edffa24ddddd49b8daff63adb851cdab74
x-checker-data:
type: anitya
project-id: 3687
url-template: https://poppler.freedesktop.org/poppler-data-$version.tar.gz
post-install:
- install -p -D -m 0644 ../COPYING* -t "${FLATPAK_DEST}/share/licenses/poppler-data/";
- name: openjdk
buildsystem: simple
build-commands:
- /usr/lib/sdk/openjdk/install.sh
- name: languagetool
buildsystem: simple
build-commands:
- mkdir /app/languagetool
- cp -r * /app/languagetool
sources:
- url: https://languagetool.org/download/LanguageTool-6.4.zip
type: archive
sha256: d5d517335d1ca33f33412920447fa0c742ef78d645521d650e0e22628fe0d3bd
x-checker-data:
type: anitya
project-id: 241970
url-template: https://languagetool.org/download/LanguageTool-$version.zip
- name: pandoc
buildsystem: simple
build-commands:
- install -D bin/pandoc /app/bin/pandoc
# pandoc is only needed for converting the changelog
cleanup:
- '*'
sources:
- type: archive
only-arches:
- x86_64
url: https://github.com/jgm/pandoc/releases/download/2.13/pandoc-2.13-linux-amd64.tar.gz
sha256: 7404aa88a6eb9fbb99d9803b80170a3a546f51959230cc529c66a2ce6b950d4c
- type: archive
only-arches:
- aarch64
url: https://github.com/jgm/pandoc/releases/download/2.13/pandoc-2.13-linux-arm64.tar.gz
sha256: 4f87bfe8a0a626ad0e17d26d42e99a1c0ed7d369cca00366c1b3d97525f57db5
- name: texstudio
buildsystem: cmake-ninja
config-opts:
- -Wno-dev
cleanup-platform:
- /bin
- /mkspecs
sources:
- type: git
url: https://github.com/texstudio-org/texstudio
tag: 4.8.1
commit: e21bf65c70c0e14548898ff0ad58b6921cec44a9
x-checker-data:
type: anitya
project-id: 6239
stable-only: true
tag-template: $version
- type: patch
path: 0001-Ensure-the-initial-commands-are-properly-set-when-we.patch
- type: file
path: changelog2metainfo.sh
- type: file
path: texstudio.sh
- type: shell
commands:
- sed -e "s|setDesktopFileName(\"texstudio\")|setDesktopFileName(\"org.texstudio.TeXstudio\")|"
-i src/main.cpp
- desktop-file-edit --set-key=Exec --set-value="texstudio.sh %F" utilities/texstudio.desktop
- chmod +x ./changelog2metainfo.sh && ./changelog2metainfo.sh
- sed -zi "s|</description>[[:space:]]*<launchable|<p>Requires either TeX
Live being installed on the system from your distribution's repositories
or the TeX Live Flatpak which you can install by running 'flatpak install
flathub org\.freedesktop\.Sdk\.Extension\.texlive//23\.08'</p></description><launchable|"
utilities/texstudio.metainfo.xml
build-commands:
- install -Dm755 -t ${FLATPAK_DEST}/bin/ ./texstudio.sh