diff options
Diffstat (limited to 'dev-util/amdstream/amdstream-2.6.ebuild')
-rw-r--r-- | dev-util/amdstream/amdstream-2.6.ebuild | 60 |
1 files changed, 31 insertions, 29 deletions
diff --git a/dev-util/amdstream/amdstream-2.6.ebuild b/dev-util/amdstream/amdstream-2.6.ebuild index 1a0feda..1cd16f4 100644 --- a/dev-util/amdstream/amdstream-2.6.ebuild +++ b/dev-util/amdstream/amdstream-2.6.ebuild @@ -20,27 +20,34 @@ SLOT="0" KEYWORDS="~amd64" IUSE="examples" -DEPEND="examples? ( app-admin/eselect-opengl +#check if those deps are valid, especially llvm +RDEPEND=" + x11-libs/libXext + x11-libs/libX11 + examples? ( sys-devel/llvm - media-libs/mesa - || ( dev-util/opencl-headers dev-util/nvidia-cuda-toolkit ) media-libs/glew - media-libs/freeglut )" -RDEPEND="${DEPEND}" + media-libs/freeglut + )" +DEPEND="" S=${WORKDIR} RESTRICT="mirror" QA_PREBUILT="opt/AMDAPP/lib/* - opt/AMDAPP/bin/clinfo" + opt/AMDAPP/bin/clinfo + opt/AMDAPP/samples/opencl/bin/x86_64/* + opt/AMDAPP/samples/opencl/bin/x86/*" pkg_setup() { if [[ $(tc-arch) == 'x86' ]] ; then bitness=32 _arch=x86 + _narch=x86_64 else bitness=64 _arch=x86_64 + _narch=x86 fi export bitness export _arch @@ -53,25 +60,28 @@ src_unpack() { } src_prepare() { - local _ddir=/opt/AMDAPP + local _ddir=/opt/AMDAPP/ cat <<-EOF > 99${PN} - PATH=${_ddir}/bin - LDPATH=${_ddir}/lib + PATH=${_ddir}bin + LDPATH=${_ddir}lib + AMDSTREAMSDKROOT=${_ddir} + AMDSTREAMSDKSAMPLEROOT=${_ddir} EOF if use examples ; then pushd ${MY_S} &> /dev/null - epatch "${FILESDIR}"/${P}-x11.patch + epatch "${FILESDIR}"/${P}-x11.patch \ + "${FILESDIR}"/${P}-parallel-build.patch sed -i make/openclsdkdefs.mk \ -e "s/g++/$(tc-getCXX)/" \ - -e "/C_DEBUG_FLAG/d" || die + -e "/C_DEBUG_FLAG/d" || die #CXXFLAGS popd &> /dev/null fi } src_compile() { use examples || return - emake -C ${MY_S} + #emake -C ${MY_S} # Does it make sense to build it? } src_install() { @@ -82,27 +92,19 @@ src_install() { pushd ${MY_S} &> /dev/null insinto /opt/AMDAPP doins -r {glut_notice.txt,docs,include} + if use examples ; then + rm -rf samples/opencl/bin/${_narch} + doins -r samples + for i in /opt/AMDAPP/samples/opencl/bin/${_arch}/*; do + [[ ${i} == ${i%.*} ]] && fperms 755 "${i}" + done + fi + insopts -m755 insinto /opt/AMDAPP/bin doins bin/${_arch}/clinfo insinto /opt/AMDAPP/lib + rm -rf lib/${_arch}/lib{GLEW,glut}.so doins lib/*.so lib/${_arch}/* - - # fix perms - fperms 755 /opt/AMDAPP/bin/clinfo - - #TODO: install examples - - #Env vars - #mkdir -p ${D}/etc/profile.d - #cd ${D}/etc/profile.d - #echo "#!/bin/sh" > amdstream.sh - #echo "export AMDAPPSDKROOT=${_installdir}" >> amdstream.sh - #echo "export AMDAPPSDKSAMPLESROOT=${_installdir}" >> amdstream.sh - - ##More docs and export - #echo "AMDSTREAMSDKROOT=${_installdir}/" >> ${D}/etc/env.d/99amdstream - #echo "AMDSTREAMSDKSAMPLEROOT=${_installdir}/" >> ${D}/etc/env.d/99amdstream - #echo "LIBRARY_PATH=${_installdir}/lib/x86_64" >> ${D}/etc/env.d/99amdstream } |