Patchwork [2/2] libxcb: don't hard-code package splitting

login
register
mail settings
Submitter Ross Burton
Date Dec. 23, 2013, 3:10 p.m.
Message ID <1387811410-6832-2-git-send-email-ross.burton@intel.com>
Download mbox | patch
Permalink /patch/63679/
State Accepted
Commit ace19818e1db34157ed1585056510618616f6a47
Headers show

Comments

Ross Burton - Dec. 23, 2013, 3:10 p.m.
Instead of having a log PACKAGES list and a correspondingly long FILES_ list,
just use do_split_packages.

Signed-off-by: Ross Burton <ross.burton@intel.com>
---
 meta/recipes-graphics/xorg-lib/libxcb.inc |   35 +++++------------------------
 1 file changed, 5 insertions(+), 30 deletions(-)

Patch

diff --git a/meta/recipes-graphics/xorg-lib/libxcb.inc b/meta/recipes-graphics/xorg-lib/libxcb.inc
index d75b26b..75a43a5 100644
--- a/meta/recipes-graphics/xorg-lib/libxcb.inc
+++ b/meta/recipes-graphics/xorg-lib/libxcb.inc
@@ -15,37 +15,12 @@  DEPENDS = "xcb-proto xproto libxau libxslt-native xcb-proto-native libpthread-st
 SRC_URI = "http://xcb.freedesktop.org/dist/libxcb-${PV}.tar.bz2 \
            file://xcbincludedir.patch"
 
-PACKAGES =+ "libxcb-composite libxcb-damage libxcb-dpms libxcb-glx \
-             libxcb-randr libxcb-record libxcb-render libxcb-res \
-             libxcb-screensaver libxcb-shape libxcb-shm libxcb-sync \
-             libxcb-xevie libxcb-xf86dri libxcb-xfixes libxcb-xlib \
-             libxcb-xprint libxcb-xtest libxcb-xv libxcb-xvmc \
-             libxcb-dri2 libxcb-dri3 libxcb-present"
+PACKAGES_DYNAMIC = "^libxcb-.*"
 
 FILES_${PN} = "${libdir}/libxcb.so.*"
-FILES_libxcb-dri2 = "${libdir}/libxcb-dri2.so.*"
-FILES_libxcb-dri3 = "${libdir}/libxcb-dri3.so.*"
-FILES_libxcb-composite = "${libdir}/libxcb-composite.so.*"
-FILES_libxcb-damage = "${libdir}/libxcb-damage.so.*"
-FILES_libxcb-dpms = "${libdir}/libxcb-dpms.so.*"
-FILES_libxcb-glx = "${libdir}/libxcb-glx.so.*"
-FILES_libxcb-randr = "${libdir}/libxcb-randr.so.*"
-FILES_libxcb-record = "${libdir}/libxcb-record.so.*"
-FILES_libxcb-render = "${libdir}/libxcb-render.so.*"
-FILES_libxcb-res = "${libdir}/libxcb-res.so.*"
-FILES_libxcb-screensaver = "${libdir}/libxcb-screensaver.so.*"
-FILES_libxcb-shape = "${libdir}/libxcb-shape.so.*"
-FILES_libxcb-shm = "${libdir}/libxcb-shm.so.*"
-FILES_libxcb-sync = "${libdir}/libxcb-sync.so.*"
-FILES_libxcb-xevie = "${libdir}/libxcb-xevie.so.*"
-FILES_libxcb-xf86dri = "${libdir}/libxcb-xf86dri.so.*"
-FILES_libxcb-xfixes = "${libdir}/libxcb-xfixes.so.*"
-FILES_libxcb-xinerama = "${libdir}/libxcb-xinerama.so.*"
-FILES_libxcb-xlib = "${libdir}/libxcb-xlib.so.*"
-FILES_libxcb-xprint = "${libdir}/libxcb-xprint.so.*"
-FILES_libxcb-xtest = "${libdir}/libxcb-xtest.so.*"
-FILES_libxcb-xv = "${libdir}/libxcb-xv.so.*"
-FILES_libxcb-xvmc = "${libdir}/libxcb-xvmc.so.*"
-FILES_libxcb-present = "${libdir}/libxcb-present.so.*"
 
 inherit autotools pkgconfig pythonnative
+
+python populate_packages_prepend () {
+    do_split_packages(d, '${libdir}', '^libxcb-(.*)\.so\..*$', 'libxcb-%s', 'XCB library module for %s', allow_links=True)
+}