Sun Dec 13 08:19:45 2009 UTC ()
Interix>=5.2 have libc.so.5.2, but no higer revision exists.
So gave up to detect OS_VERSION with shlib version if libc.so.5.2 exists.


(obache)
diff -r1.300 -r1.301 pkgsrc/mk/bsd.prefs.mk

cvs diff -r1.300 -r1.301 pkgsrc/mk/bsd.prefs.mk (expand / switch to unified diff)

--- pkgsrc/mk/bsd.prefs.mk 2009/09/24 17:24:13 1.300
+++ pkgsrc/mk/bsd.prefs.mk 2009/12/13 08:19:45 1.301
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: bsd.prefs.mk,v 1.300 2009/09/24 17:24:13 tron Exp $ 1# $NetBSD: bsd.prefs.mk,v 1.301 2009/12/13 08:19:45 obache Exp $
2# 2#
3# This file includes the mk.conf file, which contains the user settings. 3# This file includes the mk.conf file, which contains the user settings.
4# 4#
5# Packages should include this file before any of the .if directives, as 5# Packages should include this file before any of the .if directives, as
6# well as before modifying variables like CFLAGS, LDFLAGS, and so on. 6# well as before modifying variables like CFLAGS, LDFLAGS, and so on.
7# Otherwise the behavior may be unexpected. 7# Otherwise the behavior may be unexpected.
8# 8#
9# When mk.conf is included by this file, the following variables are 9# When mk.conf is included by this file, the following variables are
10# defined: 10# defined:
11# 11#
12# ACCEPTABLE_LICENSES 12# ACCEPTABLE_LICENSES
13# This variable is set to the list of Open Source licenses. See 13# This variable is set to the list of Open Source licenses. See
14# mk/license.mk for details. 14# mk/license.mk for details.
@@ -166,34 +166,38 @@ LOWER_ARCH!= ${UNAME} -p @@ -166,34 +166,38 @@ LOWER_ARCH!= ${UNAME} -p
166MACHINE_ARCH= x86_64 166MACHINE_ARCH= x86_64
167. else 167. else
168MACHINE_ARCH= ${LOWER_ARCH} 168MACHINE_ARCH= ${LOWER_ARCH}
169. endif 169. endif
170MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q} 170MAKEFLAGS+= LOWER_ARCH=${LOWER_ARCH:Q}
171LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/} 171LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/}
172. if ${LOWER_ARCH} == "i386" 172. if ${LOWER_ARCH} == "i386"
173LOWER_VENDOR?= pc 173LOWER_VENDOR?= pc
174. endif 174. endif
175LOWER_VENDOR?= unknown 175LOWER_VENDOR?= unknown
176 176
177.elif ${OPSYS} == "Interix" 177.elif ${OPSYS} == "Interix"
178LOWER_OPSYS?= interix 178LOWER_OPSYS?= interix
179LOWER_OPSYS_VERSUFFIX?= 3 
180LOWER_VENDOR?= pc 179LOWER_VENDOR?= pc
181. if exists(/usr/lib/libc.so.3.5) 180. if exists(/usr/lib/libc.so.5.2) || exists(/usr/lib/x86/libc.so.5.2)
 181LOWER_OPSYS_VERSUFFIX= ${LOWER_OS_VERSION:C/([0-9]*).*/\1/}
 182. else
 183LOWER_OPSYS_VERSUFFIX?= 3
 184. if exists(/usr/lib/libc.so.3.5)
182OS_VERSION= 3.5 185OS_VERSION= 3.5
183. elif exists(/usr/lib/libc.so.3.1) 186. elif exists(/usr/lib/libc.so.3.1)
184OS_VERSION= 3.1 187OS_VERSION= 3.1
185. else 188. else
186OS_VERSION= 3.0 189OS_VERSION= 3.0
 190. endif
187. endif 191. endif
188 192
189.elif !empty(OPSYS:MIRIX*) 193.elif !empty(OPSYS:MIRIX*)
190LOWER_ARCH!= ${UNAME} -p 194LOWER_ARCH!= ${UNAME} -p
191LOWER_OPSYS?= irix 195LOWER_OPSYS?= irix
192LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION} 196LOWER_OPSYS_VERSUFFIX?= ${OS_VERSION}
193LOWER_VENDOR?= sgi 197LOWER_VENDOR?= sgi
194 198
195.elif ${OPSYS} == "Linux" 199.elif ${OPSYS} == "Linux"
196OS_VERSION:= ${OS_VERSION:C/-.*$//} 200OS_VERSION:= ${OS_VERSION:C/-.*$//}
197LOWER_OPSYS?= linux 201LOWER_OPSYS?= linux
198MACHINE_ARCH:= ${MACHINE_ARCH:C/i.86/i386/} 202MACHINE_ARCH:= ${MACHINE_ARCH:C/i.86/i386/}
199MACHINE_ARCH:= ${MACHINE_ARCH:C/ppc/powerpc/} 203MACHINE_ARCH:= ${MACHINE_ARCH:C/ppc/powerpc/}