blob: 2ebc850b1c7a209aede25ccde983c54b0263033b (
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
|
# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=gthumb
pkgver=3.12.2
pkgrel=0
pkgdesc="Image viewer and browser from GNOME"
url="https://gitlab.gnome.org/GNOME/gthumb"
arch="all !riscv64 !s390x" # blocked by colord, librsvg
license="GPL-2.0-or-later"
depends="hicolor-icon-theme"
makedepends="
bison
clutter-gtk-dev
colord-dev
exiv2-dev
flex
gsettings-desktop-schemas-dev
gst-plugins-base-dev
gstreamer-dev
gtk+3.0-dev
itstool
jpeg-dev
json-glib-dev
lcms2-dev
libchamplain-dev
libheif-dev
libjxl-dev
libpng-dev
libraw-dev
librsvg-dev
libsecret-dev
libsoup-dev
meson
webkit2gtk-dev
"
sonameprefix="$pkgname:"
# Ignore libcairo_io.so in automatically traced dependencies to avoid conflict
# between gthumb and gthumb-extra-formats (both provides this extension library).
somask="libcairo_io.so"
subpackages="
$pkgname-dev
$pkgname-doc
$pkgname-lang
$pkgname-extra-formats:extra_formats
$pkgname-full
"
source="https://gitlab.gnome.org/GNOME/gthumb/-/archive/$pkgver/gthumb-$pkgver.tar.gz"
# List of extensions splitted into subpackages.
_extensions="
23hq:_23hq
flickr
gstreamer
map-view:map_view
oauth
raw-files:raw_files
webalbums
"
_depends_full="
$pkgname=$pkgver-r$pkgrel
$pkgname-extra-formats
"
for _i in $_extensions; do
subpackages="$subpackages $pkgname-$_i"
_depends_full="$_depends_full $pkgname-${_i%:*}"
done
_extsdir='usr/lib/gthumb/extensions'
build() {
msg 'Building full variant'
_build output true
msg 'Building smaller variant'
_build output-small false
}
_build() {
local outdir=$1
local toggle=$2
abuild-meson \
-Dwarn-deprecated=false \
-Dexiv2=true \
-Dclutter=false \
-Dgstreamer=$toggle \
-Dlibchamplain=true \
-Dlcms2=true \
-Dcolord=true \
-Dlibtiff=false \
-Dlibwebp=false \
-Dlibjxl=$toggle \
-Dlibheif=$toggle \
-Dlibraw=true \
-Dlibrsvg=$toggle \
-Dlibsecret=true \
-Dwebservices=true \
-Dlibbrasero=false \
. "$outdir"
meson compile ${JOBS:+-j ${JOBS}} -C "$outdir"
}
check() {
meson test --no-rebuild -v -C output
}
package() {
DESTDIR="$pkgdir" meson install --no-rebuild -C output
_rename "$pkgdir"/usr/bin/gthumb gthumb.gst
_rename "$pkgdir"/usr/lib/gthumb/extensions/libslideshow.so libslideshow.so.gst
_rename "$pkgdir"/usr/lib/gthumb/extensions/libcairo_io.so libcairo_io.so.extra
DESTDIR="$pkgdir" meson install --no-rebuild -C output-small
cd "$pkgdir"
# Keep only "C" (English) variant of help.
mv usr/share/help/C .
rm -rf usr/share/help/*
mv C usr/share/help/
}
_23hq() {
pkgdesc="gThumb extension for uploading images to 23hq.com"
depends="$pkgname=$pkgver-r$pkgrel"
amove $_extsdir/23hq.extension
amove $_extsdir/lib23hq.so
}
extra_formats() {
pkgdesc="gThumb support for AVIF, HEIF, JPEG XL, and SVG image formats"
depends="$pkgname=$pkgver-r$pkgrel"
replaces="$pkgname" # libcairo_io.so
amove $_extsdir/libcairo_io.so.extra
_rename "$subpkgdir"/$_extsdir/libcairo_io.so.extra libcairo_io.so
}
flickr() {
pkgdesc="gThumb extension for uploading images to Flickr"
depends="$pkgname=$pkgver-r$pkgrel"
amove $_extsdir/flicker*.extension
amove $_extsdir/libflicker*.so
}
gstreamer() {
pkgdesc="gThumb extension for playing audio and video files"
depends="$pkgname=$pkgver-r$pkgrel"
replaces="$pkgname" # gthumb and libslideshow.so
amove $_extsdir/gstreamer_*.extension
amove $_extsdir/libgstreamer_*.so
amove usr/bin/gthumb.gst
_rename "$subpkgdir"/usr/bin/gthumb.gst gthumb
amove $_extsdir/libslideshow.so.gst
_rename "$subpkgdir"/$_extsdir/libslideshow.so.gst libslideshow.so
}
map_view() {
pkgdesc="gThumb extension for viewing the photo position on the map"
depends="$pkgname=$pkgver-r$pkgrel"
amove $_extsdir/map_view.extension
amove $_extsdir/libmap_view.so
}
oauth() {
pkgdesc="OAuth support for gThumb"
depends="$pkgname=$pkgver-r$pkgrel"
amove $_extsdir/oauth.extension
amove $_extsdir/liboauth.so
}
raw_files() {
pkgdesc="gThumb extension for RAW format support"
depends="$pkgname=$pkgver-r$pkgrel"
amove $_extsdir/raw_files.extension
amove $_extsdir/libraw_files.so
}
webalbums() {
pkgdesc="gThumb extension for creating static webalbums"
depends="$pkgname=$pkgver-r$pkgrel"
amove $_extsdir/webalbums.extension
amove $_extsdir/libwebalbums.so
amove usr/share/gthumb/albumthemes
}
full() {
pkgdesc="$pkgdesc (with all built-in extensions)"
depends="$_depends_full"
mkdir -p "$subpkgdir"
}
_rename() {
mv "$1" "${1%/*}/$2"
}
sha512sums="
3066c5dd5fdd10fa5f869195adfd9fd3b5ee26cb7902cb87d324a90af535108558a223989ed736a941b8f6ce56e29c27a675da10fa1fb4f76919ced6a3c78b61 gthumb-3.12.2.tar.gz
"
|