intel-ocl-sdk-4.4.0.117-r1.ebuild 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. # Copyright 1999-2015 Gentoo Foundation
  2. # Distributed under the terms of the GNU General Public License v2
  3. EAPI=5
  4. inherit rpm multilib
  5. DESCRIPTION="Intel's implementation of the OpenCL standard"
  6. HOMEPAGE="http://software.intel.com/en-us/articles/opencl-sdk/"
  7. SRC_URI="http://registrationcenter.intel.com/irc_nas/4181/intel_sdk_for_ocl_applications_2014_ubuntu_${PV}_x64.tgz"
  8. LICENSE="Intel-SDP"
  9. SLOT="0"
  10. IUSE="android +system-tbb system-clang +system-boost +system-qt"
  11. KEYWORDS="-* ~amd64"
  12. RESTRICT="mirror"
  13. RDEPEND="app-eselect/eselect-opencl
  14. sys-process/numactl
  15. system-tbb? ( >=dev-cpp/tbb-4.2.20131118 )
  16. system-clang? ( =sys-devel/clang-3.4* )
  17. system-boost? ( >=dev-libs/boost-1.52.0:= )
  18. system-qt? (
  19. >=dev-qt/qtgui-4.8.5:4
  20. >=dev-qt/qtcore-4.8.5:4
  21. )
  22. "
  23. DEPEND=""
  24. S=${WORKDIR}/intel_sdk_for_ocl_applications_2014_ubuntu_${PV}_x64/
  25. INTEL_CL=opt/intel/opencl-1.2-${PV}
  26. INTEL_VENDOR_DIR=usr/$(get_libdir)/OpenCL/vendors/intel/
  27. QA_PREBUILT="${INTEL_OCL}/*"
  28. src_unpack() {
  29. default
  30. PKGS="base devel intel-cpu intel-devel"
  31. use android && PKGS="$PKGS intel-devel-android"
  32. for PKG in ${PKGS}; do
  33. FILENAME="opencl-1.2-${PKG}-4.4.0.117-1.x86_64.deb"
  34. einfo "Extracting \"${FILENAME}\"..."
  35. ar x "${S}/$FILENAME" || die
  36. unpack ./data.tar.gz
  37. done
  38. }
  39. src_prepare() {
  40. # Remove bundled stuff
  41. if use system-boost; then
  42. rm -f "${WORKDIR}/${INTEL_CL}"/lib64/libboost*.so*
  43. fi
  44. if use system-clang; then
  45. rm -f "${WORKDIR}/${INTEL_CL}"/lib64/libclang*
  46. fi
  47. if use system-qt; then
  48. rm -f "${WORKDIR}/${INTEL_CL}"/lib64/libQt*
  49. fi
  50. if use system-tbb; then
  51. rm -f "${WORKDIR}/${INTEL_CL}"/lib64/libtbb*
  52. fi
  53. }
  54. src_install() {
  55. insinto /etc/OpenCL/vendors/
  56. doins "${WORKDIR}/${INTEL_CL}"/etc/intel64.icd
  57. insinto /"${INTEL_CL}"/lib64
  58. insopts -m 755
  59. doins "${WORKDIR}/${INTEL_CL}"/lib64/*
  60. insinto /"${INTEL_CL}"/bin
  61. doins "${WORKDIR}"/"${INTEL_CL}"/bin/*
  62. # TODO put this somewhere
  63. # doins ${INTEL_CL}/eclipse-plug-in/OpenCL_SDK_0.1.0.jar
  64. dodir "${INTEL_VENDOR_DIR}"
  65. dosym "/opt/intel/opencl-1.2-${PV}/lib64/libOpenCL.so" "${INTEL_VENDOR_DIR}/libOpenCL.so"
  66. dosym "/opt/intel/opencl-1.2-${PV}/lib64/libOpenCL.so.1" "${INTEL_VENDOR_DIR}/libOpenCL.so.1"
  67. dosym "/opt/intel/opencl-1.2-${PV}/lib64/libOpenCL.so.1.2" "${INTEL_VENDOR_DIR}/libOpenCL.so.1.2"
  68. }
  69. pkg_postinst() {
  70. eselect opencl set --use-old intel
  71. }