Source: lookup
Version: 1.08b-12
Tags: patch upstream
Control: block 798955 by -1

lookup's Makefile checks for headers by checking whether they exist in
/usr/include. That approach will break with non-glibc libcs and when
glibc fixes #798955. It will make lookup FTBFS. The attached patch
replaces the file existence tests with more reliable compile tests.
Please consider applying it.

Helmut
diff -u lookup-1.08b/Makefile lookup-1.08b/Makefile
--- lookup-1.08b/Makefile
+++ lookup-1.08b/Makefile
@@ -154,22 +154,22 @@
        echo '/* this file generated by Makefile */'      > tmp;
        -echo '#ifndef __SYSTEM_H__ /*file wrapper*/'    >> tmp;
        -echo '#define __SYSTEM_H__'                     >> tmp;
-       if [ -f /usr/include/strings.h ]; then\
+       if echo '#include <strings.h>' | $(CC) -E - >/dev/null 2>&1; then\
                echo '#define _HAVE_STRINGS_H_'          >> tmp; \
        else true; fi
-       if [ -f /usr/include/sys/termio.h ]; then\
+       if echo '#include <sys/termio.h>' | $(CC) -E - >/dev/null 2>&1; then\
                echo '#define _HAVE_SYS_TERMIO_H_'       >> tmp; \
        else true; fi
-       if [ -f /usr/include/termio.h ]; then\
+       if echo '#include <termio.h>' | $(CC) -E - >/dev/null 2>&1; then\
                echo '#define _HAVE_TERMIO_H_'       >> tmp; \
        else true; fi
-       if [ -f /usr/include/sys/stdtypes.h ]; then\
+       if echo '#include <sys/stdtypes.h>' | $(CC) -E - >/dev/null 2>&1; then\
                echo '#define _HAVE_SYS_STDTYPES_H_'     >> tmp; \
        else true; fi
-       if [ -f /usr/include/sys/fcntl.h ]; then\
+       if echo '#include <sys/fcntl.h>' | $(CC) -E - >/dev/null 2>&1; then\
                echo '#define _HAVE_SYS_FCNTL_H_'        >> tmp; \
        else true; fi
-       if [ -f /usr/include/fcntl.h ]; then\
+       if echo '#include <fcntl.h>' | $(CC) -E - >/dev/null 2>&1; then\
                echo '#define _HAVE_FCNTL_H_'            >> tmp; \
        else true; fi
        -echo '#endif /* file wrapper */'                >> tmp;
diff -u lookup-1.08b/debian/changelog lookup-1.08b/debian/changelog
--- lookup-1.08b/debian/changelog
+++ lookup-1.08b/debian/changelog
@@ -1,3 +1,10 @@
+lookup (1.08b-12.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Don't hard code libc header locations to /usr/include. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Sat, 20 Oct 2018 13:33:17 +0200
+
 lookup (1.08b-12) unstable; urgency=low
 
   * Fix FTCBFS: Let dh_auto_build pass cross compilers to make. 

Reply via email to