linux-keystone: update from version 3.6-rc6 to 3.6.6
[glsdk/meta-ti-glsdk.git] / recipes-graphics / libgles / libgles-omap3.inc
1 DESCRIPTION = "libGLES for the omap3"
2 LICENSE = "proprietary-binary"
3 # 'TSPA.txt' might not be the best file to md5sum
4 LIC_FILES_CHKSUM = "file://TSPA.txt;md5=c0d5d9c1e38b41677144c4e24d6ddee1"
6 PR = "r35"
8 COMPATIBLE_MACHINE = "(omap3|ti814x|ti816x|ti33x)"
10 X11DEPENDS = "virtual/libx11 libxau libxdmcp libdrm"
11 DEPENDS = "${@base_contains('DISTRO_FEATURES', 'x11', '${X11DEPENDS}', '', d)}"
13 export SUPPORT_XORG ?= "${@base_contains('DISTRO_FEATURES', 'x11', '1', '0', d)}"
14 PVR_INIT ?= "pvrsrvinit"
16 PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2"
18 RREPLACES_${PN} = "libegl libgles1 libgles2"
19 RREPLACES_${PN}-dev = "libegl-dev libgles1-dev libgles2-dev"
20 RREPLACES_${PN}-dbg = "libegl-dbg"
22 SRC_URI = "http://software-dl.ti.com/dsps/dsps_public_sw/sdo_sb/targetcontent/gfxsdk/${SGXPV}/exports/${BINFILE} \
23                    file://cputype \
24                    file://rc.pvr \
25                    file://sample.desktop \
26                    file://99-bufferclass.rules  \
27 "
29 S = "${WORKDIR}/OMAP35x_Graphics_SDK_${SGXPV}"
31 # Logic to unpack installjammer file
32 TI_BIN_UNPK_CMDS="Y: qY:workdir:Y"
33 require ../../recipes-ti/includes/ti-eula-unpack.inc
35 export BINLOCATION ?= "${S}/gfx_rel"
36 export ES2LOCATION ?= "${S}/gfx_rel_es2.x"
37 export ES3LOCATION ?= "${S}/gfx_rel_es3.x"
38 export ES5LOCATION ?= "${S}/gfx_rel_es5.x"
39 export ES6LOCATION ?= "${S}/gfx_rel_es6.x"
40 export ES8LOCATION ?= "${S}/gfx_rel_es8.x"
42 LIBGLESWINDOWSYSTEM ?= "libpvrPVR2D_FRONTWSEGL.so.1"
44 do_configure() {
45         # Attempt to fix up the worst offenders for file permissions
46         for i in $(find ${S} -name "*.h") $(find ${S} -name "*.c") $(find ${S} -name "Make*") ; do
47                 chmod 0644 $i
48         done
50         # Attempt to create proper library softlinks
51         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
52                 if [ "$(readlink -n ${sofile})" = "" ] ; then
53                         mv $sofile ${sofile}.${IMGPV}
54                         ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}
55                         ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}$(echo ${IMGPV} | awk -F. '{print "." $1}')
56                         ln -sf $(basename ${sofile}.${IMGPV}) ${sofile}$(echo ${IMGPV} | awk -F. '{print "." $1 "." $2}')
57                 fi
58         done
60         # Due to recursive make PLAT_* isn't always passed down correctly, so use sed to fix those
61         for mak in $(find ${S} -name "*.mak") ; do
62                 sed -i -e s:arm-none-linux-gnueabi-:${TARGET_PREFIX}:g $mak
63         done
65         # clear out old stuff
66         find Binaries/ | xargs rm -f || true
67 }
69 # Force in GNU_HASH and paths to libs
70 TARGET_CC_ARCH += " ${TARGET_LINK_HASH_STYLE} -Wl,-rpath-link,${BINLOCATION} -L${BINLOCATION} \
71 -L${STAGING_DIR_TARGET}${libdir} -Wl,-rpath-link,${STAGING_DIR_TARGET}${libdir}"
72 PARALLEL_MAKE = ""
74 PLATFORM ?= "LinuxOMAP3"
76 do_compile() {
77         export TOOLCHAIN="${TOOLCHAIN_PATH}"
78         export PLAT_CC="${CC}"
79         export PLAT_CPP="${CXX}"
80         export PLAR_AR="${AR}"
82         if [ ${SUPPORT_XORG} -eq 1 ] ; then
83                 export X11ROOT="${STAGING_DIR_HOST}/usr"
84                 mkdir -p ${S}/demos/x11
85                 mkdir -p ${S}/trainingcourses/x11
86         fi
88         mkdir -p ${S}/demos/raw
89         mkdir -p ${S}/trainingcourses/raw
91         # Rebuild demos
92         for X11BUILD in 0 1 ; do
93                 # Don't rebuild demos with X11 support for a non X11 distro
94                 if [ ${SUPPORT_XORG} -eq 0 -a $X11BUILD -eq 1 ] ; then
95                         continue
96                 fi
98                 for demo in ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Demos/* ; do
99                         cd $demo/OGLES/Build/LinuxGeneric
100                         oe_runmake Common=1 PLATFORM=${PLATFORM} X11BUILD=$X11BUILD
101                         rm $demo/OGLES/Build/${PLATFORM}/Release*/*.o
103                         if [ $X11BUILD -eq 1 ] ; then
104                                 install -m 0755 $demo/OGLES/Build/${PLATFORM}/ReleaseX11/* ${S}/demos/x11 || true
105                                 sed -e s:NAME:$(basename $demo): \
106                                     -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES/Build/${PLATFORM}/ReleaseX11/*): \
107                                     ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo).desktop
108                         else
109                                 install -m 0755 $demo/OGLES/Build/${PLATFORM}/ReleaseRaw/* ${S}/demos/raw || true
110                         fi
111                 done
113                 for demo in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Demos/* ; do
114                         cd $demo/OGLES2/Build/LinuxGeneric
115                         oe_runmake Common=1 PLATFORM=${PLATFORM} X11BUILD=$X11BUILD
116                         rm -f $demo/OGLES2/Build/${PLATFORM}/Release*/*.o
118                         if [ $X11BUILD -eq 1 ] ; then
119                                 install -m 0755 $demo/OGLES2/Build/${PLATFORM}/ReleaseX11/* ${S}/demos/x11 || true
120                                 sed -e s:NAME:$(basename $demo): \
121                                     -e s:EXEC:${bindir}/SGX/demos/X11/$(basename $demo/OGLES2/Build/${PLATFORM}/ReleaseX11/*): \
122                                     ${WORKDIR}/sample.desktop > ${WORKDIR}/$(basename $demo).desktop
123                         else
124                                 install -m 0755 $demo/OGLES2/Build/${PLATFORM}/ReleaseRaw/* ${S}/demos/raw || true
125                         fi
126                 done
127         done
129         find ${S} -name "*_org" -delete
131         # Build OGLES2 Trainingcourses
132         for X11BUILD in 0 1 ; do
133                 # Don't rebuild training courses with X11 support for a non X11 distro
134                 if [ ${SUPPORT_XORG} -eq 0 -a $X11BUILD -eq 1 ] ; then
135                         continue
136                 fi
138                 for training in ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/TrainingCourse/* ; do
139                         if [ -e $training/OGLES2/Build/LinuxGeneric/Makefile ] ; then
140                                 cd $training/OGLES2/Build/LinuxGeneric
141                         fi
143                         if [ -e $training/OGLES2/Build/${PLATFORM}/Makefile ] ; then
144                                 cd $training/OGLES2/Build/${PLATFORM}
145                         fi
147                         oe_runmake Common=1 PLATFORM=${PLATFORM} X11BUILD=$X11BUILD
148                         rm -f $training/OGLES2/Build/${PLATFORM}/Release*/*.o
150                         if [ $X11BUILD -eq 1 ] ; then
151                                 install -m 0755 $training/OGLES2/Build/${PLATFORM}/ReleaseX11/* ${S}/trainingcourses/x11 || true
152                         else
153                                 install -m 0755 $training/OGLES2/Build/${PLATFORM}/ReleaseRaw/* ${S}/trainingcourses/raw || true
154                         fi
155                 done
156         done
160 do_install () {
161         install -d ${D}${libdir}
162         cp -pPR ${BINLOCATION}/*.so* ${D}${libdir}
163         install -m 0644 ${BINLOCATION}/*.a ${D}${libdir}
165         install -d ${D}${bindir}/
166         install -m 0755 ${WORKDIR}/cputype ${D}${bindir}/
168         install -m 0755 ${BINLOCATION}/*_test ${D}${bindir}/
169         install -m 0755 ${BINLOCATION}/gl* ${D}${bindir}/
170         install -m 0755 ${BINLOCATION}/${PVR_INIT} ${D}${bindir}/
172         if [ ${SUPPORT_XORG} -eq 1 ] ; then
173                 install -m 0755 ${BINLOCATION}/xgles1test1 ${D}${bindir}/
174                 install -m 0755 ${BINLOCATION}/freedesktop/kdrive/usr/X11R6_SGX/bin/Xsgx ${D}${bindir}/|| true
175                 cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/${PLATFORM}/lib/*X11WS* ${D}${libdir} || true
176         fi
178         install -d ${D}${includedir}
179         cp -pPR ${S}/GFX_Linux_KM/include4 ${D}${includedir}/
180         cp -pPR ${S}/GFX_Linux_KM/services4 ${D}${includedir}/
182         cp -pPR ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/Include/* ${D}${includedir}/
183         cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/Include/* ${D}${includedir}/
184         cp -pPR ${S}/GFX_Linux_SDK/OGLES/SDKPackage/Builds/OGLES/${PLATFORM}/Include/GLES/* ${D}${includedir}/GLES/ || true
185         cp -pPr ${S}/GFX_Linux_SDK/OGLES2/SDKPackage/Builds/OGLES2/${PLATFORM}/Include/GLES/* ${D}${includedir}/GLES2/ || true
186         cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/v* ${D}${includedir}/ || true
187         cp -pPr ${S}/GFX_Linux_SDK/OVG/SDKPackage/Builds/OVG/Include/V* ${D}${includedir}/ || true
188         cp -pPr ${S}/include/*.h ${D}${includedir} || true
189         cp -pPr ${S}/include/wsegl/*.h ${D}${includedir} || true
190         
191         install -d ${D}${sysconfdir}/init.d/
192         cp -pP ${WORKDIR}/rc.pvr ${D}${sysconfdir}/init.d/pvr-init
194         install -d ${D}${sysconfdir}
195         echo "[default]" > ${D}${sysconfdir}/powervr.ini
196         echo "WindowSystem=${LIBGLESWINDOWSYSTEM}" >> ${D}${sysconfdir}/powervr.ini
198         # The ES2.x, ES3.x, ES5.x and ES6.x CPUs have different SGX hardware, so we need to install multiple sets of userspace
200         install -d ${D}${libdir}/ES8.0
201         install -d ${D}${libdir}/ES6.0
202         install -d ${D}${libdir}/ES5.0
203         install -d ${D}${libdir}/ES3.0
204         install -d ${D}${libdir}/ES2.0
206         install -d ${D}${bindir}/ES8.0
207         install -d ${D}${bindir}/ES6.0
208         install -d ${D}${bindir}/ES5.0
209         install -d ${D}${bindir}/ES3.0
210         install -d ${D}${bindir}/ES2.0
212         shared_prog="eglinfo pvr2d_test ${PVR_INIT} services_test sgx_blit_test sgx_clipblit_test sgx_flip_test sgx_init_test sgx_render_flip_test"
213         raw_prog="gles1test1 gles2test1 ovg_unit_test"
214         x11_prog="eglinfo_x xgles1test1 xgles2test1 xmultiegltest xovg_unit_test"
216         for esrev in 2 3 5 6 8 ; do
217                 ESLOCATION=$(eval echo $(echo \$\{ES${esrev}LOCATION\}))
218                 if [ -e ${ESLOCATION} ] ; then
219                         cp -pPR ${ESLOCATION}/lib*${IMGPV} ${ESLOCATION}/pvr_drv.so ${ESLOCATION}/*.a ${D}${libdir}/ES${esrev}.0/
220                         for esprog in $shared_prog $raw_prog ${@base_contains('DISTRO_FEATURES', 'x11',"$x11_prog","",d)} ; do
221                                 install -m 0755 ${ESLOCATION}/$esprog ${D}${bindir}/ES${esrev}.0/ || true
222                         done
223                 fi
224         done
226         rm ${D}${bindir}/ES*/*.h ${D}${bindir}/ES*/pdsasm ${D}${bindir}/pdsasm -f || true
228         install -d ${D}${prefix}/share/applications
229         cp ${WORKDIR}/*.desktop ${D}${prefix}/share/applications
230         rm ${D}${prefix}/share/applications/sample.desktop
232         if [ ${SUPPORT_XORG} -eq 1 ] ; then
233                 install -d ${D}${bindir}/SGX/demos/X11/
234                 install -m 0755 ${S}/demos/x11/* ${D}${bindir}/SGX/demos/X11/
235                 install -d ${D}${bindir}/SGX/trainingcourses/X11
236                 install -m 0755 ${S}/trainingcourses/x11/* ${D}${bindir}/SGX/trainingcourses/X11/
237         fi
239         install -d ${D}${bindir}/SGX/demos/Raw/
240         install -m 0755 ${S}/demos/raw/* ${D}${bindir}/SGX/demos/Raw/
241         install -d ${D}${bindir}/SGX/trainingcourses/Raw
242         install -m 0755 ${S}/trainingcourses/raw/* ${D}${bindir}/SGX/trainingcourses/Raw/
245         # Delete objects and linker scripts hidden between the headers
246         find ${D} -name "*.o" -delete
247         find ${D} -name "*.o.cmd" -delete
249         install -d ${D}${sysconfdir}/udev/rules.d
250         install -m 0644 ${WORKDIR}/99-bufferclass.rules ${D}${sysconfdir}/udev/rules.d/
254 PACKAGES =+ "${@base_contains('DISTRO_FEATURES', 'x11',"${PN}-x11demos ${PN}-x11trainingcourses xserver-kdrive-powervrsgx" ,"", d)}  \
255              ${PN}-rawdemos ${PN}-rawtrainingcourses ${PN}-tests"
256 # Package the base libraries per silicon revision
257 PACKAGES =+ "${PN}-es2 ${PN}-es3 ${PN}-es5 ${PN}-es6 ${PN}-es8"
258 RRECOMMENDS_${PN} += "${PN}-es2 ${PN}-es3 ${PN}-es5 ${PN}-es6 ${PN}-es8"
259 FILES_${PN}-es2 = "${libdir}/ES2*/* ${bindir}/ES2*/*"
260 FILES_${PN}-es3 = "${libdir}/ES3*/* ${bindir}/ES3*/*"
261 FILES_${PN}-es5 = "${libdir}/ES5*/* ${bindir}/ES5*/*"
262 FILES_${PN}-es6 = "${libdir}/ES6*/* ${bindir}/ES6*/*"
263 FILES_${PN}-es8 = "${libdir}/ES8*/* ${bindir}/ES8*/*"
265 # Stop shlib code from picking a subpackage
266 PRIVATE_LIBS_${PN}-es2 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
267 PRIVATE_LIBS_${PN}-es3 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
268 PRIVATE_LIBS_${PN}-es5 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
269 PRIVATE_LIBS_${PN}-es6 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
270 PRIVATE_LIBS_${PN}-es8 = "libGLESv2.so libIMGegl.so libsrv_um.so libOpenVG.so libpvr2d.so libsrv_init.so libEGL.so libsrv_um_dri.so libOpenVGU.so libglslcompiler.so libGLES_CM.so"
273 PACKAGES =+ "${PN}-blitwsegl ${PN}-flipwsegl ${PN}-frontwsegl ${PN}-linuxfbwsegl"
274 PACKAGES =+ "${@base_contains('DISTRO_FEATURES', 'x11',"${PN}-x11wsegl ${PN}-driwsegl" ,"", d)}"
275 FILES_${PN}-blitwsegl = "${libdir}/libpvrPVR2D_BLITWSEGL.so.*"
276 FILES_${PN}-flipwsegl = "${libdir}/libpvrPVR2D_FLIPWSEGL.so.*"
277 FILES_${PN}-frontwsegl = "${libdir}/libpvrPVR2D_FRONTWSEGL.so.*"
278 FILES_${PN}-linuxfbwsegl = "${libdir}/libpvrPVR2D_LINUXFBWSEGL.so.*"
279 FILES_${PN}-x11wsegl = "${libdir}/libpvrPVR2D_X11WSEGL.so* ${bindir}/x* ${bindir}/*x"
280 FILES_${PN}-driwsegl = "${libdir}/libpvrPVR2D_DRIWSEGL.so* ${libdir}/libsrv_um_dri*"
282 PACKAGES =+ "${PN}-blitwsegl-es2 ${PN}-blitwsegl-es3 ${PN}-blitwsegl-es5 ${PN}-blitwsegl-es6 ${PN}-blitwsegl-es8 ${PN}-flipwsegl-es2 ${PN}-flipwsegl-es3 ${PN}-flipwsegl-es5 ${PN}-flipwsegl-es6 ${PN}-flipwsegl-es8 ${PN}-frontwsegl-es2 ${PN}-frontwsegl-es3 ${PN}-frontwsegl-es5 ${PN}-frontwsegl-es6 ${PN}-frontwsegl-es8 ${PN}-linuxfbwsegl-es2 ${PN}-linuxfbwsegl-es3 ${PN}-linuxfbwsegl-es5 ${PN}-linuxfbwsegl-es6 ${PN}-linuxfbwsegl-es8"
284 X11_SEGL = " ${PN}-x11wsegl-es2 ${PN}-x11wsegl-es3 ${PN}-x11wsegl-es5 ${PN}-x11wsegl-es6 ${PN}-x11wsegl-es8 ${PN}-driwsegl-es2 ${PN}-driwsegl-es3 ${PN}-driwsegl-es5 ${PN}-driwsegl-es6 ${PN}-driwsegl-es8 "
285 PACKAGES =+ "${@base_contains('DISTRO_FEATURES', 'x11',"${X11_SEGL}" ,"", d)}"
286 FILES_${PN}-blitwsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_BLITWSEGL.so.*"
287 FILES_${PN}-blitwsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_BLITWSEGL.so.*"
288 FILES_${PN}-blitwsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_BLITWSEGL.so.*"
289 FILES_${PN}-blitwsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_BLITWSEGL.so.*"
290 FILES_${PN}-blitwsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_BLITWSEGL.so.*"
291 RRECOMMENDS_${PN}-blitwsegl = " ${PN}-blitwsegl-es2 ${PN}-blitwsegl-es3 ${PN}-blitwsegl-es5 ${PN}-blitwsegl-es6 ${PN}-blitwsegl-es8"
293 FILES_${PN}-flipwsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_FLIPWSEGL.so.*"
294 FILES_${PN}-flipwsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_FLIPWSEGL.so.*"
295 FILES_${PN}-flipwsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_FLIPWSEGL.so.*"
296 FILES_${PN}-flipwsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_FLIPWSEGL.so.*"
297 FILES_${PN}-flipwsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_FLIPWSEGL.so.*"
298 RRECOMMENDS_${PN}-flipwsegl = " ${PN}-flipwsegl-es2 ${PN}-flipwsegl-es3 ${PN}-flipwsegl-es5 ${PN}-flipwsegl-es6 ${PN}-flipwsegl-es8"
300 FILES_${PN}-frontwsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_FRONTWSEGL.so.*"
301 FILES_${PN}-frontwsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_FRONTWSEGL.so.*"
302 FILES_${PN}-frontwsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_FRONTWSEGL.so.*"
303 FILES_${PN}-frontwsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_FRONTWSEGL.so.*"
304 FILES_${PN}-frontwsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_FRONTWSEGL.so.*"
305 RRECOMMENDS_${PN}-frontwsegl = " ${PN}-frontwsegl-es2 ${PN}-frontwsegl-es3 ${PN}-frontwsegl-es5 ${PN}-frontwsegl-es6 ${PN}-frontwsegl-es8"
307 FILES_${PN}-linuxfbwsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_LINUXFBWSEGL.so.*"
308 FILES_${PN}-linuxfbwsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_LINUXFBWSEGL.so.*"
309 FILES_${PN}-linuxfbwsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_LINUXFBWSEGL.so.*"
310 FILES_${PN}-linuxfbwsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_LINUXFBWSEGL.so.*"
311 FILES_${PN}-linuxfbwsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_LINUXFBWSEGL.so.*"
312 RRECOMMENDS_${PN}-linuxfbwsegl = " ${PN}-linuxfbwsegl-es2 ${PN}-linuxfbwsegl-es3 ${PN}-linuxfbwsegl-es5 ${PN}-linuxfbwsegl-es6 ${PN}-linuxfbwsegl-es8"
314 FILES_${PN}-x11wsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_X11WSEGL.so.* ${bindir}/ES2*/x* ${bindir}/ES2*/*x"
315 FILES_${PN}-x11wsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_X11WSEGL.so.* ${bindir}/ES3*/x* ${bindir}/ES3*/*x"
316 FILES_${PN}-x11wsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_X11WSEGL.so.* ${bindir}/ES5*/x* ${bindir}/ES5*/*x"
317 FILES_${PN}-x11wsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_X11WSEGL.so.* ${bindir}/ES6*/x* ${bindir}/ES6*/*x"
318 FILES_${PN}-x11wsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_X11WSEGL.so.* ${bindir}/ES8*/x* ${bindir}/ES8*/*x"
319 RRECOMMENDS_${PN}-x11wsegl = " ${PN}-x11wsegl-es2 ${PN}-x11wsegl-es3 ${PN}-x11wsegl-es5 ${PN}-x11wsegl-es6 ${PN}-x11wsegl-es8"
321 FILES_${PN}-driwsegl-es2 = "${libdir}/ES2*/libpvrPVR2D_DRIWSEGL.so.* ${libdir}/ES2*/libsrv_um_dri*"
322 FILES_${PN}-driwsegl-es3 = "${libdir}/ES3*/libpvrPVR2D_DRIWSEGL.so.* ${libdir}/ES3*/libsrv_um_dri*"
323 FILES_${PN}-driwsegl-es5 = "${libdir}/ES5*/libpvrPVR2D_DRIWSEGL.so.* ${libdir}/ES5*/libsrv_um_dri*"
324 FILES_${PN}-driwsegl-es6 = "${libdir}/ES6*/libpvrPVR2D_DRIWSEGL.so.* ${libdir}/ES6*/libsrv_um_dri*"
325 FILES_${PN}-driwsegl-es8 = "${libdir}/ES8*/libpvrPVR2D_DRIWSEGL.so.* ${libdir}/ES8*/libsrv_um_dri*"
326 RRECOMMENDS_${PN}-driwsegl = " ${PN}-driwsegl-es2 ${PN}-driwsegl-es3 ${PN}-driwsegl-es5 ${PN}-driwsegl-es6 ${PN}-driwsegl-es8"
328 CONFFILES_${PN} = "${sysconfdir}/powervr.ini"
330 FILES_${PN} = "${sysconfdir} ${libdir}/*.so* ${bindir}/${PVR_INIT} ${bindir}/cputype ${bindir}/*"
332 FILES_xserver-kdrive-powervrsgx = "${bindir}/Xsgx"
333 FILES_${PN}-tests = "${bindir}/*test*"
334 FILES_${PN}-dbg = "${libdir}/.debug/* ${bindir}/.debug/* \
335                    ${libdir}/ES*/.debug ${bindir}/*/.debug\
336                    ${bindir}/SGX/demos/*/.debug/* \
337                    ${bindir}/SGX/trainingcourses/*/.debug/* \
338         "
340 FILES_${PN}-rawdemos = "${bindir}/SGX/demos/Raw/*"
341 FILES_${PN}-x11demos = "${bindir}/SGX/demos/X11/* ${prefix}/share/applications "
342 RRECOMMENDS_${PN}-x11demos = "${PN}-x11wsegl"
344 FILES_${PN}-rawtrainingcourses = "${bindir}/SGX/trainingcourses/Raw/*"
345 FILES_${PN}-x11trainingcourses = "${bindir}/SGX/trainingcourses/X11/*"
346 RRECOMMENDS_${PN}-x11trainingcourses = "${PN}-x11wsegl"
348 # The libs need the kernel-modules
349 RRECOMMENDS_${PN} += "omap3-sgx-modules"
351 # The initscript calls fbset, cputype calls devmem2
352 RDEPENDS_${PN} += "fbset devmem2"
354 #HACK! These are binaries, so we can't guarantee that LDFLAGS match :(
355 INSANE_SKIP_${PN} = "ldflags dev-so"
356 INSANE_SKIP_${PN}-blitwsegl = "ldflags"
357 INSANE_SKIP_${PN}-flipwsegl = "ldflags"
358 INSANE_SKIP_${PN}-frontwsegl = "ldflags"
359 INSANE_SKIP_${PN}-linuxfbwsegl = "ldflags"
360 INSANE_SKIP_${PN}-x11wsegl = "ldflags dev-so"
361 INSANE_SKIP_${PN}-driwsegl = "ldflags dev-so"
362 INSANE_SKIP_${PN}-tests = "ldflags"
363 INSANE_SKIP_xserver-kdrive-powervrsgx = "ldflags"
365 # Quality control is really poor on these SDKs, so hack around the latest madness:
366 FILES_${PN} += "${libdir}/*.so "
367 FILES_${PN}-dev = "${includedir}"
369 inherit update-rc.d
371 INITSCRIPT_NAME = "pvr-init"
372 INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
374 # Append to update-rc.d postinst
375 pkg_postinst_${PN}_append() {
376 rm -f $D${sysconfdir}/powervr-esrev
378 if [ ${SUPPORT_XORG} -eq 1 ] ; then
379         ln -sf /usr/lib/libXdmcp.so.6.0.0 /usr/lib/libXdmcp.so.0
380         ln -sf /usr/lib/libXau.so.6.0.0 /usr/lib/libXau.so.0
381 fi
385 pkg_postinst_${PN}-blitwsegl() {
386 rm -f $D${sysconfdir}/powervr-esrev
389 pkg_postinst_${PN}-flipwsegl() {
390 rm -f $D${sysconfdir}/powervr-esrev
393 pkg_postinst_${PN}-frontwsegl() {
394 rm -f $D${sysconfdir}/powervr-esrev
396 pkg_postinst_${PN}-linuxfbwsegl() {
397 rm -f $D${sysconfdir}/powervr-esrev
400 pkg_postinst_${PN}-x11wsegl() {
401 rm -f $D${sysconfdir}/powervr-esrev
403 echo "[default]" > $D${sysconfdir}/powervr.ini
404 echo "WindowSystem=libpvrPVR2D_X11WSEGL.so.1" >> $D${sysconfdir}/powervr.ini
407 pkg_postinst_${PN}-driwsegl() {
408 rm -f $D${sysconfdir}/powervr-esrev