Subject: pkg/37361: libotr buildlink is incorrect
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: None <degroote@netbsd.org>
List: pkgsrc-bugs
Date: 11/11/2007 21:15:04
>Number:         37361
>Category:       pkg
>Synopsis:       libotr buildlink is incorrect
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Nov 11 21:15:02 +0000 2007
>Originator:     A. Degroote
>Release:        current
>Organization:
>Environment:
NetBSD Amilo.at.home 4.99.35 NetBSD 4.99.35 (AMILO) #9: Sat Nov 10 10:47:57 CET 2007  zul@Amilo.at.home:/home/zul/netbsd-dev/build_temp/objdir/sys/arch/i386/compile/AMILO i386

>Description:
Trying to build mcabber (from wip/mcabber), I can't build correctly the otr support. libotr (chat/libotr) needs libgcrypt (security/libgcrypt).

The dependancies is correctly recorded in the Makefile but not in the buildlink3.mk file. 

libgrypt is a dependency for libotr (see libotr.la). When we try to build a package with libotr, pkgsrc framework miss this dependency (because not present in buildlink3.mk) and so fail to build the package. 
>How-To-Repeat:
Currently there is no user of libotr in pkgsrc.
wip/mcabber uses it ( if you add PKG_OPTIONS.mcabber+= otr). So a possible test is 

cd /usr/pkgsrc/wip/mcabber
PKG_OPTIONS.mcabber+=otr make

>Fix:
diff -u -r1.9 buildlink3.mk
--- buildlink3.mk       8 Jul 2006 23:10:38 -0000       1.9
+++ buildlink3.mk       11 Nov 2007 13:40:16 -0000
@@ -16,4 +16,6 @@
 BUILDLINK_PKGSRCDIR.libotr?=   ../../chat/libotr
 .endif # LIBOTR_BUILDLINK3_MK
 
+.include "../../security/libgcrypt/buildlink3.mk"
+
 BUILDLINK_DEPTH:=      ${BUILDLINK_DEPTH:S/+$//}