-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathpbp-install-libva-v4l2-request
executable file
·66 lines (53 loc) · 1.69 KB
/
pbp-install-libva-v4l2-request
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
#!/bin/sh
### Package: pbp-install-libva-v4l2-request
### Version: v20200630.2300
### Author: Michael Gan "xmixahlx" [email protected]
### License: GPLv3
### Script Dependencies: linux, ffmpeg, libva
## PBPTOOLSDIR
if [ -z $PBPTOOLSDIR ]; then
PBPTOOLSDIR="`pwd`"
fi
## VARS
DATE=`date +%Y%m%d%H%M%S`
RESDIR=$PBPTOOLSDIR/resources
DEVDIR=$PBPTOOLSDIR/upstream
GITREPO=https://github.com/bootlin
GITTREE=libva-v4l2-request
GITBRANCH=master
PKGDIR=$GITTREE\_$GITBRANCH
## DEPS
# Provide INSTALLDEPS=debian to install dependencies.
if [ $INSTALLDEPS ]; then
if [ $INSTALLDEPS = debian ]; then
sudo apt-get -y install build-essential coreutils libc-bin wget git patch meson
fi
fi
## PREP
set -e
mkdir -p $DEVDIR
cd $DEVDIR
## PATCHES
[ -f libva-v4l2-request_28.patch ] || wget https://patch-diff.githubusercontent.com/raw/bootlin/libva-v4l2-request/pull/28.patch -O libva-v4l2-request_28.patch
[ -f libva-v4l2-request_29.patch ] || wget https://patch-diff.githubusercontent.com/raw/bootlin/libva-v4l2-request/pull/29.patch -O libva-v4l2-request_29.patch
[ -f libva-v4l2-request_30.patch ] || wget https://patch-diff.githubusercontent.com/raw/bootlin/libva-v4l2-request/pull/30.patch -O libva-v4l2-request_30.patch
## GIT
[ -d $PKGDIR ] || git clone --depth=1 $GITREPO/$GITTREE.git --branch=$GITBRANCH $PKGDIR
cd $PKGDIR
git clean -f
git reset --hard
git pull
## PATCH
patch -p1 < ../libva-v4l2-request_28.patch
patch -p1 < ../libva-v4l2-request_29.patch
patch -p1 < ../libva-v4l2-request_30.patch
## CONFIGURE
meson pbp-build -Dprefix=/usr/local -Dbuildtype=release --libdir=/usr/local/lib/aarch64-linux-gnu
## BUILD
ninja -C pbp-build
## INSTALL
sudo ninja -C pbp-build install
sudo ldconfig
## EXIT
exit
## ENJOY