Mercurial > hg > sv-dependency-builds
annotate src/portaudio_20161030_catalina_patch/build/scons/SConscript_common @ 162:d43aab368df9
Duplicate for patch testing
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Wed, 30 Oct 2019 11:25:10 +0000 |
parents | |
children |
rev | line source |
---|---|
cannam@162 | 1 import os.path, sys |
cannam@162 | 2 |
cannam@162 | 3 class ConfigurationError(Exception): |
cannam@162 | 4 def __init__(self, reason): |
cannam@162 | 5 Exception.__init__(self, "Configuration failed: %s" % reason) |
cannam@162 | 6 |
cannam@162 | 7 env = Environment() |
cannam@162 | 8 |
cannam@162 | 9 # sunos, aix, hpux, irix, sunos appear to be platforms known by SCons, assuming they're POSIX compliant |
cannam@162 | 10 Posix = ("linux", "darwin", "sunos", "aix", "hpux", "irix", "sunos", "netbsd") |
cannam@162 | 11 Windows = ("win32", "cygwin") |
cannam@162 | 12 |
cannam@162 | 13 if env["PLATFORM"] == "posix": |
cannam@162 | 14 if sys.platform[:5] == "linux": |
cannam@162 | 15 Platform = "linux" |
cannam@162 | 16 elif sys.platform[:6] == "netbsd": |
cannam@162 | 17 Platform = "netbsd" |
cannam@162 | 18 else: |
cannam@162 | 19 raise ConfigurationError("Unknown platform %s" % sys.platform) |
cannam@162 | 20 else: |
cannam@162 | 21 if not env["PLATFORM"] in ("win32", "cygwin") + Posix: |
cannam@162 | 22 raise ConfigurationError("Unknown platform %s" % env["PLATFORM"]) |
cannam@162 | 23 Platform = env["PLATFORM"] |
cannam@162 | 24 |
cannam@162 | 25 # Inspired by the versioning scheme followed by Qt, it seems sensible enough. There are three components: major, minor |
cannam@162 | 26 # and micro. Major changes with each subtraction from the API (backward-incompatible, i.e. V19 vs. V18), minor changes |
cannam@162 | 27 # with each addition to the API (backward-compatible), micro changes with each revision of the source code. |
cannam@162 | 28 ApiVer = "2.0.0" |
cannam@162 | 29 |
cannam@162 | 30 Export("Platform", "Posix", "ConfigurationError", "ApiVer") |