aboutsummaryrefslogtreecommitdiffstats
path: root/community/exiv2/APKBUILD
blob: 1b1b76e08cd6b68e6bc3361608f80485b4243144 (plain) (blame)
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
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=exiv2
pkgver=0.27.5
pkgrel=1
pkgdesc="Exif and Iptc metadata manipulation library and tools."
url="https://exiv2.org/"
arch="all"
options="!check"  # No test suite.
license="GPL-2.0-or-later"
depends_dev="expat-dev zlib-dev"
makedepends="$depends_dev cmake"
subpackages="$pkgname-dev $pkgname-doc"
source="https://github.com/Exiv2/exiv2/releases/download/v$pkgver/exiv2-$pkgver-Source.tar.gz"
builddir="$srcdir"/$pkgname-$pkgver-Source

# secfixes:
#   0.27.5-r0:
#     - CVE-2021-32815
#     - CVE-2021-34334
#     - CVE-2021-34335
#     - CVE-2021-37615
#     - CVE-2021-37616
#     - CVE-2021-37618
#     - CVE-2021-37619
#     - CVE-2021-37620
#     - CVE-2021-37621
#     - CVE-2021-37622
#     - CVE-2021-37623
#   0.27.4-r0:
#     - CVE-2021-29464
#   0.27.3-r2:
#     - CVE-2021-29463
#     - CVE-2021-29470
#     - CVE-2021-29473
#     - CVE-2021-29623
#     - CVE-2021-32617
#   0.27.3-r1:
#     - CVE-2021-3482
#     - CVE-2021-29457
#     - CVE-2021-29458
#     - CVE-2021-31291
#   0.27.2-r6:
#     - CVE-2019-20421
#   0.27.2-r2:
#     - CVE-2019-17402
#   0.27.2-r0:
#     - CVE-2019-13108
#     - CVE-2019-13109
#     - CVE-2019-13110
#     - CVE-2019-13111
#     - CVE-2019-13112
#     - CVE-2019-13113
#     - CVE-2019-13114

prepare() {
	default_prepare

	# -fcf-protection=full is only usable on x86_64 and x86 since those
	# are the arches where Intel's CET Control-Flow Enforcement Technology
	# is available
	case "$CARCH" in
		x86_64|x86) ;;
		*) sed -i 's| -fcf-protection||g' cmake/compilerFlags.cmake ;;
	esac
}

build() {
	cmake -B build . \
		-DCMAKE_BUILD_TYPE=None \
		-DCMAKE_INSTALL_PREFIX=/usr \
		-DCMAKE_INSTALL_LIBDIR=lib \
		-DEXIV2_BUILD_SAMPLES=OFF
	make -C build
}

check() {
	make -C build test
}

package() {
	make -C build DESTDIR="$pkgdir" install
}

sha512sums="
0f2d2dfbc976052a428dfeb597225d3ea3c725f584d05b99316bd4aa9cbf0ba5e1e37bcde71f9041975cf003b4fdb578c559adb144268d784bfd64494f451491  exiv2-0.27.5-Source.tar.gz
"