Subject: pkg/14500: (bsd.prefs.mk) host system type... is NOT correct (powerpc--netbsd)
To: None <gnats-bugs@gnats.netbsd.org>
From: None <makoto@ki.nu>
List: netbsd-bugs
Date: 11/08/2001 16:57:53
>Number:         14500
>Category:       pkg
>Synopsis:       pkgsrc/mk/bsd.prefs.mk	should be updated to reflect vendor name
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Wed Nov 07 23:59:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Makoto Fujiwara
>Release:        pkgsrc-20011031
>Organization:
	www.ki.nu
>Environment:
	
System: NetBSD u 1.5X NetBSD 1.5X (GENERIC) #0: Thu Aug 2 18:03:48 JST 2001 tsubai@ibook:/a/0801/src/sys/arch/macppc/compile/GENERIC macppc
Architecture: powerpc
Machine: macppc
>Description:
	(1) LOWER_VENDOR variable in /usr/pkgsrc/mk/bsd.prefs.mk for Apple Machine
            is not correctly updated. There might be discussion if all the macppc
            machines were by apple, but it would be far fantastic if we have 
            something instead of nothing.
        (2) With that variable, some configure script get wrong host system type.
            When building new package, we need unnecessary tweak to ignore such
	    blank vendor type.

>How-To-Repeat:
	
	just do any make on /usr/pkgsrc and watch host system type

Example: (See 13th line below)
---------------------
makoto@u 16:22:38/011108(...editors/emacs)> make
===> Validating dependencies for emacs-20.7
=> Checksum OK for emacs-20.7.tar.gz.
===> Extracting for emacs-20.7
===> Required installed package gmake>=3.78: gmake-3.79.1 found
===> Patching for emacs-20.7
===> Applying NetBSD patches for emacs-20.7
**************************************
Ignoring unknown patch file: /export/pkgsrc/editors/emacs/patches/patch-ac
**************************************
===> Configuring for emacs-20.7
creating cache ./config.cache
checking host system type... powerpc--netbsd
checking for gcc... cc
checking whether the C compiler (cc -O  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib) works... yes
checking whether the C compiler (cc -O  -Wl,-R/usr/pkg/lib -L/usr/pkg/lib -Wl,-R/usr/pkg/lib -L/usr/pkg/lib) is a cross-compiler... no
checking whether we are using GNU C... yes
---------------------
>Fix:

--- pkgsrc/mk/bsd.prefs.mk-ooo	Tue Oct 16 11:46:22 2001
+++ pkgsrc/mk/bsd.prefs.mk	Thu Nov  8 16:53:54 2001
@@ -50,6 +50,14 @@
 
 .if ${OPSYS} == "NetBSD"
 LOWER_OPSYS?=		netbsd
+LOWER_VENDOR!=		${UNAME} -m
+
+.if   ${LOWER_VENDOR} == "macppc"
+        LOWER_VENDOR=		apple
+.elif ${LOWER_VENDOR} == "mac68k" 
+        LOWER_VENDOR=		apple
+.endif
+
 
 .elif ${OPSYS} == "SunOS"
 . if ${MACHINE_ARCH} == "unknown"
@@ -87,7 +95,7 @@
 
 MAKEFLAGS+=		LOWER_OPSYS=${LOWER_OPSYS}
 
-LOWER_VENDOR?=
+LOWER_VENDOR?=	unknown
 LOWER_ARCH?=		${MACHINE_GNU_ARCH}
 
 MACHINE_PLATFORM?=	${OPSYS}-${OS_VERSION}-${MACHINE_ARCH}
>Release-Note:
>Audit-Trail:
>Unformatted: