Package: xenomai
Version: 2.4.3-6
Severity: important
Tags: patch
User: [EMAIL PROTECTED]
Usertags: eabi

Xenomai is quite interesting package for many arm people.
Now it would be be much more interesting if it actually compiled
on arm system ;) There is multiple problems preventing it at the
moment.

1) the configure script is quite bad, it asks for arm machine,
when (for userland) it actually only needs the arm cpu family (arm4 vs
arm5). In fact, xenomai could just use the compiler default -march
like done on x86/powerpc/ia64..

2) the armel arch is missing from debian/control. armel and the
potential future armeb arch needs also the --enable-eabi arch.

3) debian/rules uses erronously DEB_BUILD_ARCH when you should use
DEB_HOST_ARCH. see dpkg-architecture manpage.

With these changes, xenomai compiled. Untested thou..

-- 
"rm -rf" only sounds scary if you don't have backups
diff -urN old/xenomai-2.4.3/debian/control xenomai-2.4.3/debian/control
--- old/xenomai-2.4.3/debian/control    2008-04-24 19:23:17.000000000 +0000
+++ xenomai-2.4.3/debian/control        2008-04-24 18:57:24.000000000 +0000
@@ -8,7 +8,7 @@
 
 Package: xenomai-runtime
 Section: devel
-Architecture: amd64 arm i386 ia64 powerpc
+Architecture: amd64 arm armeb armel i386 ia64 powerpc
 Depends: ${shlibs:Depends}
 Suggests: linux-patch-xenomai, xenomai-doc
 Replaces: xenomai
@@ -47,7 +47,7 @@
 
 Package: libxenomai1
 Section: libs
-Architecture: amd64 arm i386 ia64 powerpc
+Architecture: amd64 arm armeb armel i386 ia64 powerpc
 Depends: ${shlibs:Depends}
 Suggests: linux-patch-xenomai, xenomai-doc
 Replaces: xenomai
@@ -64,7 +64,7 @@
 
 Package: libxenomai-dev
 Section: libdevel
-Architecture: amd64 arm i386 ia64 powerpc
+Architecture: amd64 arm armeb armel i386 ia64 powerpc
 Depends: libxenomai1 (= ${binary:Version})
 Suggests: linux-patch-xenomai, xenomai-doc
 Replaces: xenomai
diff -urN old/xenomai-2.4.3/debian/rules xenomai-2.4.3/debian/rules
--- old/xenomai-2.4.3/debian/rules      2008-04-24 19:23:17.000000000 +0000
+++ xenomai-2.4.3/debian/rules  2008-04-24 18:02:13.000000000 +0000
@@ -6,26 +6,32 @@
 
 #export DH_VERBOSE=1
 
-DEB_BUILD_GNU_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_CPU)
-DEB_BUILD_ARCH ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH)
+DEB_HOST_GNU_CPU ?= $(shell dpkg-architecture -qDEB_HOST_GNU_CPU)
+DEB_HOST_ARCH ?= $(shell dpkg-architecture -qDEB_HOST_ARCH)
 
-ifeq ($(DEB_BUILD_ARCH), i386)
+ifeq ($(DEB_HOST_ARCH), i386)
 # Note: Would like to use --includedir=/usr/include/xenomai, but
 # there appears to be a `make install` problem.
        CONFIG_OPTS = \
                    --enable-x86-tsc
 endif
-ifeq ($(DEB_BUILD_ARCH), amd64)
+ifeq ($(DEB_HOST_ARCH), amd64)
        CONFIG_OPTS = \
                    --enable-smp \
                    --enable-x86-tsc \
                    --enable-x86-sep
 endif
-ifeq ($(DEB_BUILD_ARCH), powerpc)
+ifeq ($(DEB_HOST_ARCH), powerpc)
        CONFIG_OPTS =
 endif
-ifeq ($(DEB_BUILD_ARCH), arm)
-       CONFIG_OPTS =
+ifeq ($(DEB_HOST_ARCH), armeb)
+       CONFIG_OPTS = --enable-arm-mach=imx --enable-arm-tsc --enable-arm-eabi
+endif
+ifeq ($(DEB_HOST_ARCH), armel)
+       CONFIG_OPTS = --enable-arm-mach=imx --enable-arm-tsc --enable-arm-eabi
+endif
+ifeq ($(DEB_HOST_ARCH), arm)
+       CONFIG_OPTS = --enable-arm-mach=imx --enable-arm-tsc
 endif
        CONFIG_OPTS += --prefix=/usr \
                    --includedir=/usr/include/xenomai \

Reply via email to