Subject: pkg/25751: tosha does not pick up libscsi dependency in pkgviews environment
To: None <gnats-bugs@gnats.NetBSD.org>
From: Joachim Kuebart <kuebart@mathematik.uni-ulm.de>
List: pkgsrc-bugs
Date: 05/30/2004 14:17:30
>Number:         25751
>Category:       pkg
>Synopsis:       tosha does not pick up libscsi dependency in pkgviews environment
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun May 30 12:18:00 UTC 2004
>Closed-Date:
>Last-Modified:
>Originator:     Joachim Kuebart
>Release:        NetBSD 2.0B, sources from around April 2, 2004.
>Organization:
>Environment:
	
	
System: NetBSD jaja 2.0B NetBSD 2.0B (ALPHA-$Revision: 1.191 $) #10: Thu Apr 22 17:37:18 CEST 2004 joki@jaja:/home/joki/NetBSD/compile/JAJA alpha
Architecture: alpha
Machine: alpha
tosha-0.05
>Description:
tosha's makefile uses CFLAGS instead of LDFLAGS for linking. This way, the
dependency on libscsi handled by buildlink3 doesn't get picked up and
building tosha with a pkgview'd libscsi is impossible. Note that libscsi is
not (yet) pkgview ready (but see my mail to tech-pkg from Sun May 30).
	
>How-To-Repeat:
Build and install a pkgview libscsi. Then build a pkgview'd tosha and
observe that libscsi doesn't get picked up properly.
	
>Fix:
Change the link steps in the Makefile to use LDFLAGS which is set correctly
for the libscsi dependency by the buildlink3 framework. Also, change the
package Makefile to USE_BUILDLINK3.
	

Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/audio/tosha/Makefile,v
retrieving revision 1.7
diff -u -r1.7 Makefile
--- Makefile	16 Feb 2001 13:30:50 -0000	1.7
+++ Makefile	30 May 2004 12:16:09 -0000
@@ -10,6 +10,12 @@
 HOMEPAGE=	http://www.heim3.tu-clausthal.de/~olli/tosha/
 COMMENT=	Read CD digital audio data through the SCSI bus
 
-DEPENDS+=	libscsi>=1.6:../../devel/libscsi
+PKG_INSTALLATION_TYPES=	overwrite pkgviews
+
+USE_BUILDLINK3=	yes
+
+INSTALLATION_DIRS=	bin man/man1
+
+.include "../../devel/libscsi/buildlink3.mk"
 
 .include "../../mk/bsd.pkg.mk"
Index: distinfo
===================================================================
RCS file: /cvsroot/pkgsrc/audio/tosha/distinfo,v
retrieving revision 1.2
diff -u -r1.2 distinfo
--- distinfo	18 Apr 2001 12:14:38 -0000	1.2
+++ distinfo	30 May 2004 12:16:09 -0000
@@ -2,7 +2,7 @@
 
 SHA1 (tosha-0.05.tar.gz) = b567f452843b544b082c88403d74ad1ca07f6820
 Size (tosha-0.05.tar.gz) = 17859 bytes
-SHA1 (patch-aa) = b549c7ae682ce14cae981d2311ed32e9b0ca6d48
+SHA1 (patch-aa) = a550f99e673a62d069ce195aabee7aacf7c8a273
 SHA1 (patch-ab) = 9b4b43d6cb0fe2871cfd0e7e76ffdbd19123573a
 SHA1 (patch-ac) = 26feb1151d4fb02c5831762447c7bb264517f4d6
 SHA1 (patch-af) = f68e8d1ff3d0372fe642259bd30e820a0a2daae2
cvs server: Diffing patches
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/audio/tosha/patches/patch-aa,v
retrieving revision 1.8
diff -u -r1.8 patch-aa
--- patches/patch-aa	10 Sep 2000 22:50:34 -0000	1.8
+++ patches/patch-aa	30 May 2004 12:16:09 -0000
@@ -1,7 +1,5 @@
-$NetBSD: patch-aa,v 1.8 2000/09/10 22:50:34 wiz Exp $
-
---- Makefile.orig	Wed May 21 01:57:17 1997
-+++ Makefile
+--- Makefile.orig	1997-05-21 01:57:17.000000000 +0200
++++ Makefile	2004-05-12 17:15:40.000000000 +0200
 @@ -5,7 +5,6 @@
  #   Wed May 21 01:51:37 MET DST 1997
  #
@@ -10,7 +8,7 @@
  BINDIR=$(PREFIX)/bin
  MANDIR=$(PREFIX)/man
  SECTION=1
-@@ -16,9 +15,11 @@
+@@ -16,7 +15,7 @@
  ######                                       ######
  ###################################################
  
@@ -18,25 +16,23 @@
 +# CFLAGS=-O2 -Wall -ansi
  # CFLAGS=-g -Wall -ansi -pedantic
  
-+CFLAGS = -I${PREFIX}/include -L${PREFIX}/lib -Wl,-R${PREFIX}/lib
-+
  all:	tosha pcmplay pcmfade
- 
- utils.o:	utils.c utils.h
-@@ -28,10 +29,10 @@
+@@ -28,21 +27,18 @@
  pcmfade.o:	pcmfade.c utils.h
  
  tosha:	tosha.o utils.o getlopt.o
 -	$(CC) $(CFLAGS) -o tosha -lscsi tosha.o utils.o getlopt.o
-+	$(CC) $(CFLAGS) -o tosha tosha.o utils.o getlopt.o -lscsi -lutil
++	$(CC) $(LDFLAGS) -o tosha tosha.o utils.o getlopt.o -lscsi -lutil
  
  pcmplay:	pcmplay.o utils.o getlopt.o
 -	$(CC) $(CFLAGS) -o pcmplay pcmplay.o utils.o getlopt.o
-+	$(CC) $(CFLAGS) -o pcmplay pcmplay.o utils.o getlopt.o -lossaudio
++	$(CC) $(LDCFLAGS) -o pcmplay pcmplay.o utils.o getlopt.o -lossaudio
  
  pcmfade:	pcmfade.o utils.o
- 	$(CC) $(CFLAGS) -o pcmfade pcmfade.o utils.o
-@@ -40,9 +41,6 @@
+-	$(CC) $(CFLAGS) -o pcmfade pcmfade.o utils.o
++	$(CC) $(LDCFLAGS) -o pcmfade pcmfade.o utils.o
+ 
+ install:	tosha pcmplay pcmfade
  	install -s -g bin -o bin -m 755 tosha pcmplay pcmfade $(BINDIR)
  	install -c -g bin -o bin -m 644 tosha.1 pcmplay.1 pcmfade.1 \
  		$(MANDIR)/man$(SECTION)
>Release-Note:
>Audit-Trail:
>Unformatted: