Subject: pkg/35144: Provide qt3-tools (and dependents) with support for pkgviews
To: None <pkg-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Joachim Kuebart <joachim.kuebart@gmx.net>
List: pkgsrc-bugs
Date: 11/27/2006 23:35:00
>Number:         35144
>Category:       pkg
>Synopsis:       qt3-tools' buildlink3.mk needs to be enhanced for pkgviews
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Nov 27 23:35:00 +0000 2006
>Originator:     Joachim Kuebart
>Release:        NetBSD 2.99.16
>Organization:
>Environment:
System: NetBSD jaja 2.99.16 NetBSD 2.99.16 (ALPHA-$Revision: 1.201 $) #0: Fri Mar 11 19:29:41 CET 2005 joki@jaja:/usr/obj/usr/src/sys/arch/alpha/compile/JAJA alpha
Architecture: alpha
Machine: alpha
>Description:
When using pkgviews, qt3-libs and qt3-tools are installed in different
directories. Hence, a distinction needs to be made between tools installed by
either of these packages. The current qt3-libs/buildlink3.mk uses the
variable QTDIR to refer to the installation directory. The patch below
introduces the additional variable QTTOOLSDIR to refer to the qt3-tools
installation directory, and sets the configuration and make environment
variables UIC, QMAKE and QMAKESPEC accordingly.

>How-To-Repeat:
Install qt3-libs and qt3-tools with pkgviews enabled and try to build a
dependent port (e.g. arts). The configure stage is unable to find the uic
program because the path points to the installation directory of qt3-libs
whereas uic is actually installed by qt3-tools.

>Fix:
Apply the following patch to current pkgsrc:

Index: Makefile
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/x11/qt3-tools/Makefile,v
retrieving revision 1.50
diff -u -p -r1.50 Makefile
--- Makefile	23 Oct 2006 14:54:11 -0000	1.50
+++ Makefile	27 Nov 2006 23:24:37 -0000
@@ -1,5 +1,7 @@
 # $NetBSD: Makefile,v 1.50 2006/10/23 14:54:11 adam Exp $
 
+PKG_INSTALLATION_TYPES=	overwrite pkgviews
+
 .include "../../mk/bsd.prefs.mk"
 # XXX: hack - work round an ICE with GCC 3.3 on sparc
 .if ${OPSYS} == "NetBSD" && ${MACHINE_ARCH} == "sparc"
Index: buildlink3.mk
===================================================================
RCS file: /pub/NetBSD-CVS/pkgsrc/x11/qt3-tools/buildlink3.mk,v
retrieving revision 1.14
diff -u -p -r1.14 buildlink3.mk
--- buildlink3.mk	8 Jul 2006 23:11:16 -0000	1.14
+++ buildlink3.mk	27 Nov 2006 23:24:37 -0000
@@ -18,18 +18,20 @@ BUILDLINK_PKGSRCDIR.qt3-tools?=	../../x1
 BUILDLINK_DEPMETHOD.qt3-tools?=	build
 .endif	# QT3_TOOLS_BUILDLINK3_MK
 
+QTTOOLSDIR=	${BUILDLINK_PREFIX.qt3-tools}/qt3
+
 .include "../../x11/qt3-libs/buildlink3.mk"
 
-CONFIGURE_ENV+=		UIC="${QTDIR}/bin/uic"
-MAKE_ENV+=		UIC="${QTDIR}/bin/uic"
-CONFIGURE_ENV+=		QMAKE="${QTDIR}/bin/qmake"
-MAKE_ENV+=		QMAKE="${QTDIR}/bin/qmake"
+CONFIGURE_ENV+=		UIC="${QTTOOLSDIR}/bin/uic"
+MAKE_ENV+=		UIC="${QTTOOLSDIR}/bin/uic"
+CONFIGURE_ENV+=		QMAKE="${QTTOOLSDIR}/bin/qmake"
+MAKE_ENV+=		QMAKE="${QTTOOLSDIR}/bin/qmake"
 
 # the way the spec files are currently instealled via pkgsrc, they
 # are all identical anyway, so just pick one and point to it.
 # Without specifying QMAKESPEC, qmake can't figure it out on some
 # platforms (solaris for example)
-CONFIGURE_ENV+=		QMAKESPEC=${QTDIR}/mkspecs/netbsd-g++
-MAKE_ENV+=		QMAKESPEC=${QTDIR}/mkspecs/netbsd-g++
+CONFIGURE_ENV+=		QMAKESPEC="${QTTOOLSDIR}/mkspecs/netbsd-g++"
+MAKE_ENV+=		QMAKESPEC="${QTTOOLSDIR}/mkspecs/netbsd-g++"
 
 BUILDLINK_DEPTH:=		${BUILDLINK_DEPTH:S/+$//}