Subject: pkg/24485: USE_ESOUND=NO does not work with buildlink3
To: None <gnats-bugs@gnats.NetBSD.org>
From: None <hira@po6.nsk.ne.jp>
List: netbsd-bugs
Date: 02/19/2004 13:38:06
>Number:         24485
>Category:       pkg
>Synopsis:       USE_ESOUND=NO does not work with buildlink3
>Confidential:   no
>Severity:       serious
>Priority:       high
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Feb 19 04:39:01 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Kouichirou Hiratsuka
>Release:        NetBSD 1.6ZK
>Organization:
>Environment:
System: NetBSD firefly.localdomain 1.6ZK NetBSD 1.6ZK (FIREFLY.MP) #3: Wed Feb 18 01:44:17 JST 2004 hiratuka@firefly.localdomain:/usr/src/sys/arch/i386/compile/FIREFLY.MP i386
Architecture: i386
Machine: i386
>Description:
	audio/libmikmod/buildlink3.mk includes audio/esound/buildlink3.mk
	unconditionally. Even if USE_ESOUND=NO, it tries to use buildlink of
	esound. For example, audio/xmms can't build with USE_ESOUND=NO.
	It must check the value of USE_ESOUND before including it.

# cd /usr/pkgsrc/audio/xmms
# make USE_ESOUND=NO
===> Checking for vulnerabilities in xmms-1.2.7nb10
=> Checksum OK for xmms-1.2.7.tar.gz.
work -> /tmp/pkgsrc/audio/xmms/work
===> Extracting for xmms-1.2.7nb10
===> Required package libmikmod>=3.1.9: NOT found
===> Verifying reinstall for ../../audio/libmikmod
===> Checking for vulnerabilities in libmikmod-3.1.10
=> Checksum OK for libmikmod_3.1.10.tar.gz.
work -> /tmp/pkgsrc/audio/libmikmod/work
===> Extracting for libmikmod-3.1.10
===> Required installed package libtool-base>=1.4.20010614nb11: libtool-base-1.5.2nb3 found
===> Required installed package gmake>=3.78: gmake-3.80nb2 found
==========================================================================
The following variables will affect the build process of this package,
libmikmod-3.1.10.  Their current value is shown below:

        * USE_ESOUND = NO

You may want to abort the process now with CTRL+C and change their value
before continuing.  Be sure to run `/usr/bin/make clean' after the changes.
==========================================================================
===> Patching for libmikmod-3.1.10

[snip]

===> Registering installation for libmikmod-3.1.10
===> Returning to build of xmms-1.2.7nb10
===> Required installed package libvorbis>=1.0.1: libvorbis-1.0.1 found
===> Required installed package glut>=6.0: glut-6.0 found
===> Required installed package glu>=6.0: glu-6.0 found
===> Required installed package MesaLib>=6.0: MesaLib-6.0 found
===> Required installed package libxml>=1.8.11: libxml-1.8.17nb1 found
===> Required installed package gtk+>=1.2.10: gtk+-1.2.10nb6 found
===> Required installed package libtool-base>=1.4.20010614nb11: libtool-base-1.5.2nb3 found
===> Required installed package x11-links>=0.23: x11-links-0.23 found
===> Required installed package gmake>=3.78: gmake-3.80nb2 found
===> Patching for xmms-1.2.7nb10
===> Applying pkgsrc patches for xmms-1.2.7nb10
cd /tmp/pkgsrc/audio/xmms/work/xmms-1.2.7/Input/mpg123 &&  /bin/mv decode_i586.s decode_i586.s.orig &&  /usr/bin/sed -e 's@^/@#/@g' <decode_i586.s.orig >decode_i586.s
===> Overriding tools for xmms-1.2.7nb10
===> Buildlinking for xmms-1.2.7nb10
esound is not installed; can't buildlink files.
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/audio/xmms
*** Error code 1

Stop.
make: stopped in /usr/pkgsrc/audio/xmms
#

>How-To-Repeat:
	cd ${PKGSRCDIR}/audio/xmms
	make USE_ESOUND=NO

>Fix:
Index: pkgsrc/audio/libmikmod/buildlink3.mk
===================================================================
RCS file: /cvs/cvsroot/pkgsrc/audio/libmikmod/buildlink3.mk,v
retrieving revision 1.1
diff -u -r1.1 buildlink3.mk
--- pkgsrc/audio/libmikmod/buildlink3.mk	11 Feb 2004 08:36:17 -0000	1.1
+++ pkgsrc/audio/libmikmod/buildlink3.mk	19 Feb 2004 03:47:18 -0000
@@ -17,7 +17,9 @@
 BUILDLINK_DEPENDS.libmikmod+=		libmikmod>=3.1.9
 BUILDLINK_PKGSRCDIR.libmikmod?=		../../audio/libmikmod
 
+.if !empty(USE_ESOUND:M[Yy][Ee][Ss])
 .include "../../audio/esound/buildlink3.mk"
+.endif
 
 .endif # LIBMIKMOD_BUILDLINK3_MK
>Release-Note:
>Audit-Trail:
>Unformatted: