diff options
author | Jeremy Hansen <jebrhansen+github@gmail.com> | 2022-03-04 13:27:51 -0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-03-05 08:25:21 +0700 |
commit | bce63963624c8440aa63754866c7e04abe32da99 (patch) | |
tree | 5562a06f114485d699e86180030aae7a12ead154 /libraries/onevpl | |
parent | 09c3fc81a33b2267ba11ec2a752d8acbbbb34fe4 (diff) |
libraries/onevpl/: Added (oneAPI Video Processing Library)
New optional dependency for HandBrake
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
Diffstat (limited to 'libraries/onevpl')
-rw-r--r-- | libraries/onevpl/README | 13 | ||||
-rw-r--r-- | libraries/onevpl/onevpl.SlackBuild | 118 | ||||
-rw-r--r-- | libraries/onevpl/onevpl.info | 10 | ||||
-rw-r--r-- | libraries/onevpl/slack-desc | 19 |
4 files changed, 160 insertions, 0 deletions
diff --git a/libraries/onevpl/README b/libraries/onevpl/README new file mode 100644 index 000000000000..21d7e3971847 --- /dev/null +++ b/libraries/onevpl/README @@ -0,0 +1,13 @@ +The Intel oneAPI Video Processing Library (oneVPL) is the successor +to Intel Media SDK. This library takes you from abstractions for +integrated graphics to using oneVPL to unlock media features on a +much broader range of accelerators. + +The oneAPI Video Processing Library (oneVPL) provides a single video +processing API for encode, decode, and video processing that works +across a wide range of accelerators. + +To include examples (available in /usr/share/onevpl/examples) pass +EXAMPLES=yes to the slackbuild as + + EXAMPLES=yes ./onevpl.SlackBuild diff --git a/libraries/onevpl/onevpl.SlackBuild b/libraries/onevpl/onevpl.SlackBuild new file mode 100644 index 000000000000..d8744ec4cdba --- /dev/null +++ b/libraries/onevpl/onevpl.SlackBuild @@ -0,0 +1,118 @@ +#!/bin/bash + +# Slackware build script for onevpl + +# Copyright 2022 Jeremy Hansen <jebrhansen+SBo -at- gmail.com> +# All rights reserved. +# +# Redistribution and use of this script, with or without modification, 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. + +cd $(dirname $0) ; CWD=$(pwd) + +PRGNAM=onevpl +SRCNAM=oneVPL +VERSION=${VERSION:-2022.0.0} +BUILD=${BUILD:-1} +TAG=${TAG:-_SBo} +PKGTYPE=${PKGTYPE:-tgz} + +if [ -z "$ARCH" ]; then + case "$( uname -m )" in + i?86) ARCH=i586 ;; + arm*) ARCH=arm ;; + *) ARCH=$( uname -m ) ;; + esac +fi + +# If the variable PRINT_PACKAGE_NAME is set, then this script will report what +# the name of the created package would be, and then exit. This information +# could be useful to other scripts. +if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then + echo "$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE" + exit 0 +fi + +TMP=${TMP:-/tmp/SBo} +PKG=$TMP/package-$PRGNAM +OUTPUT=${OUTPUT:-/tmp} + +if [ "$ARCH" = "i586" ]; then + SLKCFLAGS="-O2 -march=i586 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "i686" ]; then + SLKCFLAGS="-O2 -march=i686 -mtune=i686" + LIBDIRSUFFIX="" +elif [ "$ARCH" = "x86_64" ]; then + SLKCFLAGS="-O2 -fPIC" + LIBDIRSUFFIX="64" +else + SLKCFLAGS="-O2" + LIBDIRSUFFIX="" +fi + +set -e + +rm -rf $PKG +mkdir -p $TMP $PKG $OUTPUT +cd $TMP +rm -rf $SRCNAM-$VERSION +tar xvf $CWD/$SRCNAM-$VERSION.tar.gz +cd $SRCNAM-$VERSION +chown -R root:root . +find -L . \ + \( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \ + -o -perm 511 \) -exec chmod 755 {} \; -o \ + \( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \ + -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; + +# Make examples optional +if [ ${EXAMPLES:-no} == "yes" ]; then + BUILDEXAMPLES="-DBUILD_EXAMPLES=ON -DINSTALL_EXAMPLE_CODE=ON" +else + BUILDEXAMPLES="-DBUILD_EXAMPLES=OFF -DINSTALL_EXAMPLE_CODE=OFF" +fi + +mkdir -p build +cd build + cmake \ + -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DBUILD_PYTHON_BINDING=ON \ + $BUILDEXAMPLES \ + -DCMAKE_BUILD_TYPE=Release .. + make + make install/strip DESTDIR=$PKG +cd .. + +rm -f $PKG/{,usr/}lib${LIBDIRSUFFIX}/*.la + +find $PKG -print0 | xargs -0 file | grep -e "executable" -e "shared object" | grep ELF \ + | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true + +mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION +cp -a \ + CONTRIBUTING.md INSTALL.md LICENSE README.md \ + $PKG/usr/doc/$PRGNAM-$VERSION +cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild + +mkdir -p $PKG/install +cat $CWD/slack-desc > $PKG/install/slack-desc + +cd $PKG +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.$PKGTYPE diff --git a/libraries/onevpl/onevpl.info b/libraries/onevpl/onevpl.info new file mode 100644 index 000000000000..bbc5d89997bd --- /dev/null +++ b/libraries/onevpl/onevpl.info @@ -0,0 +1,10 @@ +PRGNAM="onevpl" +VERSION="2022.0.0" +HOMEPAGE="https://www.intel.com/content/www/us/en/developer/tools/oneapi/onevpl.html" +DOWNLOAD="https://github.com/oneapi-src/oneVPL/archive/refs/tags/v2022.0.0/oneVPL-2022.0.0.tar.gz" +MD5SUM="f812597060cfca4462071dc10fa37aa2" +DOWNLOAD_x86_64="" +MD5SUM_x86_64="" +REQUIRES="pybind11" +MAINTAINER="Jeremy Hansen" +EMAIL="jebrhansen+SBo@gmail.com" diff --git a/libraries/onevpl/slack-desc b/libraries/onevpl/slack-desc new file mode 100644 index 000000000000..d87e4712fe70 --- /dev/null +++ b/libraries/onevpl/slack-desc @@ -0,0 +1,19 @@ +# HOW TO EDIT THIS FILE: +# The "handy ruler" below makes it easier to edit a package description. +# Line up the first '|' above the ':' following the base package name, and +# the '|' on the right side marks the last column you can put a character in. +# You must make exactly 11 lines for the formatting to be correct. It's also +# customary to leave one space after the ':' except on otherwise blank lines. + + |-----handy-ruler------------------------------------------------------| +onevpl: onevpl (oneAPI Video Processing Library) +onevpl: +onevpl: The Intel oneAPI Video Processing Library (oneVPL) is the successor +onevpl: to Intel Media SDK. This library takes you from abstractions for +onevpl: integrated graphics to using oneVPL to unlock media features on a +onevpl: much broader range of accelerators. +onevpl: +onevpl: The oneAPI Video Processing Library (oneVPL) provides a single video +onevpl: processing API for encode, decode, and video processing that works +onevpl: across a wide range of accelerators. +onevpl: |