| @@ -183,27 +183,27 @@ func (cv *VartypeCheck) DependencyWithPa | | | @@ -183,27 +183,27 @@ func (cv *VartypeCheck) DependencyWithPa |
183 | " package>=3.41:../../category/package", | | 183 | " package>=3.41:../../category/package", |
184 | " package-2.718:../../category/package") | | 184 | " package-2.718:../../category/package") |
185 | } | | 185 | } |
186 | | | 186 | |
187 | func (cv *VartypeCheck) DistSuffix() { | | 187 | func (cv *VartypeCheck) DistSuffix() { |
188 | if cv.value == ".tar.gz" { | | 188 | if cv.value == ".tar.gz" { |
189 | cv.line.notef("%s is \".tar.gz\" by default, so this definition may be redundant.", cv.varname) | | 189 | cv.line.notef("%s is \".tar.gz\" by default, so this definition may be redundant.", cv.varname) |
190 | } | | 190 | } |
191 | } | | 191 | } |
192 | | | 192 | |
193 | func (cv *VartypeCheck) EmulPlatform() { | | 193 | func (cv *VartypeCheck) EmulPlatform() { |
194 | | | 194 | |
195 | if m, opsys, arch := match2(cv.value, `^(\w+)-(\w+)$`); m { | | 195 | if m, opsys, arch := match2(cv.value, `^(\w+)-(\w+)$`); m { |
196 | if !matches(opsys, `^(?:bsdos|cygwin|darwin|dragonfly|freebsd|haiku|hpux|interix|irix|linux|netbsd|openbsd|osf1|sunos|solaris)$`) { | | 196 | if !matches(opsys, `^(?:bitrig|bsdos|cygwin|darwin|dragonfly|freebsd|haiku|hpux|interix|irix|linux|mirbsd|netbsd|openbsd|osf1|sunos|solaris)$`) { |
197 | cv.line.warnf("Unknown operating system: %s", opsys) | | 197 | cv.line.warnf("Unknown operating system: %s", opsys) |
198 | } | | 198 | } |
199 | // no check for os_version | | 199 | // no check for os_version |
200 | if !matches(arch, `^(?:i386|alpha|amd64|arc|arm|arm32|cobalt|convex|dreamcast|hpcmips|hpcsh|hppa|ia64|m68k|m88k|mips|mips64|mipsel|mipseb|mipsn32|ns32k|pc532|pmax|powerpc|rs6000|s390|sparc|sparc64|vax|x86_64)$`) { | | 200 | if !matches(arch, `^(?:i386|alpha|amd64|arc|arm|arm32|cobalt|convex|dreamcast|hpcmips|hpcsh|hppa|ia64|m68k|m88k|mips|mips64|mipsel|mipseb|mipsn32|ns32k|pc532|pmax|powerpc|rs6000|s390|sparc|sparc64|vax|x86_64)$`) { |
201 | cv.line.warnf("Unknown hardware architecture: %s", arch) | | 201 | cv.line.warnf("Unknown hardware architecture: %s", arch) |
202 | } | | 202 | } |
203 | | | 203 | |
204 | } else { | | 204 | } else { |
205 | cv.line.warnf("%q is not a valid emulation platform.", cv.value) | | 205 | cv.line.warnf("%q is not a valid emulation platform.", cv.value) |
206 | cv.line.explain( | | 206 | cv.line.explain( |
207 | "An emulation platform has the form <OPSYS>-<MACHINE_ARCH>.", | | 207 | "An emulation platform has the form <OPSYS>-<MACHINE_ARCH>.", |
208 | "OPSYS is the lower-case name of the operating system, and MACHINE_ARCH", | | 208 | "OPSYS is the lower-case name of the operating system, and MACHINE_ARCH", |
209 | "is the hardware architecture.", | | 209 | "is the hardware architecture.", |
| @@ -441,27 +441,27 @@ func (cv *VartypeCheck) PkgRevision() { | | | @@ -441,27 +441,27 @@ func (cv *VartypeCheck) PkgRevision() { |
441 | "Makefiles. There is no practical way of having this information in a", | | 441 | "Makefiles. There is no practical way of having this information in a", |
442 | "commonly used Makefile.") | | 442 | "commonly used Makefile.") |
443 | } | | 443 | } |
444 | } | | 444 | } |
445 | | | 445 | |
446 | func (cv *VartypeCheck) PlatformTriple() { | | 446 | func (cv *VartypeCheck) PlatformTriple() { |
447 | if cv.value != cv.valueNovar { | | 447 | if cv.value != cv.valueNovar { |
448 | return | | 448 | return |
449 | } | | 449 | } |
450 | | | 450 | |
451 | rePart := `(?:\[[^\]]+\]|[^-\[])+` | | 451 | rePart := `(?:\[[^\]]+\]|[^-\[])+` |
452 | reTriple := `^(` + rePart + `)-(` + rePart + `)-(` + rePart + `)$` | | 452 | reTriple := `^(` + rePart + `)-(` + rePart + `)-(` + rePart + `)$` |
453 | if m, opsys, _, arch := match3(cv.value, reTriple); m { | | 453 | if m, opsys, _, arch := match3(cv.value, reTriple); m { |
454 | if !matches(opsys, `^(?:\*|BSDOS|Cygwin|Darwin|DragonFly|FreeBSD|Haiku|HPUX|Interix|IRIX|Linux|NetBSD|OpenBSD|OSF1|QNX|SunOS)$`) { | | 454 | if !matches(opsys, `^(?:\*|Bitrig|BSDOS|Cygwin|Darwin|DragonFly|FreeBSD|Haiku|HPUX|Interix|IRIX|Linux|MirBSD|NetBSD|OpenBSD|OSF1|QNX|SunOS)$`) { |
455 | cv.line.warnf("Unknown operating system: %s", opsys) | | 455 | cv.line.warnf("Unknown operating system: %s", opsys) |
456 | } | | 456 | } |
457 | // no check for os_version | | 457 | // no check for os_version |
458 | if !matches(arch, `^(?:\*|i386|alpha|amd64|arc|arm|arm32|cobalt|convex|dreamcast|hpcmips|hpcsh|hppa|ia64|m68k|m88k|mips|mips64|mipsel|mipseb|mipsn32|ns32k|pc532|pmax|powerpc|rs6000|s390|sparc|sparc64|vax|x86_64)$`) { | | 458 | if !matches(arch, `^(?:\*|i386|alpha|amd64|arc|arm|arm32|cobalt|convex|dreamcast|hpcmips|hpcsh|hppa|ia64|m68k|m88k|mips|mips64|mipsel|mipseb|mipsn32|ns32k|pc532|pmax|powerpc|rs6000|s390|sparc|sparc64|vax|x86_64)$`) { |
459 | cv.line.warnf("Unknown hardware architecture: %s", arch) | | 459 | cv.line.warnf("Unknown hardware architecture: %s", arch) |
460 | } | | 460 | } |
461 | | | 461 | |
462 | } else { | | 462 | } else { |
463 | cv.line.warnf("%q is not a valid platform triple.", cv.value) | | 463 | cv.line.warnf("%q is not a valid platform triple.", cv.value) |
464 | cv.line.explain( | | 464 | cv.line.explain( |
465 | "A platform triple has the form <OPSYS>-<OS_VERSION>-<MACHINE_ARCH>.", | | 465 | "A platform triple has the form <OPSYS>-<OS_VERSION>-<MACHINE_ARCH>.", |
466 | "Each of these components may be a shell globbing expression.", | | 466 | "Each of these components may be a shell globbing expression.", |
467 | "Examples: NetBSD-*-i386, *-*-*, Linux-*-*.") | | 467 | "Examples: NetBSD-*-i386, *-*-*, Linux-*-*.") |