From anderson@cnpm.embrapa.br  Wed Apr 11 14:46:11 2007
Return-Path: <anderson@cnpm.embrapa.br>
Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52])
	by hub.freebsd.org (Postfix) with ESMTP id 6068116A402
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 11 Apr 2007 14:46:11 +0000 (UTC)
	(envelope-from anderson@cnpm.embrapa.br)
Received: from inga.cnpm.embrapa.br (inga.cnpm.embrapa.br [200.136.111.23])
	by mx1.freebsd.org (Postfix) with ESMTP id D3A1A13C44C
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 11 Apr 2007 14:46:10 +0000 (UTC)
	(envelope-from anderson@cnpm.embrapa.br)
Received: from caraiba.cnpm.embrapa.br (caraiba.cnpm.embrapa.br [200.136.111.98])
	by inga.cnpm.embrapa.br (Postfix) with ESMTP id 699A98A01F
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 11 Apr 2007 11:44:08 -0300 (BRT)
Received: from localhost (localhost [127.0.0.1])
	by caraiba.cnpm.embrapa.br (Postfix) with ESMTP id F360916A458
	for <FreeBSD-gnats-submit@freebsd.org>; Wed, 11 Apr 2007 11:44:09 -0300 (BRT)
Received: by caraiba.cnpm.embrapa.br (Postfix, from userid 1100)
	id 59F2316A456; Wed, 11 Apr 2007 11:44:09 -0300 (BRT)
Message-Id: <20070411144409.59F2316A456@caraiba.cnpm.embrapa.br>
Date: Wed, 11 Apr 2007 11:44:09 -0300 (BRT)
From: Anderson S. Ferreira <anderson@cnpm.embrapa.br>
Reply-To: Anderson S. Ferreira <anderson@cnpm.embrapa.br>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: [change-request] security/clamav: Add support to gethostbyname_r on FreeBSD 6 systems
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         111478
>Category:       ports
>Synopsis:       change-request: security/clamav: Add support to gethostbyname_r on FreeBSD 6 systems
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    garga
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Apr 11 14:50:04 GMT 2007
>Closed-Date:    Fri Apr 13 17:50:26 GMT 2007
>Last-Modified:  Fri Apr 13 17:50:26 GMT 2007
>Originator:     Anderson S. Ferreira
>Release:        FreeBSD 6.2-STABLE amd64
>Organization:
Embrapa Monitoramento por Satlite
>Environment:
System: FreeBSD caraiba.cnpm.embrapa.br 6.2-STABLE FreeBSD 6.2-STABLE #0: Sun Apr 8 22:53:19 BRT 2007 root@caraiba.cnpm.embrapa.br:/usr/src/sys/amd64/compile/CARAIBA amd64

This patch adds support to gethostbyname_r() on FreeBSD 6 and above, and install clamav-config.h in ${PREFIX}/include. 
The changes are needed by klamav port.

>Description:

>How-To-Repeat:

>Fix:

--- clamav.patch begins here ---
diff -Nru clamav/Makefile clamav.new/Makefile
--- clamav/Makefile	Fri Mar 16 16:16:32 2007
+++ clamav/Makefile	Wed Apr 11 11:34:16 2007
@@ -7,7 +7,7 @@
 
 PORTNAME=	clamav
 PORTVERSION=	0.90.1
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	security
 MASTER_SITES=	SF
 
@@ -47,7 +47,6 @@
 		--disable-clamuko \
 		--disable-clamav \
 		--enable-bigstack \
-		--disable-gethostbyname_r \
 		--enable-readdir_r \
 		--disable-dependency-tracking
 CPPFLAGS+=	-I${LOCALBASE}/include \
@@ -99,6 +98,12 @@
 
 .include <bsd.port.pre.mk>
 
+.if ${OSVERSION} < 600000
+CONFIGURE_ARGS+=	--disable-gethostbyname_r
+.else
+CONFIGURE_ARGS+=	--enable-gethostbyname_r
+.endif
+
 # This port has a problem with -pthread,
 # force to use -lthr until it's not fixed.
 .if ${OSVERSION} >= 601000
@@ -162,6 +167,8 @@
 .for c in clamd freshclam
 	@[ -f ${PREFIX}/etc/${c}.conf ] || \
 		${CP} ${PREFIX}/etc/${c}.conf.default ${PREFIX}/etc/${c}.conf
+	@${CP} ${WRKSRC}/clamav-config.h ${PREFIX}/include
+
 .endfor
 .if !defined(NOPORTDOCS)
 	@${MKDIR} ${DOCSDIR}/html
diff -Nru clamav/pkg-plist clamav.new/pkg-plist
--- clamav/pkg-plist	Tue Mar 13 17:11:16 2007
+++ clamav/pkg-plist	Wed Apr 11 11:03:10 2007
@@ -8,6 +8,7 @@
 %%CLAMAV-MILTER%%sbin/clamav-milter
 sbin/clamd
 include/clamav.h
+include/clamav-config.h
 lib/libclamav.so.2
 lib/libclamav.so
 lib/libclamav.a
--- clamav.patch ends here ---


---
Aviso de confidencialidade:

- Esta mensagem da Empresa Brasileira de Pesquisa Agropecuria (Embrapa), empresa pblica federal regida pelo disposto na Lei Federal n 5.851, de 7 de dezembro de 1972,  enviada exclusivamente a seu destinatrio e pode conter informaes confidenciais, protegidas por sigilo profissional. Sua utilizao desautorizada  ilegal e sujeita o infrator s penas da lei. Se voc a recebeu indevidamente, queira, por gentileza, reenvi-la ao emitente, esclarecendo o equvoco.

Confidentiality note:

- "This message from Empresa Brasileira de Pesquisa Agropecuria (Embrapa), a government company established under Brazilian law (5.851/72), is directed exclusively to its addressee and may contain confidential data, protected under professional secrecy rules. Its unauthorized use is illegal and may subject the transgressor to the law's penalties. If you are not the addressee, please send it back, elucidating the failure". 
>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->garga 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Wed Apr 11 14:50:15 UTC 2007 
Responsible-Changed-Why:  
Over to maintainer 

http://www.freebsd.org/cgi/query-pr.cgi?pr=111478 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/111478: commit references a PR
Date: Fri, 13 Apr 2007 17:49:15 +0000 (UTC)

 garga       2007-04-13 17:49:09 UTC
 
   FreeBSD ports repository
 
   Modified files:
     security/clamav      Makefile distinfo pkg-plist 
     security/clamav/files clamav-milter.in 
   Added files:
     security/clamav/files patch-libclamav__matcher-ac.c 
   Log:
   - Update to 0.90.2
   - Add a patch to increase performance of clamd in threaded systems [1]
   - Change clamav-milter rc.d script to use a var to determine seconds of timeout
     to wait clamd socket be started [2]
   - Add support to gethostbyname_r() on FreeBSD 6 and above [3]
   - Install clamav-config.h [3]
   - Fix all dependencies for klamav work fine [3]
   
   PR:             ports/111130 [2], ports/111478 [3]
   Submitted by:   Anton Yuzhaninov <citrin@rambler-co.ru> [1]
                   Denis Eremenko <moonshade@pnhz.kz> [2]
                   Anderson S. Ferreira <anderson@cnpm.embrapa.br> [3]
   Obtained from:  https://wwws.clamav.net/bugzilla/show_bug.cgi?id=434 [1]
   
   Revision  Changes    Path
   1.96      +8 -3      ports/security/clamav/Makefile
   1.38      +3 -3      ports/security/clamav/distinfo
   1.3       +15 -2     ports/security/clamav/files/clamav-milter.in
   1.1       +65 -0     ports/security/clamav/files/patch-libclamav__matcher-ac.c (new)
   1.32      +2 -1      ports/security/clamav/pkg-plist
 _______________________________________________
 cvs-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/cvs-all
 To unsubscribe, send any mail to "cvs-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->closed 
State-Changed-By: garga 
State-Changed-When: Fri Apr 13 17:50:24 UTC 2007 
State-Changed-Why:  
Committed, with minor changes. Thanks! 

http://www.freebsd.org/cgi/query-pr.cgi?pr=111478 
>Unformatted:
