Install sunxi-mali libraries correctly

This commit is contained in:
Nicolas Aguirre 2013-10-19 09:12:31 +02:00
parent e49b51acea
commit 7b3b7ca8ac

View File

@ -5,46 +5,42 @@ INC_PR = "r2"
LIC_FILES_CHKSUM = "file://README;md5=a103ac69c166fcd98a67a9917dd7affd"
COMPATIBLE_MACHINE = "(mele|cubieboard)"
COMPATIBLE_MACHINE = "(mele|cubieboard|cubieboard2)"
DEPENDS = "virtual/libx11 libxau libxdmcp libdrm dri2proto libdri2"
PROVIDES += "virtual/egl virtual/libgles1 virtual/libgles2"
# 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"
RPROVIDES_${PN} = "libegl libgles1 libgles2"
RPROVIDES_${PN}-dev = "libegl-dev libgles1-dev libgles2-dev"
RPROVIDES_${PN}-dbg = "libegl-dbg libgles1-dbg libgles2-dbg"
inherit distro_features_check
REQUIRED_DISTRO_FEATURES = "opengl"
SRCREV_pn-${PN} = "0809383f9d3ee2575da52262a639ddd6464a641f"
SRC_URI = "gitsm://github.com/linux-sunxi/sunxi-mali.git;protocol=http"
S = "${WORKDIR}/git"
# These are closed binaries generated elsewhere so don't check ldflags & text relocations
INSANE_SKIP_${PN} = "ldflags textrel"
do_configure() {
DESTDIR=${D}/ VERSION=r3p0 ABI=armhf EGL_TYPE=x11 make config
}
do_install() {
mkdir -p ${D}${libdir}
mkdir -p ${D}${libdir}
mkdir -p {$D}{includedir}
make libdir=${D}${libdir}/ includedir=${D}${includedir}/ install
make libdir=${D}${libdir}/ includedir=${D}${includedir}/ install -C include
# Fix .so name and create symlinks, binary package provides .so wich can't be included directly in package
rm ${D}${libdir}/libEGL.so.1.4
ln -sf libMali.so.3 ${D}${libdir}/libEGL.so.1.4
rm ${D}${libdir}/libGLESv1_CM.so.1.1
ln -sf libMali.so.3 ${D}${libdir}/libGLESv1_CM.so.1.1
rm ${D}${libdir}/libGLESv2.so.2.0
ln -sf libMali.so.3 ${D}${libdir}/libGLESv2.so.2.0
mv ${D}${libdir}/libMali.so ${D}${libdir}/libMali.so.3
ln -sf libMali.so.3.0 ${D}${libdir}/libMali.so
}
PACKAGES += "${PN}-es2"
PRIVATE_LIBS_${PN}-es2 = "libEGL.so libGLESv1_CM.so libGLESv2.so libMali.so libUMP.so"
FILES_${PN} = "*"
FILES_${PN}-es2 = "${libdir}/libEGL.so \
${libdir}/libEGL.so.* \
${libdir}/libGLESv1_CM.so \
${libdir}/libGLESv1_CM.so.* \
${libdir}/libGLESv2.so \
${libdir}/libGLESv2.so.* \
${libdir}/libMali.so \
${libdir}/libUMP.so \
${libdir}/libUMP.so.* \
${libdir}/*.so \
"