-
Notifications
You must be signed in to change notification settings - Fork 1
/
io.github.cudatext.CudaText-Qt.yml
185 lines (181 loc) · 8.91 KB
/
io.github.cudatext.CudaText-Qt.yml
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
app-id: io.github.cudatext.CudaText-Qt
runtime: org.kde.Platform
runtime-version: '6.8'
sdk: org.kde.Sdk
build-options:
append-path: /app/lib/sdk/freepascal/bin
env:
PPC_CONFIG_PATH: /app/lib/sdk/freepascal/etc
FPCDIR: /app/lib/sdk/freepascal/fpcsrc
FPC_DIR: /app/lib/sdk/freepascal/fpcsrc
LAZARUSDIR: /app/lib/sdk/freepascal/share/lazarus
cleanup-commands:
- rm -rf /app/lib/sdk/freepascal
command: cudatext
finish-args:
- --socket=wayland
- --socket=fallback-x11
- --filesystem=home
- --device=dri
- --share=ipc
- --share=network
modules:
- name: fpc
sources:
- type: archive
only-arches:
- x86_64
url: https://downloads.sourceforge.net/project/freepascal/Linux/3.2.2/fpc-3.2.2.x86_64-linux.tar
sha256: 5adac308a5534b6a76446d8311fc340747cbb7edeaacfe6b651493ff3fe31e83
- type: archive
only-arches:
- aarch64
url: https://downloads.sourceforge.net/project/freepascal/Linux/3.2.2/fpc-3.2.2.aarch64-linux.tar
sha256: b39470f9b6b5b82f50fc8680a5da37d2834f2129c65c24c5628a80894d565451
- type: archive
url: https://downloads.sourceforge.net/project/freepascal/Source/3.2.2/fpcbuild-3.2.2.tar.gz
sha256: 85ef993043bb83f999e2212f1bca766eb71f6f973d362e2290475dbaaf50161f
- type: patch
options: ['-d', 'fpcsrc']
path: fpc-3.2.0--glibc-2.34.patch
buildsystem: simple
build-options:
env:
- fpcver=3.2.2
- PREFIX=/app/lib/sdk/freepascal
arch:
aarch64:
env: [PPNAME=ppca64]
x86_64:
env: [PPNAME=ppcx64]
build-commands:
# install src
- mkdir -p ${PREFIX} && cp -r fpcsrc ${PREFIX}/
# tar x fpcpre
- mkdir fpcpre
- tar -xf binary.*.tar && tar -C fpcpre -xf base.*.tar.gz
- rm *.tar.gz *.tar
# compile self
- make -C fpcsrc compiler_cycle PP=`pwd`/fpcpre/lib/fpc/${fpcver}/${PPNAME}
# compile rtl with new pp
- make -C fpcsrc rtl_clean rtl_smart PP=`pwd`/fpcsrc/compiler/${PPNAME}
# compile others with new pp,rtl
- make -C fpcsrc packages_smart utils_all PP=`pwd`/fpcsrc/compiler/${PPNAME}
# install
- make -C fpcsrc compiler_distinstall rtl_distinstall packages_distinstall utils_distinstall
INSTALL_PREFIX=${PREFIX}
PP=`pwd`/fpcsrc/compiler/${PPNAME}
FPCMAKE=`pwd`/fpcsrc/utils/fpcm/bin/${FLATPAK_ARCH}-linux/fpcmake
# make cfg, add lib path, and link ppc
- ${PREFIX}/lib/fpc/${fpcver}/samplecfg ${PREFIX}/lib/fpc/${fpcver} ${PREFIX}/etc
- echo '-Fl/app/lib' >> ${PREFIX}/etc/fpc.cfg
- ln -s ../lib/fpc/${fpcver}/${PPNAME} ${PREFIX}/bin/${PPNAME}
# fix not found ppcaarch64
- ln -s ppca64 ${PREFIX}/bin/ppcaarch64
- name: lazarus
sources:
- type: archive
url: https://gitlab.com/freepascal.org/lazarus/lazarus/-/archive/lazarus_3_6/lazarus-lazarus_3_6.tar.gz
sha256: 535c01c9f6dc00867753b2a4d4e08b12fc8939ed314b5179c8bcb19f7d836f35
buildsystem: simple
build-options:
append-path: /app/lib/sdk/freepascal/bin
env:
- INSTALL_PREFIX=/app/lib/sdk/freepascal
build-commands:
- find . -type f -iname makefile.fpc -exec fpcmake -Tall '{}' ';'
- make lazbuild OPT='-gl'
- touch lazarus startlazarus
- make install
- sed -i -e "s#__LAZARUSDIR__#$LAZARUSDIR/#" -e "s#__FPCSRCDIR__#$FPCDIR/#" -e "s#/app/bin/fpc#$INSTALL_PREFIX/bin/fpc#"
tools/install/linux/environmentoptions.xml
- install -Dm644 -t $LAZARUSDIR tools/install/linux/environmentoptions.xml
- name: qt6pas
sources:
- type: shell
commands:
- cp -r ${LAZARUSDIR}/lcl/interfaces/qt6/cbindings/. .
- sed -e"s/target.path = .\+/target.path = '\/app\/lib'/" -i ./Qt6Pas.pro
buildsystem: qmake
- name: cudatext
sources:
- type: archive
url: https://github.com/bgrabitmap/bgrabitmap/archive/refs/tags/v11.6.3.tar.gz
sha256: b3e39190bd6807ad51693be168ddbf48ae0457055bdc248c6deada946a018a7d
dest: src/bgrabitmap
- type: archive
url: https://github.com/Alexey-T/EncConv/archive/refs/tags/2024.12.15.tar.gz
sha256: c7c3b1907b2343ea87104be416135e908c894f645a0e36f55f3bd044442c50d0
dest: src/EncConv
- type: archive
url: https://github.com/Alexey-T/ATBinHex-Lazarus/archive/refs/tags/2024.09.01.tar.gz
sha256: 7ad5995429072a56d9f9617e4f623c4bd61826a29342b80612bfb32e0157acaf
dest: src/ATBinHex-Lazarus
- type: archive
url: https://github.com/Alexey-T/ATFlatControls/archive/refs/tags/2024.12.20.1.tar.gz
sha256: 0c484fc44ff8d8ac7de8d34e5a3712e725a455ef310dc45a6628538e4f4df43e
dest: src/ATFlatControls
- type: archive
url: https://github.com/Alexey-T/ATSynEdit/archive/refs/tags/2024.12.20.1.tar.gz
sha256: 9f513147a043c959cfb59910e4522d15dad2553f6f320e15bf7b9954962c5ceb
dest: src/ATSynEdit
- type: archive
url: https://github.com/Alexey-T/ATSynEdit_Cmp/archive/refs/tags/2024.07.28.tar.gz
sha256: 57c1289cb897d6f23ac74d8fd5354c98cd2c64ad327a34feec9ab85058dfe127
dest: src/ATSynEdit_Cmp
- type: archive
url: https://github.com/Alexey-T/EControl/archive/refs/tags/2024.12.17.1.tar.gz
sha256: dbebd2edc34e1814e299969e4c56e6de7fedfd1a33fafe2323fc78b2880faaa7
dest: src/EControl
- type: archive
url: https://github.com/Alexey-T/ATSynEdit_Ex/archive/refs/tags/2024.10.26.tar.gz
sha256: 8ec75c8458c3508b4710e395fd7ed2f92fde9e37e5ec59322d576c921dd627e5
dest: src/ATSynEdit_Ex
- type: archive
url: https://github.com/Alexey-T/Python-for-Lazarus/archive/refs/tags/2024.10.15.tar.gz
sha256: 82364066b53a125cbd0183dce96a9d2f27288a04222b696b630a1e0bb3c92580
dest: src/Python-for-Lazarus
- type: archive
url: https://github.com/Alexey-T/Emmet-Pascal/archive/refs/tags/2023.12.02.tar.gz
sha256: 9f8967e651253fc7027e8bef4115a45e9fb3b1c85536d1bd390da9c4d8a2efe0
dest: src/Emmet-Pascal
- type: archive
url: https://github.com/Alexey-T/CudaText/archive/refs/tags/1.220.0.3.tar.gz
sha256: 54509be7cae9e738d5c45c7582cfd2002da133ccf4120406f0ebf5a4ab5b1506
dest: src/CudaText
- type: file
path: io.github.cudatext.CudaText-Qt.appdata.xml
buildsystem: simple
build-options:
arch:
x86_64:
env:
PPC: ppcx64
aarch64:
env:
PPC: ppca64
build-commands:
- lazbuild --ws=qt6 -q --compiler=$PPC --pcp=. --lazarusdir="$LAZARUSDIR" "./src/bgrabitmap/bgrabitmap/bgrabitmappack.lpk"
- lazbuild --ws=qt6 -q --pcp=. --lazarusdir="$LAZARUSDIR" "./src/EncConv/encconv/encconv_package.lpk"
- lazbuild --ws=qt6 -q --pcp=. --lazarusdir="$LAZARUSDIR" "./src/ATBinHex-Lazarus/atbinhex/atbinhex_package.lpk"
- lazbuild --ws=qt6 -q --pcp=. --lazarusdir="$LAZARUSDIR" "./src/ATFlatControls/atflatcontrols/atflatcontrols_package.lpk"
- lazbuild --ws=qt6 -q --pcp=. --lazarusdir="$LAZARUSDIR" "./src/ATSynEdit/atsynedit/atsynedit_package.lpk"
- lazbuild --ws=qt6 -q --pcp=. --lazarusdir="$LAZARUSDIR" "./src/ATSynEdit_Cmp/atsynedit_cmp/atsynedit_cmp_package.lpk"
- lazbuild --ws=qt6 -q --pcp=. --lazarusdir="$LAZARUSDIR" "./src/EControl/econtrol/econtrol_package.lpk"
- lazbuild --ws=qt6 -q --pcp=. --lazarusdir="$LAZARUSDIR" "./src/ATSynEdit_Ex/atsynedit_ex/atsynedit_ex_package.lpk"
- lazbuild --ws=qt6 -q --pcp=. --lazarusdir="$LAZARUSDIR" "./src/Python-for-Lazarus/python4lazarus/python4lazarus_package.lpk"
- lazbuild --ws=qt6 -q --pcp=. --lazarusdir="$LAZARUSDIR" "./src/Emmet-Pascal/emmet/emmet_package.lpk"
# Replace references to /usr/share/cudatext with correct path, prior to compiling CudaText
- sed -i -e"s/\/usr\/share\/cudatext/\\$FLATPAK_DEST\/share\/cudatext/g" src/CudaText/app/proc_globdata.pas
- lazbuild --ws=qt6 -q --pcp=. --lazarusdir="$LAZARUSDIR" "./src/CudaText/app/cudatext.lpi"
- install -Dm755 src/CudaText/app/cudatext -t $FLATPAK_DEST/bin
# Install all data and plugins
- mkdir -p $FLATPAK_DEST/share/cudatext
- cp -r src/CudaText/app/data $FLATPAK_DEST/share/cudatext/
- cp -r src/CudaText/app/py $FLATPAK_DEST/share/cudatext/
- cp -r src/CudaText/app/settings_default $FLATPAK_DEST/share/cudatext/
# Desktop file and icon - desktop file needs to have the icon name corrected first
- desktop-file-edit --set-key=Icon --set-value="io.github.cudatext.CudaText-Qt" src/CudaText/setup/debfiles/cudatext.desktop
- install -D src/CudaText/setup/debfiles/cudatext.desktop $FLATPAK_DEST/share/applications/io.github.cudatext.CudaText-Qt.desktop
- install -D src/CudaText/setup/debfiles/cudatext-512.png $FLATPAK_DEST/share/icons/hicolor/512x512/apps/io.github.cudatext.CudaText-Qt.png
- install -D io.github.cudatext.CudaText-Qt.appdata.xml $FLATPAK_DEST/share/metainfo/io.github.cudatext.CudaText-Qt.metainfo.xml