Skip to content

Commit

Permalink
Fixed alpha 0.10.25 build for Linux: static libvdpau build added.
Browse files Browse the repository at this point in the history
  • Loading branch information
john-preston committed Jan 5, 2017
1 parent 0edca8c commit 1a16df4
Show file tree
Hide file tree
Showing 4 changed files with 64 additions and 0 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ addons:
- libssl-dev
- libunity-dev
- libva-dev
- libvdpau-dev
- libxcb-xkb-dev
- libxkbcommon-dev
- lintian
Expand Down
55 changes: 55 additions & 0 deletions .travis/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ GYP_PATCH="$UPSTREAM/Telegram/Patches/gyp.diff"
VA_PATH="$BUILD/libva"
VA_CACHE_VERSION="2"

VDPAU_PATH="$BUILD/libvdpau"
VDPAU_CACHE_VERSION="1"

FFMPEG_PATH="$BUILD/ffmpeg"
FFMPEG_CACHE_VERSION="2"

Expand Down Expand Up @@ -60,6 +63,9 @@ build() {
# libva
getVa

# libvdpau
getVdpau

# ffmpeg
getFFmpeg

Expand Down Expand Up @@ -205,6 +211,55 @@ buildVa() {
sudo ldconfig
}

getVdpau() {
travisStartFold "Getting libvdpau"

local VDPAU_CACHE="$CACHE/libvdpau"
local VDPAU_CACHE_FILE="$VDPAU_CACHE/.cache.txt"
local VDPAU_CACHE_KEY="${VDPAU_CACHE_VERSION}"
local VDPAU_CACHE_OUTDATED="1"

if [ ! -d "$VDPAU_CACHE" ]; then
mkdir -p "$VDPAU_CACHE"
fi

ln -sf "$VDPAU_CACHE" "$VDPAU_PATH"

if [ -f "$VDPAU_CACHE_FILE" ]; then
local VDPAU_CACHE_KEY_FOUND=`tail -n 1 $VDPAU_CACHE_FILE`
if [ "$VDPAU_CACHE_KEY" == "$VDPAU_CACHE_KEY_FOUND" ]; then
VDPAU_CACHE_OUTDATED="0"
else
info_msg "Cache key '$VDPAU_CACHE_KEY_FOUND' does not match '$VDPAU_CACHE_KEY', rebuilding libvdpau"
fi
fi
if [ "$VDPAU_CACHE_OUTDATED" == "1" ]; then
buildVdpau
sudo echo $VDPAU_CACHE_KEY > "$VDPAU_CACHE_FILE"
else
info_msg "Using cached libvdpau"
fi
}

buildVdpau() {
info_msg "Downloading and building libvdpau"

if [ -d "$EXTERNAL/libvdpau" ]; then
rm -rf "$EXTERNAL/libvdpau"
fi
cd $VDPAU_PATH
rm -rf *

cd "$EXTERNAL"
git clone git://anongit.freedesktop.org/vdpau/libvdpau

cd "$EXTERNAL/libvdpau"
./autogen.sh --prefix=$VDPAU_PATH --enable-static
make $MAKE_ARGS
sudo make install
sudo ldconfig
}

getFFmpeg() {
travisStartFold "Getting ffmpeg"

Expand Down
1 change: 1 addition & 0 deletions Telegram/gyp/telegram_linux.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
'libva-x11.a',
'libva-drm.a',
'libva.a',
'libvdpau.a',
'libdrm.a',
'libz.a',
# '<!(pkg-config 2> /dev/null --libs <@(pkgconfig_libs))',
Expand Down
7 changes: 7 additions & 0 deletions doc/building-cmake.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ In Terminal go to **/home/user/TBuild/Libraries** and run
sudo make install
cd ..

git clone git://anongit.freedesktop.org/vdpau/libvdpau
cd libvdpau
./autogen.sh --enable-static
make
sudo make install
cd ..

git clone https://github.com/FFmpeg/FFmpeg.git ffmpeg
cd ffmpeg
git checkout release/3.2
Expand Down

0 comments on commit 1a16df4

Please sign in to comment.