Browse Source

l/intel-media: Added intel-media-19.2.1.

current-20191101
parent
commit
6eeae316e1
  1. 19
      l/intel-media/doinst.sh
  2. 11
      l/intel-media/intel-media-19.2.1-fix-bogus-cflag.patch
  3. 1
      l/intel-media/intel-media-19.2.1.tar.gz.sha256
  4. 134
      l/intel-media/intel-media.SlackBuild
  5. 3
      l/intel-media/intel-media.csh
  6. 3
      l/intel-media/intel-media.sh
  7. 12
      l/intel-media/slack-desc

19
l/intel-media/doinst.sh

@ -0,0 +1,19 @@
#!/bin/sh
config()
{
NEW="$1"
OLD="`dirname $NEW`/`basename $NEW .new`"
if [ ! -r $OLD ]; then
mv $NEW $OLD
elif [ "`cat $OLD | md5sum`" = "`cat $NEW | md5sum`" ]; then
rm $NEW
fi
}
if [ -x /usr/bin/update-desktop-database ]; then
/usr/bin/update-desktop-database ./usr/share/applications >/dev/null 2>&1
fi
if [ -x /usr/bin/update-mime-database ]; then
/usr/bin/update-mime-database ./usr/share/mime >/dev/null 2>&1
fi

11
l/intel-media/intel-media-19.2.1-fix-bogus-cflag.patch

@ -0,0 +1,11 @@
diff -Naur intel-media-19.2.1.orig/media_driver/cmake/linux/media_compile_flags_linux.cmake intel-media-19.2.1/media_driver/cmake/linux/media_compile_flags_linux.cmake
--- intel-media-19.2.1.orig/media_driver/cmake/linux/media_compile_flags_linux.cmake 2019-07-31 03:33:34.000000000 +0100
+++ intel-media-19.2.1/media_driver/cmake/linux/media_compile_flags_linux.cmake 2019-12-20 00:23:16.217578768 +0000
@@ -32,7 +32,6 @@
-Wno-overflow
-Wno-parentheses
-Wno-delete-incomplete
- -Werror=implicit-function-declaration
-Werror=address
-Werror=format-security
-Werror=non-virtual-dtor

1
l/intel-media/intel-media-19.2.1.tar.gz.sha256

@ -0,0 +1 @@
79279c991d918deaa52239dac55787b9c7562e520cd58744171b468d28b8af40 intel-media-19.2.1.tar.gz

134
l/intel-media/intel-media.SlackBuild

@ -0,0 +1,134 @@
#!/bin/bash
# Build script for Slackware
# Copyright (C) 2019 Damien Goutte-Gattat
#
# Redistribution and use of this script, with or without modifications,
# is permitted provided that the following conditions are met:
#
# 1. Redistributions of this script must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR AS IS'' AND ANY EXPRESS OR
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT,
# INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
# (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
# HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
# STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
# Contact: Damien Goutte-Gattat <dgouttegattat@incenp.org>
#
# Latest intel-media sourcecode is available at:
# <https://github.com/intel/media-driver>.
#
# Depends: l/gmmlib
# Source package infos
NAMESRC=${NAMESRC:-intel-media}
VERSION=${VERSION:-19.2.1}
ARCHIVE=${ARCHIVE:-$NAMESRC-$VERSION.tar.gz}
WGET=${WGET:-https://github.com/intel/media-driver/archive/$ARCHIVE}
# Build infos
NAMEPKG=${NAMEPKG:-intel-media}
BUILD=${BUILD:-1GGD}
ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')}
JOBS=${JOBS:-1}
EXT=${EXT:-txz}
# Directories
TMP=${TMP:-/tmp}
OUT=${OUT:-$TMP/build}
PKG=${PKG:-$OUT/$NAMEPKG}
CWD=$(pwd)
set -e # Quit if a command returns non-zero
# Sanity checks
if [ $UID -eq 0 ]; then
echo "You should NOT run this script as ROOT!"
exit 1
fi
if [ ! -d $TMP ]; then
echo "$TMP does not exists or is not a directory!"
exit 1
fi
# Compilation flags
LIBDIRSUFFIX=""
case "$ARCH" in
i?86)
CPUOPT="-O2 -march=$ARCH -mtune=i686"
;;
x86_64)
CPUOPT="-O2 -fPIC"
LIBDIRSUFFIX="64"
;;
*)
CPUOPT="-O2"
;;
esac
# Get and verify the source archive
if [ ! -r $ARCHIVE ]; then
wget -c -O $ARCHIVE.part "$WGET"
mv $ARCHIVE.part $ARCHIVE
fi
sha256sum -c $ARCHIVE.sha256
NAME=$(tar ft $ARCHIVE | head -n 1 | cut -d / -f 1)
# Compile
cd $TMP
echo "Building $ARCHIVE..."
tar xf $CWD/$ARCHIVE
cd $NAME
patch -p 1 < $CWD/intel-media-19.2.1-fix-bogus-cflag.patch
mkdir build && cd build
CFLAGS=$CPUOPT \
CXXFLAGS=$CPUOPT \
cmake \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_INSTALL_LIBDIR=/usr/lib$LIBDIRSUFFIX \
..
make -j $JOBS
make install/strip DESTDIR=$PKG
# Strip binary missed by install/strip
strip --strip-unneeded $PKG/usr/lib$LIBDIRSUFFIX/dri/iHD_drv_video.so
# Install the documentation
mkdir -p $PKG/usr/doc/$NAMEPKG-$VERSION
install -m 644 ../LICENSE.md ../README.md ../docs/media_features.md \
$PKG/usr/doc/$NAMEPKG-$VERSION
# Install profile scripts to enable the driver
install -D -m 644 $CWD/intel-media.sh $PKG/etc/profile.d/intel-media.sh
install -m 644 $CWD/intel-media.csh $PKG/etc/profile.d/intel-media.csh
# Copy slack-desc and doinst.sh files
install -D -m 644 $CWD/slack-desc $PKG/install/slack-desc
# Add dependency infos
cat <<EOF > $PKG/install/slack-required
gmmlib
EOF
# Package the tree
cd $PKG
mkdir -p $OUT
PACKAGING="
chown root:root . -R
/sbin/makepkg -l y -c n $OUT/$NAMEPKG-$VERSION-$ARCH-$BUILD.$EXT
rm -rf $PKG
rm -rf $TMP/$NAME
"
if type -p fakeroot ; then
echo "$PACKAGING" | fakeroot
else
su -c "$PACKAGING"
fi

3
l/intel-media/intel-media.csh

@ -0,0 +1,3 @@
#!/bin/csh
setenv LIBVA_DRIVER_NAME "iHD"

3
l/intel-media/intel-media.sh

@ -0,0 +1,3 @@
#!/bin/sh
export LIBVA_DRIVER_NAME="iHD"

12
l/intel-media/slack-desc

@ -0,0 +1,12 @@
|-----handy-ruler-----------------------------------------------------|
intel-media: intel-media (Intel media driver for VAAPI)
intel-media:
intel-media: The Intel Media Driver for VAAPI is a new VA-API (Video Acceleration
intel-media: API) user mode driver supporing hardware accelerated decoding,
intel-media: encoding, and video post-processing for GEN based graphics
intel-media: hardware.
intel-media:
intel-media:
intel-media:
intel-media:
intel-media:
Loading…
Cancel
Save