Mon, 28 Mar 2011 19:41:02 +0200
Completely rework package including...
Simpify 64-bit -fPIC logic, instruct make to build in parallel,
force error condition on failed profile dependency, build the
standard 'bootstrap' target as suggested, correct grammar, wording,
and punctuation in general, upgrade to latest upstream vendor version,
rearrange package dependencies mpc, mpfr, and gmp, correct buildconf
thanks to new lto-plugin forced, avoid failed platform specific stage
comparison, adjust patch code to reflect new version update, and most
importantly adjust optimization flags to platform. Please note that
block 'correct hardcoded paths' is likely no yet complete.
michael@234 | 1 | diff -Nau clamav-milter/clamav-milter.c.orig clamav-milter/clamav-milter.c |
michael@226 | 2 | Index: clamav-milter/clamav-milter.c |
michael@234 | 3 | --- clamav-milter/clamav-milter.c.orig 2009-10-28 16:34:13.000000000 +0100 |
michael@234 | 4 | +++ clamav-milter/clamav-milter.c 2009-11-01 15:26:46.212861448 +0100 |
michael@226 | 5 | @@ -32,7 +32,7 @@ |
michael@226 | 6 | #include <syslog.h> |
michael@226 | 7 | #endif |
michael@226 | 8 | #include <time.h> |
michael@226 | 9 | -#include <libmilter/mfapi.h> |
michael@226 | 10 | +#include "milter/mfapi.h" |
michael@226 | 11 | |
michael@226 | 12 | #include "clamav.h" |
michael@226 | 13 | |
michael@234 | 14 | diff -Nau clamav-milter/clamfi.c.orig clamav-milter/clamfi.c |
michael@226 | 15 | Index: clamav-milter/clamfi.c |
michael@234 | 16 | --- clamav-milter/clamfi.c.orig 2009-10-28 16:34:13.000000000 +0100 |
michael@234 | 17 | +++ clamav-milter/clamfi.c 2009-11-01 15:26:46.214251049 +0100 |
michael@226 | 18 | @@ -29,7 +29,7 @@ |
michael@226 | 19 | #include <unistd.h> |
michael@226 | 20 | #include <ctype.h> |
michael@226 | 21 | |
michael@226 | 22 | -#include <libmilter/mfapi.h> |
michael@226 | 23 | +#include "milter/mfapi.h" |
michael@226 | 24 | |
michael@226 | 25 | #include "shared/optparser.h" |
michael@226 | 26 | #include "shared/output.h" |
michael@234 | 27 | diff -Nau clamav-milter/clamfi.h.orig clamav-milter/clamfi.h |
michael@226 | 28 | Index: clamav-milter/clamfi.h |
michael@234 | 29 | --- clamav-milter/clamfi.h.orig 2009-07-06 15:21:58.000000000 +0200 |
michael@234 | 30 | +++ clamav-milter/clamfi.h 2009-11-01 15:26:46.214882752 +0100 |
michael@226 | 31 | @@ -22,7 +22,7 @@ |
michael@226 | 32 | #define _CLAMFI_H |
michael@226 | 33 | |
michael@226 | 34 | #include "shared/optparser.h" |
michael@226 | 35 | -#include <libmilter/mfapi.h> |
michael@226 | 36 | +#include "milter/mfapi.h" |
michael@226 | 37 | |
michael@226 | 38 | extern uint64_t maxfilesize; |
michael@226 | 39 | extern int addxvirus; |
michael@234 | 40 | diff -Nau configure.orig configure |
michael@226 | 41 | Index: configure |
michael@234 | 42 | --- configure.orig 2009-10-28 16:34:13.000000000 +0100 |
michael@234 | 43 | +++ configure 2009-11-01 15:29:06.145022137 +0100 |
michael@234 | 44 | @@ -16692,9 +16692,6 @@ |
michael@226 | 45 | |
michael@226 | 46 | save_LIBS="$LIBS" |
michael@226 | 47 | CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -lpthread" |
michael@226 | 48 | - if test -d /usr/lib/libmilter ; then |
michael@226 | 49 | - CLAMAV_MILTER_LIBS="$CLAMAV_MILTER_LIBS -L/usr/lib/libmilter" |
michael@226 | 50 | - fi |
michael@226 | 51 | LIBS="$LIBS -lmilter $CLAMAV_MILTER_LIBS" |
michael@234 | 52 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mi_stop in -lmilter" >&5 |
michael@226 | 53 | $as_echo_n "checking for mi_stop in -lmilter... " >&6; } |
michael@234 | 54 | @@ -16842,9 +16839,9 @@ |
michael@234 | 55 | fi |
michael@226 | 56 | |
michael@226 | 57 | LIBS="$save_LIBS" |
michael@234 | 58 | - for ac_header in libmilter/mfapi.h |
michael@234 | 59 | + for ac_header in milter/mfapi.h |
michael@234 | 60 | do : |
michael@234 | 61 | - ac_fn_c_check_header_mongrel "$LINENO" "libmilter/mfapi.h" "ac_cv_header_libmilter_mfapi_h" "$ac_includes_default" |
michael@234 | 62 | + ac_fn_c_check_header_mongrel "$LINENO" "milter/mfapi.h" "ac_cv_header_libmilter_mfapi_h" "$ac_includes_default" |
michael@234 | 63 | if test "x$ac_cv_header_libmilter_mfapi_h" = x""yes; then : |
michael@234 | 64 | cat >>confdefs.h <<_ACEOF |
michael@234 | 65 | #define HAVE_LIBMILTER_MFAPI_H 1 |
michael@234 | 66 | diff -Nau libclamav/others.c.orig libclamav/others.c |
michael@226 | 67 | Index: libclamav/others.c |
michael@234 | 68 | --- libclamav/others.c.orig 2009-10-28 16:34:13.000000000 +0100 |
michael@234 | 69 | +++ libclamav/others.c 2009-11-01 15:26:46.257883269 +0100 |
michael@234 | 70 | @@ -177,8 +177,10 @@ |
michael@226 | 71 | if(is_rar_initd) return; |
michael@226 | 72 | is_rar_initd = 1; |
michael@226 | 73 | |
michael@226 | 74 | +#if 0 |
michael@226 | 75 | rhandle = lt_dlfind("libclamunrar_iface", "unrar"); |
michael@226 | 76 | if (!rhandle) |
michael@226 | 77 | +#endif |
michael@226 | 78 | return; |
michael@226 | 79 | |
michael@226 | 80 | if (!(cli_unrar_open = (int(*)(int, const char *, unrar_state_t *))lt_dlsym(rhandle, "libclamunrar_iface_LTX_unrar_open")) || |
michael@234 | 81 | diff -Nau shared/output.c.orig shared/output.c |
michael@226 | 82 | Index: shared/output.c |
michael@234 | 83 | --- shared/output.c.orig 2009-10-28 16:34:13.000000000 +0100 |
michael@234 | 84 | +++ shared/output.c 2009-11-01 15:26:46.259056039 +0100 |
michael@226 | 85 | @@ -67,7 +67,7 @@ |
michael@226 | 86 | pthread_mutex_t logg_mutex = PTHREAD_MUTEX_INITIALIZER; |
michael@226 | 87 | #endif |
michael@226 | 88 | |
michael@226 | 89 | -#ifdef C_LINUX |
michael@226 | 90 | +#if 0 |
michael@226 | 91 | #include <libintl.h> |
michael@226 | 92 | #include <locale.h> |
michael@226 | 93 |