$NetBSD$

--- SConstruct.orig	2006-03-15 07:22:43.000000000 -0800
+++ SConstruct
@@ -50,6 +50,8 @@ def today():
 def getPlatform():
     if sys.platform[:5] == 'linux':
         return 'linux'
+    elif sys.platform[:6] == 'netbsd':
+        return 'netbsd'
     elif sys.platform[:3] == 'win':
         return 'mingw'
     elif sys.platform[:6] == 'darwin':
@@ -335,6 +337,13 @@ elif getPlatform() == 'mingw':
     pythonLinkFlags = []
     pythonLibraryPath = []
     pythonLibs = ['python%s' % commonEnvironment['pythonVersion'].replace('.', '')]
+elif getPlatform() == 'netbsd':
+    commonEnvironment.Append(CCFLAGS = Split(os.environ['CFLAGS']))
+    commonEnvironment.Append(CXXFLAGS = Split(os.environ['CXXFLAGS']))
+    pythonIncludePath = []
+    pythonLinkFlags = []
+    pythonLibraryPath = []
+    pythonLibs = []
 
 # Check for prerequisites.
 # We check only for headers; checking for libs may fail
@@ -1591,18 +1600,18 @@ else:
 
 PREFIX = commonEnvironment['prefix']
 
-BIN_DIR = PREFIX + "/bin"
-INCLUDE_DIR = PREFIX + "/include/csound"
+BIN_DIR = PREFIX + "/lib/csound5"
+INCLUDE_DIR = PREFIX + "/include/csound5"
 
 if (commonEnvironment['Word64'] == '1'):
-    LIB_DIR = PREFIX + "/lib64"
+    LIB_DIR = PREFIX + "/lib64/csound5"
 else:
-    LIB_DIR = PREFIX + "/lib"
+    LIB_DIR = PREFIX + "/lib/csound5"
 
 if commonEnvironment['useDouble'] == '0':
-    PLUGIN_DIR = LIB_DIR + "/csound/plugins"
+    PLUGIN_DIR = LIB_DIR + "/plugins"
 else:
-    PLUGIN_DIR = LIB_DIR + "/csound/plugins64"
+    PLUGIN_DIR = LIB_DIR + "/plugins"
 
 if commonEnvironment['install'] == '1':
     installExecutables = Alias('install-executables',
