development/amd-app-sdk: Updated for version 2.8.

Signed-off-by: Niels Horn <niels.horn@slackbuilds.org>
This commit is contained in:
Alan Alberghini 2013-06-16 14:45:22 -03:00 committed by Niels Horn
parent 0776deb9cb
commit 8a06839067
14 changed files with 102 additions and 42 deletions

View file

@ -8,6 +8,14 @@ need a compatible card and recent Catalyst drivers. See
http://developer.amd.com/sdks/AMDAPPSDK/pages/DriverCompatibility.aspx
for a complete list of requirements.
NOTE:
NOTES:
This package is compatible only with x86 and x86_64 architectures.
1) The download links point to an EULA page that you have to accept in order
to download the files
2) This package is compatible only with x86 and x86_64 architectures.
3) By default, samples are not included in the final package. If you'd like
to include them, use the SAMPLES environment variable:
#SAMPLES=yes ./amd-app-sdk.SlackBuild
Please read the README.SLACKWARE file for further information about this
package setup.

View file

@ -0,0 +1,16 @@
In order to properly link to the AMD App Stream SDK some environment variables
need to be set. These are set by the profile scripts installed in
/etc/profile.d:
- amd-app-sdk.[c]sh defines the whereabouts of the library and sets the
CPPFLAGS accordingly for the compiler to find the header files (these
scripts are enabled by default after package installation);
- amd-app-sdk-libs[32|64].[c]sh adds to the LD_LIBRARY_PATH environment
variable the location of the library files included in this package.
Before setting these as executable PLEASE READ ON.
Given that recent AMD Catalyst/fglrx drivers actually include an OpenCL library
that frequently clashes with the one provided by this package, users of those
drivers should leave the /etc/profile.d/amd-app-sdk-libs[32|64].[c]sh scripts as
NOT executable. Users of other drivers should check first if their drivers
already provide an OpenCL library implementation (the library name should be
libOpenCL.so) and, if not, should set those additional scripts as executable.

View file

@ -0,0 +1,3 @@
#!/bin/csh
setenv LD_LIBRARY_PATH ${AMDAPPSDKROOT}/lib/x86:${LD_LIBRARY_PATH}

View file

@ -0,0 +1,3 @@
#!/bin/sh
export LD_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86:${LD_LIBRARY_PATH}

View file

@ -0,0 +1,3 @@
#!/bin/csh
setenv LD_LIBRARY_PATH ${AMDAPPSDKROOT}/lib/x86_64:${LD_LIBRARY_PATH}

View file

@ -0,0 +1,3 @@
#!/bin/sh
export LD_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86_64:${LD_LIBRARY_PATH}

View file

@ -28,12 +28,14 @@
#
# Initial release.
# 20121220 - Updated for version 2.6: incompatible packaging with 2.4- versions
# 20130530 - Updated for version 2.8 and made samples optional
PRGNAM=amd-app-sdk
INT_NAME=AMD-APP-SDK
VERSION=${VERSION:-2.6}
VERSION=${VERSION:-2.8}
BUILD=${BUILD:-1}
TAG=${TAG:-_SBo}
SAMPLES=${SAMPLES:-no}
# Automatically determine the architecture we're building on or use supplied ARCH
# (only x86 and x86_64 are supported)
@ -51,7 +53,7 @@ PKG=$TMP/package-$PRGNAM
OUTPUT=${OUTPUT:-/tmp}
ARCHIVE_NAME="AMD-APP-SDK-v$VERSION-lnx${BITNESS}"
INT_ARCHIVE_NAME="AMD-APP-SDK-v$VERSION-RC3-lnx${BITNESS}"
INT_ARCHIVE_NAME=AMD-APP-SDK-v$VERSION-RC*-lnx${BITNESS}
set -e
@ -60,18 +62,28 @@ mkdir -p $TMP $PKG $OUTPUT
cd $TMP
rm -rf $INT_ARCHIVE_NAME
tar xvf $CWD/$ARCHIVE_NAME.tgz
tar xvf $INT_ARCHIVE_NAME.tgz
cd $INT_ARCHIVE_NAME
# If we're packaging a 64 bit package, let's remove all 32 bit parts first (no multilib).
# RFC: should all these files really be removed, given that the user already downloaded them in the
# source tarball, which comes multilib by itself?
# Keep out the samples from being extracted in the first place, if they're not
# desired.
if [ "$SAMPLES" == "no" ]
then
EXCLUDES="--exclude $INT_ARCHIVE_NAME/samples"
fi
# If we're packaging a 64 bit package, let's exclude the 32 bit parts from the
# extraction (no multilib).
if [ ${ARCH} = x86_64 ]
then
find . -type d -name x86 -depth -exec rm -r {} \;
EXCLUDES+=" --exclude $INT_ARCHIVE_NAME/samples/opencl/bin/x86"
EXCLUDES+=" --exclude $INT_ARCHIVE_NAME/lib/x86"
EXCLUDES+=" --exclude $INT_ARCHIVE_NAME/bin/x86"
fi
tar xvf $INT_ARCHIVE_NAME.tgz $EXCLUDES
cd $INT_ARCHIVE_NAME
chown -R root:root .
find . \
\( -perm 777 -o -perm 775 -o -perm 711 -o -perm 555 -o -perm 511 \) \
@ -92,15 +104,20 @@ mv * $PKG/opt/$PRGNAM
( cd $PKG && tar xf $TMP/icd-registration.tgz )
# Copy the profile scripts in their final location...
# Copy the main profile scripts in their final location...
install -m0755 $CWD/amd-app-sdk.sh $PKG/etc/profile.d
install -m0755 $CWD/amd-app-sdk.csh $PKG/etc/profile.d
# ...and then the libs-related ones.
if [ ${ARCH} = x86 ]
then
install -m0755 $CWD/amd-app-sdk32.sh $PKG/etc/profile.d
install -m0755 $CWD/amd-app-sdk32.csh $PKG/etc/profile.d
install -m0644 $CWD/amd-app-sdk-libs32.sh $PKG/etc/profile.d
install -m0644 $CWD/amd-app-sdk-libs32.csh $PKG/etc/profile.d
else
install -m0755 $CWD/amd-app-sdk64.sh $PKG/etc/profile.d
install -m0755 $CWD/amd-app-sdk64.csh $PKG/etc/profile.d
install -m0644 $CWD/amd-app-sdk-libs64.sh $PKG/etc/profile.d
install -m0644 $CWD/amd-app-sdk-libs64.csh $PKG/etc/profile.d
fi
chown -R root:root $PKG/etc
@ -109,8 +126,14 @@ mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
# Link documentation and samples from /opt
ln -sf /opt/$PRGNAM/docs/opencl $PKG/usr/doc/$PRGNAM-$VERSION
ln -sf /opt/$PRGNAM/samples $PKG/usr/doc/$PRGNAM-$VERSION
if [ "$SAMPLES" != "no" ]
then
ln -sf /opt/$PRGNAM/samples $PKG/usr/doc/$PRGNAM-$VERSION
fi
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
cat $CWD/README.SLACKWARE > $PKG/usr/doc/$PRGNAM-$VERSION/README.SLACKWARE
mkdir -p $PKG/install
cat $CWD/slack-desc > $PKG/install/slack-desc

View file

@ -0,0 +1,13 @@
#!/bin/csh
setenv AMDAPPSDKROOT /opt/amd-app-sdk
setenv AMDAPPSDKSAMPLESROOT /opt/amd-app-sdk
if ($?CPPFLAGS == 0) then
setenv CPPFLAGS "-I$AMDAPPSDKROOT/include"
else
setenv CPPFLAGS "$CPPFLAGS -I$AMDAPPSDKROOT/include"
endif
# For retrocompatibility with the former name of the SDK...
setenv ATISTREAMSDKROOT $AMDAPPSDKROOT

View file

@ -1,10 +1,10 @@
PRGNAM="amd-app-sdk"
VERSION="2.6"
HOMEPAGE="http://developer.amd.com/sdks/AMDAPPSDK/Pages/default.aspx"
DOWNLOAD="http://developer.amd.com/Downloads/AMD-APP-SDK-v2.6-lnx32.tgz"
MD5SUM="0a0ecedcc98a37428cc3ab090b8cf6b7"
DOWNLOAD_x86_64="http://developer.amd.com/Downloads/AMD-APP-SDK-v2.6-lnx64.tgz"
MD5SUM_x86_64="935f3490d1e3aac1bb6b3472488ead93"
VERSION="2.8"
HOMEPAGE="http://developer.amd.com/tools-and-sdks/heterogeneous-computing/amd-accelerated-parallel-processing-app-sdk"
DOWNLOAD="http://developer.amd.com/wordpress/media/files/AMD-APP-SDK-v2.8-lnx32.tgz"
MD5SUM="bb179856f7f8ed8aa34cc20c7b1bb0d3"
DOWNLOAD_x86_64="http://developer.amd.com/wordpress/media/files/AMD-APP-SDK-v2.8-lnx64.tgz"
MD5SUM_x86_64="cf8ae9eecc5e3573486e1bc73e0b316c"
REQUIRES=""
MAINTAINER="Alan Alberghini"
EMAIL="414N@slacky.it"

View file

@ -0,0 +1,8 @@
#!/bin/sh
export AMDAPPSDKROOT=/opt/amd-app-sdk
export AMDAPPSDKSAMPLESROOT=/opt/amd-app-sdk
export CPPFLAGS="$CPPFLAGS -I$AMDAPPSDKROOT/include"
# For retrocompatibility with the former name of the SDK...
export ATISTREAMSDKROOT=$AMDAPPSDKROOT

View file

@ -1,5 +0,0 @@
#!/bin/sh
setenv AMDAPPSDKROOT /opt/amd-app-sdk
setenv AMDAPPSDKSAMPLESROOT /opt/amd-app-sdk
setenv LD_LIBRARY_PATH ${AMDAPPSDKROOT}/lib/x86:${LD_LIBRARY_PATH}

View file

@ -1,5 +0,0 @@
#!/bin/sh
export AMDAPPSDKROOT=/opt/amd-app-sdk
export AMDAPPSDKSAMPLESROOT=/opt/amd-app-sdk
export LD_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86:${LD_LIBRARY_PATH}

View file

@ -1,5 +0,0 @@
#!/bin/sh
setenv AMDAPPSDKROOT /opt/amd-app-sdk
setenv AMDAPPSDKSAMPLESROOT /opt/amd-app-sdk
setenv LD_LIBRARY_PATH ${AMDAPPSDKROOT}/lib/x86_64:${LD_LIBRARY_PATH}

View file

@ -1,5 +0,0 @@
#!/bin/sh
export AMDAPPSDKROOT=/opt/amd-app-sdk
export AMDAPPSDKSAMPLESROOT=/opt/amd-app-sdk
export LD_LIBRARY_PATH=${AMDAPPSDKROOT}/lib/x86_64:${LD_LIBRARY_PATH}