aboutsummaryrefslogtreecommitdiffstats
path: root/community/gst-plugins-good/APKBUILD
blob: c267748085faa420e7be204a6253bd0988e37869 (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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=gst-plugins-good
pkgver=1.22.3
pkgrel=1
pkgdesc="GStreamer streaming media framework good plug-ins"
url="https://gstreamer.freedesktop.org"
arch="all"
license="GPL-2.0-or-later LGPL-2.0-or-later"
subpackages="$pkgname-lang $pkgname-gtk $pkgname-qt"
replaces="gst-plugins-good1 gst-plugins-ugly"
makedepends="
	cairo-dev
	flac-dev
	gdk-pixbuf-dev
	glib-dev
	gst-plugins-base-dev
	gstreamer-dev
	gtk+3.0-dev
	jack-dev
	lame-dev
	libavc1394-dev
	libdv-dev
	libgudev-dev
	libice-dev
	libiec61883-dev
	libjpeg-turbo-dev
	libogg-dev
	libpng-dev
	libshout-dev
	libsm-dev
	libsoup3-dev
	libvpx-dev
	libxdamage-dev
	libxext-dev
	libxv-dev
	linux-headers
	meson
	mpg123-dev
	nasm
	orc-compiler
	orc-dev
	pulseaudio-dev
	qt5-qtdeclarative-dev
	qt6-qtwayland-dev
	qt5-qtx11extras-dev
	qt6-qtdeclarative-dev
	qt6-qttools-dev
	qt6-qtwayland-dev
	taglib-dev
	v4l-utils-dev
	wavpack-dev
	zlib-dev
	"
ldpath="/usr/lib/gstreamer-1.0"
source="https://gstreamer.freedesktop.org/src/gst-plugins-good/gst-plugins-good-$pkgver.tar.xz
	flaky-test.patch
	"

case "$CARCH" in
armhf|s390x|ppc64le)
	# really flaky tests
	options="$options !check"
	;;
*)
	;;
esac

# secfixes:
#   1.18.4-r0:
#     - CVE-2021-3497
#     - CVE-2021-3498
#   1.10.4-r0:
#     - CVE-2017-5840
#     - CVE-2017-5841
#     - CVE-2017-5845
#     - CVE-2016-9634
#     - CVE-2016-9635
#     - CVE-2016-9636
#     - CVE-2016-9808
#     - CVE-2016-10198
#     - CVE-2016-10199

build() {
	CFLAGS="$CFLAGS -O2" \
	CXXFLAGS="$CXXFLAGS -O2" \
	CPPFLAGS="$CPPFLAGS -O2" \
	abuild-meson \
		-Db_lto=true \
		-Dpackage-origin="https://alpinelinux.org" \
		-Dpackage-name="GStreamer good plug-ins (Alpine Linux)" \
		-Dtests="$(want_check && echo enabled || echo disabled)" \
		. output
	meson compile -C output
}

check() {
	meson test -t 2 --print-errorlogs --no-rebuild -C output
}

package() {
	export GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

_mv() {
	mkdir -p "$subpkgdir"/"$ldpath"
	mv "$1" "$subpkgdir"/"$ldpath"
}

qt() {
	pkgdesc="Gstreamer Qt plug-in"
	find "$pkgdir" -type f | while read -r i; do
		if ldd $i 2>/dev/null | grep -q "libQt"; then
			_mv "$i"
		fi
	done
}

gtk() {
	pkgdesc="Gstreamer gtk-3 plug-in"
	find "$pkgdir" -type f | while read -r i; do
		if ldd $i 2>/dev/null | grep -q "libgtk-3"; then
			_mv "$i"
		fi
	done
}

sha512sums="
915352911f0ee2b1b15ff83514c6ca7e1ca8c2f122eac0c4c47539e8dcc2233a6f8478e083555af8b254d9a541923aa74e106a404b56fb8a732ea53421c3d6ca  gst-plugins-good-1.22.3.tar.xz
b97e660011bc3e212dd436f883724b945112538d06bab97b3c9c5699d884dff2e0bcd8d547df6f179b32d138fa2191fd41827aa30312c39176f0beb93bea7b1b  flaky-test.patch
"