2013-10-11 13:46:34 +02:00
|
|
|
DESCRIPTION = "libGLES for the A10/A13 Allwinner processor with Mali 400 (X11)"
|
|
|
|
|
2014-09-25 13:48:59 +02:00
|
|
|
LICENSE = "Proprietary"
|
2014-07-01 22:30:42 +02:00
|
|
|
LIC_FILES_CHKSUM = "file://README;md5=1b81a178e80ee888ee4571772699ab2c"
|
2013-10-11 13:46:34 +02:00
|
|
|
|
2016-12-14 20:49:57 +01:00
|
|
|
COMPATIBLE_MACHINE = "(sun4i|sun5i|sun7i|sun8i)"
|
2013-10-11 13:46:34 +02:00
|
|
|
|
2013-10-19 09:12:31 +02:00
|
|
|
# These libraries shouldn't get installed in world builds unless something
|
|
|
|
# explicitly depends upon them.
|
|
|
|
EXCLUDE_FROM_WORLD = "1"
|
|
|
|
PROVIDES = "virtual/libgles1 virtual/libgles2 virtual/egl"
|
2016-09-06 11:50:25 +02:00
|
|
|
|
|
|
|
# There's only hardfp version available
|
|
|
|
python __anonymous() {
|
2016-12-03 12:31:57 +01:00
|
|
|
tunes = d.getVar("TUNE_FEATURES", True)
|
2016-09-06 11:50:25 +02:00
|
|
|
if not tunes:
|
|
|
|
return
|
|
|
|
if "callconvention-hard" not in tunes:
|
2016-12-03 12:31:57 +01:00
|
|
|
pkgn = d.getVar("PN", True)
|
|
|
|
pkgv = d.getVar("PV", True)
|
2016-09-06 11:50:25 +02:00
|
|
|
raise bb.parse.SkipPackage("%s-%s ONLY supports hardfp mode for now" % (pkgn, pkgv))
|
|
|
|
}
|
2013-10-11 13:46:34 +02:00
|
|
|
|
2014-07-01 22:30:42 +02:00
|
|
|
SRCREV_pn-${PN} = "d343311efc8db166d8371b28494f0f27b6a58724"
|
2015-06-16 23:36:45 +02:00
|
|
|
SRC_URI = "gitsm://github.com/linux-sunxi/sunxi-mali.git \
|
2015-09-22 17:02:06 +02:00
|
|
|
file://0001-Add-EGLSyncKHR-EGLTimeKHR-and-GLChar-definition.patch \
|
|
|
|
file://0002-Add-missing-GLchar-definition.patch \
|
|
|
|
file://0003-Fix-sed-to-replace-by-the-correct-var.patch \
|
2015-09-25 05:43:58 +02:00
|
|
|
file://0001-fix-test-build.patch \
|
2015-09-22 17:02:06 +02:00
|
|
|
"
|
2013-10-11 13:46:34 +02:00
|
|
|
|
|
|
|
S = "${WORKDIR}/git"
|
|
|
|
|
2019-09-07 16:38:48 +02:00
|
|
|
DEPENDS = "libdrm xorgproto libump patchelf-native"
|
2014-04-08 12:06:01 +02:00
|
|
|
|
2016-06-05 00:00:15 +02:00
|
|
|
PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'x11', '', d)} ${@bb.utils.contains('DISTRO_FEATURES', 'wayland', 'wayland', '', d)}"
|
2014-04-08 12:06:01 +02:00
|
|
|
PACKAGECONFIG[wayland] = "EGL_TYPE=framebuffer,,,"
|
|
|
|
PACKAGECONFIG[x11] = "EGL_TYPE=x11,,virtual/libx11 libxau libxdmcp libdri2,"
|
|
|
|
|
2015-09-22 17:02:06 +02:00
|
|
|
# Inhibit warnings about files being stripped, we can't do anything about it.
|
|
|
|
INHIBIT_PACKAGE_DEBUG_SPLIT = "1"
|
2014-07-01 22:30:42 +02:00
|
|
|
INHIBIT_PACKAGE_STRIP = "1"
|
2015-09-23 09:00:18 +02:00
|
|
|
INHIBIT_SYSROOT_STRIP = "1"
|
2014-04-08 12:06:01 +02:00
|
|
|
|
2013-10-17 13:53:56 +02:00
|
|
|
do_configure() {
|
2016-06-04 23:58:10 +02:00
|
|
|
DESTDIR=${D}/ VERSION=r3p0 ABI=armhf make ${EXTRA_OEMAKE} config
|
2013-10-11 13:46:34 +02:00
|
|
|
}
|
|
|
|
|
2013-10-17 13:53:56 +02:00
|
|
|
do_install() {
|
2015-09-22 17:02:06 +02:00
|
|
|
make -f Makefile.pc
|
|
|
|
|
|
|
|
# install headers
|
|
|
|
install -d -m 0755 ${D}${includedir}/EGL
|
|
|
|
install -m 0755 ${S}/include/EGL/*.h ${D}${includedir}/EGL/
|
|
|
|
install -d -m 0755 ${D}${includedir}/GLES
|
|
|
|
install -m 0755 ${S}/include/GLES/*.h ${D}${includedir}/GLES/
|
|
|
|
install -d -m 0755 ${D}${includedir}/GLES2
|
|
|
|
install -m 0755 ${S}/include/GLES2/*.h ${D}${includedir}/GLES2/
|
|
|
|
install -d -m 0755 ${D}${includedir}/KHR
|
|
|
|
install -m 0755 ${S}/include/KHR/*.h ${D}${includedir}/KHR/
|
|
|
|
|
|
|
|
# Copy the .pc files
|
|
|
|
install -d -m 0755 ${D}${libdir}/pkgconfig
|
|
|
|
install -m 0644 ${S}/egl.pc ${D}${libdir}/pkgconfig/
|
|
|
|
install -m 0644 ${S}/gles_cm.pc ${D}${libdir}/pkgconfig/
|
|
|
|
install -m 0644 ${S}/glesv2.pc ${D}${libdir}/pkgconfig/
|
|
|
|
|
2013-10-29 22:38:45 +01:00
|
|
|
install -d ${D}${libdir}
|
|
|
|
install -d ${D}${includedir}
|
2014-09-29 22:19:37 +02:00
|
|
|
|
2013-10-29 22:38:45 +01:00
|
|
|
make libdir=${D}${libdir}/ includedir=${D}${includedir}/ install
|
|
|
|
make libdir=${D}${libdir}/ includedir=${D}${includedir}/ install -C include
|
|
|
|
|
2014-02-15 10:36:56 +01:00
|
|
|
# Fix .so name and create symlinks, binary package provides .so wich can't be included directly in package without triggering the 'dev-so' QA check
|
|
|
|
# Packages like xf86-video-fbturbo dlopen() libUMP.so, so we do need to ship the .so files in ${PN}
|
2013-10-29 22:38:45 +01:00
|
|
|
|
|
|
|
mv ${D}${libdir}/libMali.so ${D}${libdir}/libMali.so.3
|
2019-09-07 16:38:48 +02:00
|
|
|
patchelf --set-soname libMali.so.3 ${D}${libdir}/libMali.so.3
|
2013-10-29 22:38:45 +01:00
|
|
|
ln -sf libMali.so.3 ${D}${libdir}/libMali.so
|
|
|
|
|
|
|
|
for flib in libEGL.so.1.4 libGLESv1_CM.so.1.1 libGLESv2.so.2.0 ; do
|
|
|
|
rm ${D}${libdir}/$flib
|
|
|
|
ln -sf libMali.so.3 ${D}${libdir}/$flib
|
|
|
|
done
|
2015-09-25 05:43:58 +02:00
|
|
|
|
2016-06-04 23:58:10 +02:00
|
|
|
DESTDIR=${D}/ VERSION=r3p0 ABI=armhf make ${EXTRA_OEMAKE} test
|
2015-09-25 05:43:58 +02:00
|
|
|
install -d ${D}${bindir}
|
|
|
|
install -m 0755 ${S}/test/test ${D}${bindir}/sunximali-test
|
2013-10-11 13:46:34 +02:00
|
|
|
}
|
2013-10-29 22:38:45 +01:00
|
|
|
|
2014-02-15 10:36:56 +01:00
|
|
|
# Packages like xf86-video-fbturbo dlopen() libUMP.so, so we do need to ship the .so files in ${PN}
|
2015-09-25 05:43:58 +02:00
|
|
|
PACKAGES =+ "${PN}-test"
|
2016-09-06 11:50:25 +02:00
|
|
|
|
|
|
|
RPROVIDES_${PN} += "libGLESv2.so libEGL.so libGLESv2.so libGLESv1_CM.so libMali.so"
|
2016-12-14 20:55:47 +01:00
|
|
|
RDEPENDS_${PN}-test = "${PN}"
|
2016-09-06 11:50:25 +02:00
|
|
|
|
2014-02-15 10:36:56 +01:00
|
|
|
FILES_${PN} += "${libdir}/lib*.so"
|
2015-09-22 17:02:06 +02:00
|
|
|
FILES_${PN}-dev = "${includedir} ${libdir}/pkgconfig/*"
|
2015-09-25 05:43:58 +02:00
|
|
|
FILES_${PN}-test = "${bindir}/sunximali-test"
|
2016-09-06 11:50:25 +02:00
|
|
|
|
2014-02-15 10:36:56 +01:00
|
|
|
# These are closed binaries generated elsewhere so don't check ldflags & text relocations
|
2015-09-25 23:52:56 +02:00
|
|
|
INSANE_SKIP_${PN} = "dev-so ldflags textrel"
|
2016-12-14 20:55:47 +01:00
|
|
|
INSANE_SKIP_${PN}-test = "dev-so ldflags textrel"
|