Subject: pkg/20701: Match bsd.prefs.mk with MACHINE_GNU_PLATFORM
To: None <gnats-bugs@gnats.netbsd.org>
From: None <sketch@rd.bbc.co.uk>
List: netbsd-bugs
Date: 03/14/2003 04:18:01
>Number:         20701
>Category:       pkg
>Synopsis:       Match bsd.prefs.mk with MACHINE_GNU_PLATFORM
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Mar 14 04:19:00 PST 2003
>Closed-Date:
>Last-Modified:
>Originator:     Jonathan Perkin
>Release:        
>Organization:
British Broadcasting Corporation
>Environment:
SunOS desk00 5.8 Generic sun4u sparc SUNW,Ultra-60
>Description:
We pass --host=${MACHINE_GNU_PLATFORM} to configure scripts, but on
Solaris machines we assume it to be sparc-sun-solaris, yet config.sub
(used by configure) reports Solaris 2.* machines as sparc-sun-solaris2.

The below patch properly defines MACHINE_GNU_PLATFORM based on the
version of Solaris running on the host machine.
>How-To-Repeat:
Currently breaks e.g. pkgsrc/lang/ruby-base on Solaris 2.* machines.
>Fix:
(http://www.perkin.org.uk/projects/netbsd/bsd.prefs.mk.patch)

Index: bsd.prefs.mk
===================================================================
RCS file: /cvsroot/pkgsrc/mk/bsd.prefs.mk,v
retrieving revision 1.106
diff -u -r1.106 bsd.prefs.mk
--- bsd.prefs.mk        2003/01/25 22:39:56     1.106
+++ bsd.prefs.mk        2003/03/14 12:11:57
@@ -84,7 +84,11 @@
 MAKEFLAGS+=            LOWER_ARCH=${LOWER_ARCH}
 .  endif
 LOWER_VENDOR?=         sun
+.  if ${OS_VERSION:M4.*}
 LOWER_OPSYS?=          solaris
+.  else
+LOWER_OPSYS?=          solaris2
+.  endif
 
 .elif ${OPSYS} == "Linux"
 LOWER_OPSYS?=          linux
>Release-Note:
>Audit-Trail:
>Unformatted: