summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhil Blundell <philb@gnu.org>2007-01-17 11:39:39 +0000
committerPhil Blundell <philb@gnu.org>2007-01-17 11:39:39 +0000
commit3a5963076c86e1c994d300dd0a439fbbda1451a0 (patch)
tree211e5ca27e956cb424cc8d566f0a80dbdc0d972b
parenteb485afd8f028a7d128d500f05418d88260e9c95 (diff)
add openchrome
-rw-r--r--classes/xorg-module.bbclass31
-rw-r--r--packages/openchrome/.mtn2git_empty0
-rw-r--r--packages/openchrome/configure.patch42
-rw-r--r--packages/openchrome/openchrome_svn.bb16
4 files changed, 89 insertions, 0 deletions
diff --git a/classes/xorg-module.bbclass b/classes/xorg-module.bbclass
new file mode 100644
index 0000000000..135ca31c16
--- /dev/null
+++ b/classes/xorg-module.bbclass
@@ -0,0 +1,31 @@
+python populate_packages_prepend () {
+ import re, os.path
+
+ new_packages = []
+
+ def the_hook(file, pkg, pattern, format, basename):
+ new_packages.append(pkg)
+
+ do_split_packages(d, root=bb.data.expand('${libdir}/xorg/modules/drivers', d), file_regex='(.*)_drv\.so', output_pattern='xorg-driver-%s', description='xorg %s driver', extra_depends='xserver-xorg', hook=the_hook)
+
+ packages = bb.data.getVar('PACKAGES', d, 1).split()
+
+ so_to_la_re = "\.so$"
+
+ # fish out any debug or devel files corresponding to the new packages
+ for p in new_packages:
+ packages.append("%s-dbg" % p)
+ packages.append("%s-dev" % p)
+
+ files = bb.data.getVar("FILES_%s" % p, d).split()
+ dev_files = []
+ dbg_files = []
+ for f in files:
+ dev_files.append(re.sub(so_to_la_re, ".la", f))
+ (dir, file) = os.path.split(f)
+ dbg_files.append(os.path.join(dir, ".debug", file))
+ bb.data.setVar("FILES_%s-dbg" % p, " ".join(dbg_files), d)
+ bb.data.setVar("FILES_%s-dev" % p, " ".join(dev_files), d)
+
+ bb.data.setVar('PACKAGES', ' '.join(packages), d)
+}
diff --git a/packages/openchrome/.mtn2git_empty b/packages/openchrome/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/openchrome/.mtn2git_empty
diff --git a/packages/openchrome/configure.patch b/packages/openchrome/configure.patch
new file mode 100644
index 0000000000..a2f236470d
--- /dev/null
+++ b/packages/openchrome/configure.patch
@@ -0,0 +1,42 @@
+--- trunk/configure.ac 2007-01-16 16:58:44.000000000 +0000
++++ trunk/configure.ac 2007-01-16 18:09:26.000000000 +0000
+@@ -69,11 +69,11 @@
+ AC_HEADER_STDC
+
+ if test "$DRI" != no; then
+- AC_CHECK_FILE([${sdkdir}/dri.h],
++ AC_CHECK_BUILD_FILE([${sdkdir}/dri.h],
+ [have_dri_h="yes"], [have_dri_h="no"])
+- AC_CHECK_FILE([${sdkdir}/sarea.h],
++ AC_CHECK_BUILD_FILE([${sdkdir}/sarea.h],
+ [have_sarea_h="yes"], [have_sarea_h="no"])
+- AC_CHECK_FILE([${sdkdir}/dristruct.h],
++ AC_CHECK_BUILD_FILE([${sdkdir}/dristruct.h],
+ [have_dristruct_h="yes"], [have_dristruct_h="no"])
+ fi
+
+@@ -113,7 +113,7 @@
+
+ AM_CONDITIONAL(XVMC, test x$XVMC = xyes)
+
+-AC_CHECK_FILE([${sdkdir}/xf86Module.h],
++AC_CHECK_BUILD_FILE([${sdkdir}/xf86Module.h],
+ [have_xf86Module_h="yes"], [have_xf86Module_h="no"])
+
+ # Check the ABI_VIDEODRV_VERSION
+--- /dev/null 2003-09-15 14:40:47.000000000 +0100
++++ trunk/m4/check-build.m4 2007-01-16 18:07:37.000000000 +0000
+@@ -0,0 +1,13 @@
++# Check for the existence of FILE.
++AC_DEFUN([AC_CHECK_BUILD_FILE],
++[AS_VAR_PUSHDEF([ac_File], [ac_cv_file_$1])dnl
++AC_CACHE_CHECK([for $1], ac_File,
++[if test -r "$1"; then
++ AS_VAR_SET(ac_File, yes)
++else
++ AS_VAR_SET(ac_File, no)
++fi])
++AS_IF([test AS_VAR_GET(ac_File) = yes], [$2], [$3])[]dnl
++AS_VAR_POPDEF([ac_File])dnl
++])# AC_CHECK_BUILD_FILE
++
diff --git a/packages/openchrome/openchrome_svn.bb b/packages/openchrome/openchrome_svn.bb
new file mode 100644
index 0000000000..b73414ff78
--- /dev/null
+++ b/packages/openchrome/openchrome_svn.bb
@@ -0,0 +1,16 @@
+SRC_URI = "svn://svn.openchrome.org/svn;module=trunk;proto=http \
+ file://configure.patch;patch=1"
+S = "${WORKDIR}/trunk"
+
+PACKAGES = "libviaXvMC libviaXvMCPro libviaXvMC-dev libviaXvMCPro-dev libviaXvMC-dbg libviaXvMCPro-dbg ${PN}-doc"
+
+FILES_libviaXvMC = "${libdir}/libviaXvMC.so.*"
+FILES_libviaXvMCPro = "${libdir}/libviaXvMCPro.so.*"
+FILES_libviaXvMC-dev = "${libdir}/libviaXvMC.so ${libdir}/libviaXvMC.la"
+FILES_libviaXvMCPro-dev = "${libdir}/libviaXvMCPro.so ${libdir}/libviaXvMCPro.la"
+FILES_libviaXvMC-dbg = "${libdir}/.debug/libviaXvMC.so.*"
+FILES_libviaXvMCPro-dbg = "${libdir}/.debug/libviaXvMCPro.so.*"
+
+DEPENDS = "xserver-xorg"
+
+inherit autotools xorg-module