Fix package list when use LIBUNRAR

If use LIBUNRAR don't need archivers/unrar
Remake patches to work without autotools
Bump PORTREVISION

PR:		87338
Approved by:	Rob <rob@debank.tv> (maintainer)
This commit is contained in:
Marcus Alves Grando 2005-10-14 13:40:26 +00:00
parent c6ee297801
commit c9bebcdd35
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=145376
3 changed files with 18 additions and 40 deletions

View file

@ -7,7 +7,7 @@
PORTNAME= clamav
PORTVERSION= 0.87
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= ${MASTER_SITE_SOURCEFORGE_EXTENDED}
MASTER_SITE_SUBDIR= clamav
@ -18,7 +18,6 @@ COMMENT= Command line virus scanner written entirely in C
LIB_DEPENDS= gmp.6:${PORTSDIR}/math/libgmp4
RUN_DEPENDS= lha:${PORTSDIR}/archivers/lha \
unarj:${PORTSDIR}/archivers/unarj \
unrar:${PORTSDIR}/archivers/unrar \
zoo:${PORTSDIR}/archivers/zoo \
arc:${PORTSDIR}/archivers/arc \
unzip:${PORTSDIR}/archivers/unzip
@ -26,6 +25,7 @@ RUN_DEPENDS= lha:${PORTSDIR}/archivers/lha \
OPTIONS= MILTER "Compile the milter interface" Off \
CURL "Support URL downloading" Off \
LIBUNRAR "Support for external Unrar library" Off
USE_REINPLACE= yes
USE_LIBTOOL_VER=15
CONFIGURE_TARGET= --build=${MACHINE_ARCH}-portbld-freebsd${OSREL}
@ -127,24 +127,18 @@ CONFIGURE_ARGS+= --without-libcurl
.endif
.if defined(WITH_LIBUNRAR)
WANT_AUTOMAKE_VER= 19
USE_AUTOCONF_VER= 259
CFLAGS+= -DUNRAR3
LDFLAGS+= -lunrar
LIB_DEPENDS+= unrar.3:${PORTSDIR}/archivers/libunrar
pre-configure:
cd ${WRKSRC} && \
${ACLOCAL} && \
${AUTOHEADER} && \
${AUTOCONF} && \
${AUTOMAKE}
EXTRA_PATCHES= ${FILESDIR}/extra-patch-libunrar
.else
RUN_DEPENDS+= unrar:${PORTSDIR}/archivers/unrar
EXTRA_PATCHES= ${FILESDIR}/extra-patch-libclamav__unrarlib.h
.endif
post-patch:
@${REINPLACE_CMD} -e 's|-pthread -lc_r|${PTHREAD_LIBS}|g' \
${CONFIGURE_WRKSRC}/${CONFIGURE_SCRIPT}
.if defined(WITH_LIBUNRAR)
${PATCH} -d ${WRKSRC}/libclamav < ${PORTSDIR}/security/clamav/files/clamav-0.87-libunrar3.patch
.endif
pre-build:
@if ${LDCONFIG} -r | ${GREP} -qw -e -lclamav; then \
@ -182,7 +176,6 @@ post-install:
@${MKDIR} ${DESTDIR}${DOCSDIR}/html
@${INSTALL_DATA} ${INSTALL_WRKSRC}/docs/html/*.* \
${DESTDIR}${DOCSDIR}/html
.endif
@${SETENV} PKG_PREFIX=${PREFIX} PKG_DESTDIR=${DESTDIR} \
${SH} ${PKGINSTALL} ${PREFIX} POST-INSTALL

View file

@ -1,18 +1,5 @@
diff -ruN clamav-0.84.orig/libclamav/Makefile.am clamav-0.84/libclamav/Makefile.am
--- clamav-0.84.orig/libclamav/Makefile.am 2005-04-20 03:33:17.000000000 +0400
+++ clamav-0.84/libclamav/Makefile.am 2005-05-04 02:12:02.540693464 +0400
@@ -17,6 +17,8 @@
INCLUDES = -I$(top_srcdir) -I@srcdir@/zziplib -I@srcdir@/mspack
+CFLAGS = @CFLAGS@ -DUNRAR3
+LDFLAGS = @LDFLAGS@ -lunrar
libclamav_la_LIBADD = @LIBCLAMAV_LIBS@
diff -ruN clamav-0.84.orig/libclamav/scanners.c clamav-0.84/libclamav/scanners.c
--- clamav-0.84.orig/libclamav/scanners.c 2005-04-29 05:31:10.000000000 +0400
+++ clamav-0.84/libclamav/scanners.c 2005-05-04 02:12:02.543693008 +0400
--- ./libclamav/scanners.c.orig Thu Sep 15 18:45:30 2005
+++ ./libclamav/scanners.c Wed Oct 12 14:40:13 2005
@@ -42,12 +42,13 @@
#include <mspack.h>
@ -44,7 +31,7 @@ diff -ruN clamav-0.84.orig/libclamav/scanners.c clamav-0.84/libclamav/scanners.c
#ifdef HAVE_ZLIB_H
static int cli_scanzip(int desc, const char **virname, long int *scanned, const struct cl_node *root, const struct cl_limits *limits, unsigned int options, unsigned int arec, unsigned int mrec)
@@ -1213,6 +1216,43 @@
@@ -1216,6 +1219,43 @@
return ret;
}
@ -88,7 +75,7 @@ diff -ruN clamav-0.84.orig/libclamav/scanners.c clamav-0.84/libclamav/scanners.c
static int cli_scanmschm(int desc, const char **virname, long int *scanned, const struct cl_node *root, const struct cl_limits *limits, unsigned int options, unsigned int arec, unsigned int mrec)
{
char *tempname;
@@ -1400,8 +1440,13 @@
@@ -1403,8 +1443,13 @@
switch(type) {
case CL_TYPE_RAR:
@ -102,7 +89,7 @@ diff -ruN clamav-0.84.orig/libclamav/scanners.c clamav-0.84/libclamav/scanners.c
break;
case CL_TYPE_ZIP:
@@ -1538,8 +1583,17 @@
@@ -1541,8 +1586,17 @@
* in raw mode. Now we will try to unpack them
*/
case CL_TYPE_MSEXE:
@ -120,9 +107,8 @@ diff -ruN clamav-0.84.orig/libclamav/scanners.c clamav-0.84/libclamav/scanners.c
break;
default:
diff -ruN clamav-0.84.orig/libclamav/unrarlib.c clamav-0.84/libclamav/unrarlib.c
--- clamav-0.84.orig/libclamav/unrarlib.c 2005-04-20 03:33:17.000000000 +0400
+++ clamav-0.84/libclamav/unrarlib.c 2005-05-04 02:12:27.131955024 +0400
--- ./libclamav/unrarlib.c.orig Thu Jun 23 17:03:12 2005
+++ ./libclamav/unrarlib.c Wed Oct 12 14:40:13 2005
@@ -1,2774 +1,119 @@
-/* It contains some changes needed for libclamav and isn't compatible with
- * the original version, --tk
@ -3008,9 +2994,8 @@ diff -ruN clamav-0.84.orig/libclamav/unrarlib.c clamav-0.84/libclamav/unrarlib.c
-
-
-/* end of file urarlib.c */
diff -ruN clamav-0.84.orig/libclamav/unrarlib.h clamav-0.84/libclamav/unrarlib.h
--- clamav-0.84.orig/libclamav/unrarlib.h 2005-04-20 03:33:17.000000000 +0400
+++ clamav-0.84/libclamav/unrarlib.h 2005-05-04 02:12:02.551691792 +0400
--- ./libclamav/unrarlib.h.orig Thu Jun 23 17:03:12 2005
+++ ./libclamav/unrarlib.h Wed Oct 12 14:40:13 2005
@@ -1,205 +1,22 @@
-/* ***************************************************************************
- **
@ -3228,7 +3213,7 @@ diff -ruN clamav-0.84.orig/libclamav/unrarlib.h clamav-0.84/libclamav/unrarlib.h
-
-
-#ifdef __cplusplus
-}
-};
-#endif
-
-#endif