blob: b4884f1adefca91928c3ddc9f824d37267e848c9 (
plain)
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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
|
# Maintainer: taotieren <admin@taotieren.com>
pkgbase=xguipro-git
# pkgname=(xguipro-gtk{3,4}-git)
pkgname=(xguipro-git)
pkgver=0.9.0.r5.g342affe
pkgrel=26
pkgdesc="xGUI (the X Graphics User Interface) Pro is a modern, cross-platform, and advanced HVML renderer which is based on tailored WebKit."
arch=(x86_64
aarch64
riscv64
mips64
powerpc
powerpc64le)
url="https://github.com/HVML/xGUI-Pro"
license=('LGPL-3.0-only')
groups=(hvml-git
hybridos2-git)
provides=(${pkgbase%-git} 'xGUI-Pro' 'run-xguipro')
provides=(${pkgbase%-git} 'xGUI-Pro' 'run-xguipro')
conflicts=(${pkgbase%-git} 'xGUI-Pro' 'run-xguipro')
replaces=()
depends=(
# xguipro-gtk3
webkit2gtk
# xguipro-gtk4
# webkit2gtk-4.1
sh
at-spi2-core
cairo
gdk-pixbuf2
glib2
glibc
harfbuzz
openssl
pango
purc
zlib
)
makedepends=(
ccache
cmake
curl
enchant
glib2-devel
git
gperf
base-devel
ninja
icu
ruby
pkgconf
clang
llvm
# xguipro-gtk3
gtk3
libsoup
# xguipro-gtk4
# gtk4
# libsoup3
)
optdepends=('webkit2gtk-hvml: to support two HVML-specific attributes hvml-handle and hvml-events. This tailored WebKit engine provides support for two ports: GTK+ and HybridOS (MiniGUI). ')
backup=()
options=('!strip')
install=
source=("${pkgbase}::git+${url}.git")
sha256sums=('SKIP')
pkgver() {
cd "${srcdir}/${pkgbase}/"
git describe --long --tags | sed 's/ver.//g;s/\([^-]*-g\)/r\1/;s/-/./g'
}
prepare() {
git -C "${srcdir}/${pkgbase}" clean -dfx
install -Dm644 /dev/stdin ${srcdir}/xguipro.csh <<EOF
if (! \$?WEBKIT_WEBEXT_DIR ) then
set WEBKIT_WEBEXT_DIR=/usr/lib/xguipro/
if ( "\$WEBKIT_WEBEXT_DIR" != "" ) then
setenv WEBKIT_WEBEXT_DIR "\$WEBKIT_WEBEXT_DIR"
else
unset WEBKIT_WEBEXT_DIR
endif
endif
EOF
install -Dm644 /dev/stdin ${srcdir}/xguipro.sh <<EOF
if [ -z "\$WEBKIT_WEBEXT_DIR" ]; then
WEBKIT_WEBEXT_DIR=/usr/lib/xguipro/
[ -n "\$WEBKIT_WEBEXT_DIR" ] && export WEBKIT_WEBEXT_DIR || unset WEBKIT_WEBEXT_DIR
fi
EOF
install -Dm0755 /dev/stdin ${srcdir}/run-xguipro <<EOF
#!/usr/bin/env bash
set -e
purc_socket="/var/tmp/purcmc.sock"
if [ ! -f "$socket_file" ] && ! lsof "$socket_file"; then
xguipro
else
if [ -f "$socket_file" ] && lsof "$socket_file"; then
fuser -k "$socket_file"
rm -rf "$socket_file"
fi
xguipro
fi
EOF
}
package() {
# pkgdesc+=" (gtk3)"
# conflicts+=(${pkgname%-git})
# depends+=(
# webkit2gtk
# gtk3
# libsoup)
# options=('!strip')
export LDFLAGS="-L/lib64"
if test -n "$LD_LIBRARY_PATH"; then
export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/lib64"
else
export LD_LIBRARY_PATH=/lib64
fi
cd "${srcdir}/${pkgbase}"
# Ninja build
# see:https://wiki.archlinux.org/title/CMake_package_guidelines
# gcc build
# cmake -DCMAKE_BUILD_TYPE=Release \
# cmake -DCMAKE_BUILD_TYPE=None \
# -DPORT=GTK \
# -DENABLE_GAMEPAD=OFF \
# -DENABLE_INTROSPECTION=OFF \
# -DUSE_GTK4=OFF \
# -DUSE_SOUP2=ON \
# -DUSE_WPE_RENDERER=OFF \
# -DUSE_LCMS=OFF \
# -DCMAKE_INSTALL_PREFIX=/usr \
# -DCMAKE_INSTALL_LIBDIR=lib \
# -DCMAKE_INSTALL_LIBEXECDIR=lib \
# -B build-gtk3 \
# -G Ninja
# clang build
cmake -DCMAKE_BUILD_TYPE=None \
-DPORT=GTK \
-DENABLE_GAMEPAD=OFF \
-DENABLE_INTROSPECTION=OFF \
-DUSE_GTK4=OFF \
-DUSE_SOUP2=ON \
-DUSE_WPE_RENDERER=OFF \
-DUSE_LCMS=OFF \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_INSTALL_LIBEXECDIR=lib \
-DCMAKE_CXX_COMPILER=clang++ \
-DCMAKE_C_COMPILER=clang \
-Wno-deprecated-declarations \
-B build-gtk3 \
-G Ninja
# -Wno-dev \
ninja -C build-gtk3
# ninja install
DESTDIR="${pkgdir}" ninja -C "${srcdir}"/${pkgbase}/build-gtk3 install
install -Dm644 ${srcdir}/xguipro.csh ${pkgdir}/etc/profile.d/xguipro.csh
install -Dm644 ${srcdir}/xguipro.sh ${pkgdir}/etc/profile.d/xguipro.sh
install -Dm755 ${srcdir}/run-xguipro ${pkgdir}/usr/bin/run-xguipro
}
# package_xguipro-gtk4-git() {
# pkgdesc+=" (gtk4)"
# conflicts+=(${pkgname%-git})
# depends+=(
# # webkit2gtk-4.1
# gtk4
# libsoup3)
# options=('!strip')
#
# export LDFLAGS="-L/lib64"
# if test -n "$LD_LIBRARY_PATH"; then
# export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/lib64"
# else
# export LD_LIBRARY_PATH=/lib64
# fi
#
# cd "${srcdir}/${pkgbase}"
#
# # Ninja build
# # see:https://wiki.archlinux.org/title/CMake_package_guidelines
# # cmake -DCMAKE_BUILD_TYPE=Release \
# # gcc build
# # cmake -DCMAKE_BUILD_TYPE=None \
# # -DPORT=GTK \
# # -DENABLE_GAMEPAD=OFF \
# # -DENABLE_INTROSPECTION=OFF \
# # -DUSE_GTK4=ON \
# # -DUSE_SOUP2=OFF \
# # -DUSE_WPE_RENDERER=OFF \
# # -DUSE_LCMS=OFF \
# # -DCMAKE_INSTALL_PREFIX=/usr \
# # -DCMAKE_INSTALL_LIBDIR=lib \
# # -DCMAKE_INSTALL_LIBEXECDIR=lib \
# # -B build-gtk4 \
# # -G Ninja
# #
# # clang build
# cmake -DCMAKE_BUILD_TYPE=None \
# -DPORT=GTK \
# -DENABLE_GAMEPAD=OFF \
# -DENABLE_INTROSPECTION=OFF \
# -DUSE_GTK4=ON \
# -DUSE_SOUP2=OFF \
# -DUSE_WPE_RENDERER=OFF \
# -DUSE_LCMS=OFF \
# -DCMAKE_INSTALL_PREFIX=/usr \
# -DCMAKE_INSTALL_LIBDIR=lib \
# -DCMAKE_INSTALL_LIBEXECDIR=lib \
# -DCMAKE_CXX_COMPILER=clang++ \
# -DCMAKE_C_COMPILER=clang \
# -Wno-deprecated-declarations \
# -B build-gtk4 \
# -G Ninja
# # -Wno-dev \
#
# ninja -C build-gtk4
#
# # ninja install
# DESTDIR="${pkgdir}" ninja -C "${srcdir}"/${pkgbase}/build-gtk4 install
#
# install -Dm644 ${srcdir}/xguipro.csh ${pkgdir}/etc/profile.d/xguipro.csh
# install -Dm644 ${srcdir}/xguipro.sh ${pkgdir}/etc/profile.d/xguipro.sh
# install -Dm755 ${srcdir}/run-xguipro ${pkgdir}/usr/bin/run-xguipro
# }
|