summaryrefslogtreecommitdiffstats
path: root/meta-rcar-gen2/recipes-graphics/gles-module/gles-test-module.bb
blob: 7a8fcb9ecf2043e7488c120bfabcb9b651103d9f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
DESCRIPTION = "RGX/SGX unit test module"
LICENSE = "CLOSED"
DEPENDS += "gles-kernel-module gles-user-module"
PN = "gles-test-module"
PR = "r0"
OPENGLES3 ?= "0"

COMPATIBLE_MACHINE = "(r8a7790|r8a7791|r8a7793|r8a7794)"
PACKAGE_ARCH = "${MACHINE_ARCH}"

SRC_URI = '${@base_conditional( "OPENGLES3", "1", "file://gles3-sample-unittest.tar.bz2", "file://gles2-sample-unittest.tar.bz2", d )}'
S = '${@base_conditional( "OPENGLES3", "1", "${WORKDIR}/gles3-sample-unittest", "${WORKDIR}/gles2-sample-unittest", d )}'

do_patch[noexec] = "1"
do_configure[noexec] = "1"
do_populate_lic[noexec] = "1"

do_compile() {
	cd ${S}
	make PKGROOT=${STAGING_DIR_HOST} LIBDRMROOT=${STAGING_DIR_HOST}${prefix}
}

do_install() {
	# Copy binary into sysroot
	mkdir -p ${D}/usr/local/bin/
	if [ "X${OPENGLES3}" = "X0" ]; then
		cp ${S}/OES2_Texture ${D}/usr/local/bin/
		cp ${S}/FragShaderSample.fsh ${D}/usr/local/bin/
		cp ${S}/VertShaderSample.vsh ${D}/usr/local/bin/
	else
		cp ${S}/OES3_Texture ${D}/usr/local/bin/
		cp ${S}/OES3_FragShaderSample.fsh ${D}/usr/local/bin/
		cp ${S}/OES3_VertShaderSample.vsh ${D}/usr/local/bin/
	fi
}

PACKAGES = "\
  ${PN} \
  "
FILES_${PN} = " \
  /usr/local/bin/* \
"
RPROVIDES_${PN} += "gles-test-module"
INSANE_SKIP_${PN} += "ldflags"
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"