Package: emacs22
Version: 22.1+1-1
Severity: important
Tags: patch

Hi,

emacs22 fails to build on Debian's non-Linux arches:

i486-gnu-gcc -c -DHAVE_CONFIG_H -I. -I../src
        -I/var/tmp/emacs/emacs22-22.1+1/lib-src
        -I/var/tmp/emacs/emacs22-22.1+1/lib-src/../src  -DDEBIAN -g
        -O2 -Demacs /var/tmp/emacs/emacs22-22.1+1/lib-src/movemail.c
/var/tmp/emacs/emacs22-22.1+1/lib-src/movemail.c:171:2: error: #error 
        "Debian requires that mail locking be handled by liblockfile."
make[4]: *** [movemail.o] Error 1
make[4]: Leaving directory 
`/var/tmp/emacs/emacs22-22.1+1/debian/build-x/lib-src'

This is because only src/s/gnu-linux.h guards the `#define
MAIL_USE_FLOCK' with `#if !(defined (HAVE_LIBLOCKFILE))'.  GNU/Hurd and
GNU/kFreeBSD use src/s/gnu.h which has #include src/s/bsd4-3.h, which in
turn has an unconditional `#define MAIL_USE_FLOCK'.

The attached addition to
debian/patches/require-movemail-use-liblockfile.diff fixes this, at
least GNU/Hurd builds fine then (and probably kfreebsd-i386 as well, it
seems kfreebsd-amd64 needs further porting).


cheers,

Michael
diff -u emacs22-22.1+1/debian/patches/require-movemail-use-liblockfile.diff emacs22-22.1+1/debian/patches/require-movemail-use-liblockfile.diff
--- emacs22-22.1+1/debian/patches/require-movemail-use-liblockfile.diff
+++ emacs22-22.1+1/debian/patches/require-movemail-use-liblockfile.diff
@@ -24,0 +25,13 @@
+--- emacs22/src/s/bsd4-3.h.orig	2007-07-19 14:47:56.000000000 +0200
++++ emacs22/src/s/bsd4-3.h	2007-07-19 14:48:20.000000000 +0200
+@@ -98,7 +98,10 @@
+    The alternative is that a lock file named
+    /usr/spool/mail/$USER.lock.  */
+ 
++#if !((defined (HAVE_LIBMAIL) || defined (HAVE_LIBLOCKFILE)) && \
++      defined (HAVE_MAILLOCK_H))
+ #define MAIL_USE_FLOCK
++#endif
+ 
+ /* Define CLASH_DETECTION if you want lock files to be written
+    so that Emacs can tell instantly when you try to modify

Reply via email to