upgpkg: wordpress 6.2.1-1
[ArchLinux/community.git] / libopenshot / repos / community-x86_64 / PKGBUILD
blob84390b919ee8a2b35adc6eca10e31f3c35e70dad
1 # Maintainer: David Runge <dvzrv@archlinux.org>
2 # Contributor: Martin Wimpress <code@flexion.org>
3 # Contributor: Foster McLane <fkmclane@gmail.com>
4 # Contributor: Jonathan Thomas <jonathan@openshot.org>
6 pkgname=libopenshot
7 pkgver=0.3.2
8 pkgrel=1
9 pkgdesc="A video editing, animation, and playback library for C++, Python, and Ruby"
10 arch=(x86_64)
11 url="https://github.com/openshot/libopenshot"
12 license=(LGPL3)
13 # TODO: package cppzmq and resvg
14 depends=(
15   babl
16   gcc-libs
17   glibc
18   libmagick
19   opencv
20   python
21   qt5-base
22   qt5-multimedia
23   qt5-svg
25 makedepends=(
26   catch2
27   cmake
28   doxygen
29   ffmpeg
30   jsoncpp
31   libopenshot-audio
32   protobuf
33   swig
34   unittestpp
35   xorg-server-xvfb
36   zeromq
38 provides=(libopenshot.so)
39 source=($url/archive/v$pkgver/$pkgname-$pkgver.tar.gz)
40 sha512sums=('8891077af28a4db6bc3a7cd078ce5570a8f62e0795c13b0fff795eba60c3e977ece70247033ee4017c9785592355b7421655246a5d6807a5790bd18927739795')
41 b2sums=('5bc371481ddf69b5de909963cb83d1128066280e1259ae8b23f7ef5450f3da00ef1137dcefe2978e10d1a51931529f104aebdf0601be4b066c7ed371ea43439e')
43 build() {
44   local python_version=$(python -c 'import sys; print(".".join(map(str, sys.version_info[:2])))')
45   local cmake_options=(
46     -B build
47     -D CMAKE_BUILD_TYPE=None
48     -D CMAKE_INSTALL_PREFIX=/usr
49     -D ENABLE_RUBY=OFF
50     -D MAGICKCORE_HDRI_ENABLE=1
51     -D MAGICKCORE_QUANTUM_DEPTH=16
52     -D PYTHON_INCLUDE_DIRS=/usr/include/python$python_version
53     -D PYTHON_LIBRARIES=/usr/lib/libpython3.so
54     -D USE_SYSTEM_JSONCPP=ON
55     -S $pkgname-$pkgver
56     -W no-dev
57   )
59   cmake "${cmake_options[@]}"
60   cmake --build build
63 check() {
64   # disable broken test: https://github.com/OpenShot/libopenshot/issues/922
65   xvfb-run ctest --test-dir build --output-on-failure -E '(Caption:caption effect)'
69 package() {
70   depends+=(
71     ffmpeg libavcodec.so libavformat.so libavutil.so libswscale.so libswresample.so
72     jsoncpp libjsoncpp.so
73     libopenshot-audio libopenshot-audio.so
74     protobuf libprotobuf.so
75     zeromq libzmq.so
76   )
78   DESTDIR="$pkgdir" cmake --install build
79   install -vDm 644 $pkgname-$pkgver/{AUTHORS,README.md} -t "$pkgdir/usr/share/doc/$pkgname/"