clamav 0.90.2: Fix build for uclibc by testing for libintl and linking
authorJamie Lenehan <lenehan@twibble.org>
Wed, 16 May 2007 04:35:45 +0000 (04:35 +0000)
committerJamie Lenehan <lenehan@twibble.org>
Wed, 16 May 2007 04:35:45 +0000 (04:35 +0000)
against it if required and added virtual/libintl to DEPENDS to ensure
the functionality exists either in libc or via a seperate library.

packages/clamav/clamav-0.90.2/cross-compile-fix.patch
packages/clamav/clamav_0.90.2.bb

index 2f346b2..f7ab4aa 100644 (file)
@@ -1,10 +1,12 @@
 Add some caching of values which can't be determined when
 cross-compiling. This lets us define the values via the site files.
 
+Also check for libintl and add it to ldflags if required.
+
 Index: clamav-0.90.2/configure.in
 ===================================================================
 --- clamav-0.90.2.orig/configure.in    2007-04-13 09:10:37.000000000 +1000
-+++ clamav-0.90.2/configure.in 2007-05-16 09:33:48.000000000 +1000
++++ clamav-0.90.2/configure.in 2007-05-16 14:19:01.000000000 +1000
 @@ -60,19 +60,21 @@
  
  dnl Check for broken snprintf (code by Phil Oleson <oz*nixil.net>)
@@ -66,3 +68,66 @@ Index: clamav-0.90.2/configure.in
  
  case "$target_os" in
  linux*)
+@@ -1100,6 +1112,10 @@
+ AC_MSG_RESULT($DEFAULT_FD_SETSIZE)
+ AC_DEFINE_UNQUOTED(DEFAULT_FD_SETSIZE, $DEFAULT_FD_SETSIZE, "default FD_SETSIZE value")
++dnl Do we need to link with -lintl?
++AM_GNU_GETTEXT([external])
++AM_GNU_GETTEXT_VERSION([0.14.1])
++
+ AC_OUTPUT([
+ libclamav/Makefile
+ clamscan/Makefile
+Index: clamav-0.90.2/clamd/Makefile.am
+===================================================================
+--- clamav-0.90.2.orig/clamd/Makefile.am       2007-05-16 14:22:46.000000000 +1000
++++ clamav-0.90.2/clamd/Makefile.am    2007-05-16 14:23:08.000000000 +1000
+@@ -60,5 +60,5 @@
+ endif
+-LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMD_LIBS@ @THREAD_LIBS@
++LIBS = $(top_builddir)/libclamav/libclamav.la @CLAMD_LIBS@ @THREAD_LIBS@ @LIBINTL@
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
+Index: clamav-0.90.2/clamdscan/Makefile.am
+===================================================================
+--- clamav-0.90.2.orig/clamdscan/Makefile.am   2007-05-16 14:24:02.000000000 +1000
++++ clamav-0.90.2/clamdscan/Makefile.am        2007-05-16 14:24:18.000000000 +1000
+@@ -40,4 +40,4 @@
+ DEFS = @DEFS@ -DCL_NOTHREADS
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/clamscan -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
+-LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@
++LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@ @LIBINTL@
+Index: clamav-0.90.2/clamscan/Makefile.am
+===================================================================
+--- clamav-0.90.2.orig/clamscan/Makefile.am    2007-05-16 14:20:23.000000000 +1000
++++ clamav-0.90.2/clamscan/Makefile.am 2007-05-16 14:20:39.000000000 +1000
+@@ -41,5 +41,5 @@
+     treewalk.h
+ DEFS = @DEFS@ -DCL_NOTHREADS
+-LIBS = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@
++LIBS = $(top_builddir)/libclamav/libclamav.la @THREAD_LIBS@ @LIBINTL@
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
+Index: clamav-0.90.2/freshclam/Makefile.am
+===================================================================
+--- clamav-0.90.2.orig/freshclam/Makefile.am   2007-05-16 14:25:10.000000000 +1000
++++ clamav-0.90.2/freshclam/Makefile.am        2007-05-16 14:25:25.000000000 +1000
+@@ -48,4 +48,4 @@
+ DEFS = @DEFS@ -DCL_NOTHREADS
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
+-LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@
++LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@ @LIBINTL@
+Index: clamav-0.90.2/sigtool/Makefile.am
+===================================================================
+--- clamav-0.90.2.orig/sigtool/Makefile.am     2007-05-16 14:26:18.000000000 +1000
++++ clamav-0.90.2/sigtool/Makefile.am  2007-05-16 14:26:29.000000000 +1000
+@@ -39,4 +39,4 @@
+ DEFS = @DEFS@ -DCL_NOTHREADS
+ INCLUDES = -I$(top_srcdir) -I$(top_srcdir)/shared -I$(top_srcdir)/libclamav
+-LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@
++LIBS = $(top_builddir)/libclamav/libclamav.la @FRESHCLAM_LIBS@ @THREAD_LIBS@ @LIBINTL@
index ab60a66..fe30616 100644 (file)
@@ -1,8 +1,9 @@
 require clamav.inc
-PR = "r0"
+PR = "r1"
 
 # 0.9x requires curl for incremental database updates
 DEPENDS += "curl"
+DEPENDS += "virtual/libintl"
 
 # Don't check for clamav uid/gid - they don't exist on the host
 # Put virus definitions in /var/lib not /usr/lib