# Maintainer: Natanael Copa pkgname=exiv2 pkgver=0.28.0 pkgrel=2 pkgdesc="Exif and Iptc metadata manipulation library and tools." url="https://exiv2.org/" arch="all" license="GPL-2.0-or-later" depends_dev="expat-dev zlib-dev" makedepends="$depends_dev cmake samurai" checkdepends="gtest-dev" subpackages="$pkgname-dev $pkgname-doc" source="https://github.com/Exiv2/exiv2/archive/refs/tags/v$pkgver/exiv2-v$pkgver.tar.gz $pkgname-reg-1.patch::https://github.com/Exiv2/exiv2/commit/16c1cd7d.diff $pkgname-reg-2.patch::https://github.com/Exiv2/exiv2/commit/b4f435a4.diff $pkgname-reg-3.patch::https://github.com/Exiv2/exiv2/commit/f47e7bd6.diff $pkgname-reg-4.patch::https://github.com/Exiv2/exiv2/commit/3664f5b8.diff " # 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 # musl doesn't support it at all though, so there is no point to add it sed -i 's| -fcf-protection||g' cmake/compilerFlags.cmake } build() { CFLAGS="$CFLAGS -flto=auto" \ CXXFLAGS="$CXXFLAGS -flto=auto" \ cmake -B build -G Ninja \ -DCMAKE_BUILD_TYPE=None \ -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_INSTALL_LIBDIR=lib \ -DEXIV2_BUILD_SAMPLES=OFF \ -DEXIV2_ENABLE_BMFF=ON \ -DEXIV2_ENABLE_BROTLI=OFF \ -DEXIV2_ENABLE_INIH=OFF \ -DEXIV2_BUILD_UNIT_TESTS="$(want_check && echo ON || echo OFF)" ninja -C build } check() { ninja -C build test } package() { DESTDIR="$pkgdir" ninja -C build install } sha512sums=" 35e483c6123f099167ed8647fae7c6e5512434c24d0afe684180ba6a5114068d5678280a01c8e6cfee0d1e555e1dc2a1606989d46950ce3ef1a3859caeed4dad exiv2-v0.28.0.tar.gz e305a663391eeac4eaa1aad89d2a25d9008f1a71b3e236a2452c54c7e9ad2086235183bec48973979d69b8d27af6e23a616f001cdf4248f185f77cd6f433df51 exiv2-reg-1.patch 58cd6628f4ea769c5cb2810e95e4f3d8c549207a541ad3765724464347f49d3837160ecacd2ec57bb7184719881d1b8fc5d343810de2146b0afa62bb2ab79f7d exiv2-reg-2.patch 532f49d1062be844a1c87e686d952f062e4a66758227e153cf4f01b045211164269e2dbe742f94266fdb72bae5c38370fdfa05009e9271f2b2e4c39eae788899 exiv2-reg-3.patch 115f2b2983d9fb9b20ceacc9f05dcf4154058e638178f527565dc97be58dfcd64eff0797cbf6163c6e6ba31128cf1d5e3bbfa4eae76e8c469b63b9557c556ef2 exiv2-reg-4.patch "