Merge branch 'org.openembedded.dev' of git@git.openembedded.net:openembedded into...
[vuplus_openembedded] / packages / powervr-drivers / libgles-omap3.inc
1 DESCRIPTION = "libGLES for the omap3"
2 LICENCE = "proprietary-binary"
3
4 PROVIDES += "virtual/egl"
5
6 # some hints to get you going. as this isnt a totally "open" library, you need
7 # to do some work. follow the steps below.
8 #
9 # 1. if you don't already have a ti account get one here. it's free:
10 #  http://www.ti.com/hdr_my_ti
11 # 2. fetch the gl-es bin from here:
12 #  https://www-a.ti.com/downloads/sds_support/targetcontent/dvsdk/oslinux_dvsdk/v3_00_3530/OMAP35x_Graphics_SDK_setuplinux_3_00_00_06.bin
13 # (replace version in .bin file as appropriate)
14 # 3. put the OMAP35x_*.bin file in libgles-omap3/
15 #  mv OMAP35x_Graphics_SDK_setuplinux_3_00_00_06.bin ./libgles-omap3/
16 # 4. make it executable:
17 #  chmod a+x ./libgles-omap3/OMAP35x_Graphics_SDK_setuplinux_3_00_00_06.bin
18
19 # voila!
20
21 SRC_URI = "file://OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin \
22            file://rc.pvr \
23           "
24 S = "${WORKDIR}/OMAP35x_Graphics_SDK_${SGXPV}"
25
26 BINLOCATION ?= "${S}/gfx_rel"
27
28 PACKAGES += " xserver-kdrive-powervrsgx ${PN}-tests"
29
30 FILES_${PN} = "${sysconfdir} ${libdir}/lib*.so.* ${bindir}/pvrsrvinit"
31 FILES_xserver-kdrive-powervrsgx = "${bindir}/Xsgx"
32 FILES_${PN}-tests = "${bindir}/*"
33
34 RRECOMMENDS_${PN} = "${PN}-tests \
35                      omap3-sgx-modules"
36
37 inherit update-rc.d
38
39 INITSCRIPT_NAME = "pvr-init"
40 INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
41
42 do_accept_license() {
43         export HOME="${WORKDIR}"
44         echo "Y
45 Y
46 ${S}" | ${WORKDIR}/OMAP35x_Graphics_SDK_setuplinux_${SGXPV}.bin
47 }
48
49 addtask accept_license after do_unpack before do_configure
50
51 do_compile() {
52     for sofile in $(find ${S} -name "lib*Open*.so") $(find ${S} -name "lib*srv*.so")   $(find ${S} -name "lib*gl*.so") $(find ${S} -name "libpvr*.so") $(find ${S} -name "lib*GL*.so"); do
53         if [ "$(readlink -n ${sofile})" = "" ] ; then
54             mv $sofile ${sofile}.${IMGPV}
55             ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}
56         fi
57     done
58 }
59
60 do_install () {
61
62         install -d ${D}${libdir}
63         cp -pP ${BINLOCATION}/*.so* ${D}${libdir}
64
65         install -d ${D}${bindir}/
66         cp -pP ${BINLOCATION}/*_test ${D}${bindir}/
67         cp -pP ${BINLOCATION}/gl2info ${D}${bindir}/
68         cp -pP ${BINLOCATION}/gles1test1 ${D}${bindir}/
69         cp -pP ${BINLOCATION}/gles1_texture_stream ${D}${bindir}/
70         cp -pP ${BINLOCATION}/gles2test1 ${D}${bindir}/
71         cp -pP ${BINLOCATION}/pvrsrvinit ${D}${bindir}/
72         cp -pP ${BINLOCATION}/xgles1test1 ${D}${bindir}/
73
74         cp -pP ${BINLOCATION}/freedesktop/kdrive/usr/X11R6_SGX/bin/Xsgx || true
75         cp -pP ${BINLOCATION}/freedesktop/usr/X11R6_SGX/bin/Xsgx ${D}${bindir}/ || true
76
77         install -d ${D}${includedir}
78         cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/* ${D}${includedir}/
79         cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/* ${D}${includedir}/
80         cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES/
81         cp -pPr ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include/GLES/* ${D}${includedir}/GLES2/
82         
83         install -d ${D}${sysconfdir}/init.d/
84         cp -pP ${WORKDIR}/rc.pvr ${D}${sysconfdir}/init.d/pvr-init
85
86         install -d ${D}${sysconfdir}
87         echo "[default]" > ${D}${sysconfdir}/powervr.ini
88         echo "WindowSystem=libpvrPVR2D_FRONTWSEGL.so" >> ${D}${sysconfdir}/powervr.ini
89 }
90
91 do_stage () {
92         install -d ${STAGING_LIBDIR}/
93         cp -pP ${BINLOCATION}/*.so* ${STAGING_LIBDIR}
94         cp -pP ${BINLOCATION}/*.a ${STAGING_LIBDIR}
95
96         install -d ${STAGING_INCDIR}
97         cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/*  ${STAGING_INCDIR}/
98     cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/* ${STAGING_INCDIR}/
99     cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/LinuxOMAP3/Include/GLES/* ${STAGING_INCDIR}/GLES/
100     cp -pPr ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/LinuxOMAP3/Include/GLES/* ${STAGING_INCDIR}/GLES2/
101 }
102
103 pkg_postinst() {
104 #!/bin/sh
105 ln -sf /usr/lib/libXdmcp.so.6.0.0 /usr/lib/libXdmcp.so.0 
106 ln -sf /usr/lib/libXau.so.6.0.0 /usr/lib/libXau.so.0
107 }