From rea-fbsd@codelabs.ru  Tue Jul  1 10:33:10 2008
Return-Path: <rea-fbsd@codelabs.ru>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 225A91065679
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  1 Jul 2008 10:33:10 +0000 (UTC)
	(envelope-from rea-fbsd@codelabs.ru)
Received: from 0.mx.codelabs.ru (0.mx.codelabs.ru [144.206.177.45])
	by mx1.freebsd.org (Postfix) with ESMTP id CEB838FC24
	for <FreeBSD-gnats-submit@freebsd.org>; Tue,  1 Jul 2008 10:33:09 +0000 (UTC)
	(envelope-from rea-fbsd@codelabs.ru)
Received: from void.codelabs.ru (void.codelabs.ru [144.206.177.25])
	by 0.mx.codelabs.ru with esmtps (TLSv1:CAMELLIA256-SHA:256)
	id 1KDdAa-0002cH-Bh; Tue, 01 Jul 2008 14:33:08 +0400
Message-Id: <20080701103308.3212D1AF41E@void.codelabs.ru>
Date: Tue,  1 Jul 2008 14:33:08 +0400 (MSD)
From: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
Reply-To: Eygene Ryabinkin <rea-fbsd@codelabs.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc: support@spectrum.ru
Subject: [patch] add dependencies on libstdc++.[45] for security/drweb
X-Send-Pr-Version: 3.113
X-GNATS-Notify: support@spectrum.ru

>Number:         125140
>Category:       ports
>Synopsis:       [patch] add dependencies on libstdc++.[45] for security/drweb
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 01 10:40:01 UTC 2008
>Closed-Date:    Sat Aug 30 13:20:38 UTC 2008
>Last-Modified:  Sat Aug 30 13:20:38 UTC 2008
>Originator:     Eygene Ryabinkin
>Release:        FreeBSD 7.0-STABLE i386
>Organization:
Code Labs
>Environment:

System: FreeBSD XXX 7.0-STABLE FreeBSD 7.0-STABLE #16: Tue Mar 18 11:49:55 MSK 2008 root@XXX:/usr/obj/usr/src/sys/XXX i386

>Description:

Drweb 4.33 requires compatibility libraries libstdc++.4 for
FreeBSD <= 5.x and libstdc++.5 for FreeBSD >= 6.x.  So the port
should depend on the misc/compat5x or misc/compat6x, depending
on the FreeBSD version.

>How-To-Repeat:

Uninstall misc/compat6x on FreeBSD 6.x/7.x/8.x, install DrWeb
and try to start the daemon.  It will complain like this:
-----
Starting drwebd.
/libexec/ld-elf.so.1: Shared object "libstdc++.so.5" not found, required by "drwebd"
-----

>Fix:

Add library dependencies to the port.  The following patch does it.
PORTREVISION was no bumped, perhaps it should be done to get the
proper dependencies on the already installed systems.

--- add-compat-5x-6x-dependency.patch begins here ---
diff -urN ./Makefile ../drweb/Makefile
--- ./Makefile	2008-07-01 14:19:11.000000000 +0400
+++ ../drweb/Makefile	2008-07-01 14:22:44.000000000 +0400
@@ -29,9 +29,11 @@
 .if ${OSVERSION} >= 601000
 DISTNAME=	${PORTNAME}-${PORTVERSION}-freebsd61
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:f61
+LIB_DEPENDS+=	stdc++.5:${PORTSDIR}/misc/compat6x
 .else
 DISTNAME=	${PORTNAME}-${PORTVERSION}-freebsd55
 DISTFILES=	${DISTNAME}${EXTRACT_SUFX}:f55
+LIB_DEPENDS+=	stdc++.4:${PORTSDIR}/misc/compat5x
 .endif
 
 WRKSRC=		${WRKDIR}/${DISTNAME}
--- add-compat-5x-6x-dependency.patch ends here ---

Tested this on FreeBSD 7.0.  Had not tested on 5.x -- no such version
at hand, sorry.
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->feedback 
State-Changed-By: edwin 
State-Changed-When: Tue Jul 1 10:40:13 UTC 2008 
State-Changed-Why:  
Awaiting maintainers feedback (via the GNATS Auto Assign Tool) 

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

From: Edwin Groothuis <edwin@FreeBSD.org>
To: support@spectrum.ru
Cc: bug-followup@FreeBSD.org
Subject: Re: ports/125140: [patch] add dependencies on libstdc++.[45] for security/drweb
Date: Tue, 1 Jul 2008 10:40:10 UT

 Maintainer of security/drweb,
 
 Please note that PR ports/125140 has just been submitted.
 
 If it contains a patch for an upgrade, an enhancement or a bug fix
 you agree on, reply to this email stating that you approve the patch
 and a committer will take care of it.
 
 The full text of the PR can be found at:
     http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/125140
 
 -- 
 Edwin Groothuis via the GNATS Auto Assign Tool
 edwin@FreeBSD.org
State-Changed-From-To: feedback->closed 
State-Changed-By: miwi 
State-Changed-When: Sat Aug 30 13:20:35 UTC 2008 
State-Changed-Why:  
close by maintainer request. 

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