Package: conspy
Severity: important
Tags: patch

Hi,

currently your package FTBFS on GNU/kFreeBSD with the following error:
> gcc -DPACKAGE=\"conspy\" -DVERSION=\"1.1\" -DSTDC_HEADERS=1 -DHAVE_FCNTL_H=1 
> -DHAVE_GETOPT_H=1 -DHAVE_STDARG_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 
> -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_TERMIOS_H=1 -DHAVE_UNISTD_H=1 
> -DHAVE_LIBNCURSES=1 -DTIME_WITH_SYS_TIME=1 -DRETSIGTYPE=void -DHAVE_SELECT=1 
> -DHAVE_STRTOL=1  -I. -I.      -g -O2 -c conspy.c
> conspy.c: In function 'setup':
> conspy.c:479: error: 'IUCLC' undeclared (first use in this function)
> conspy.c:479: error: (Each undeclared identifier is reported only once
> conspy.c:479: error: for each function it appears in.)
> conspy.c: In function 'conspy':
> conspy.c:723: error: 'K_UNICODE' undeclared (first use in this function)
> make[1]: *** [conspy.o] Error 1
> make[1]: Leaving directory `/build/buildd/conspy-1.4'
> make: *** [build-stamp] Error 2

Full build logs are available at
<http://experimental.ftbfs.de/build.php?arch=kfreebsd-i386&pkg=conspy>.

Please find attached a patch to fix this. IUCLC and XCASE aren't defined
on GNU/kFreeBSD (which I already saw in some other packages, where
"#ifdef __linux__" or similar were used to &='d with some #define's only
on GNU/Linux), hence the "#define IUCLC 0".

According to the following:

,---[linux/kd.h]--- (GNU/Linux)
| #define         K_RAW           0x00
| #define         K_XLATE         0x01
| #define         K_MEDIUMRAW     0x02
| #define         K_UNICODE       0x03
`---

,---[sys/kbio.h]--- (GNU/kFreeBSD)
| #define K_RAW           0       /* keyboard returns scancodes */
| #define K_XLATE         1       /* keyboard returns ascii */
| #define K_CODE          2       /* keyboard returns keycodes */
`---

I made the assumption that we could just "#define K_UNICODE K_CODE" to
do the right thing.

With this patch, your package builds just fine, and Linux builds
shouldn't be affected.

Cheers,

-- 
Cyril Brulebois
--- conspy-1.4/conspy.c	2007-03-11 01:53:49.384333000 +0100
+++ conspy-1.4/conspy.c	2007-03-11 02:00:41.000000000 +0100
@@ -49,6 +49,12 @@
 #include <sys/time.h>
 #include <unistd.h>
 
+/* GNU/kFreeBSD has different #define's */
+#if defined(__FreeBSD_kernel__)
+#define K_UNICODE K_CODE
+#define IUCLC 0
+#endif
+
 extern int errno;
 
 /*

Reply via email to