$NetBSD: patch-aa,v 1.3 2012/06/28 07:32:37 sbd Exp $ diff -ru Sconstruct.orig Sconstruct --- Sconstruct.orig 2010-09-19 15:36:25.000000000 +0000 +++ Sconstruct @@ -47,7 +47,7 @@ def get_platform_flags( opts ): env = Environment( options = opts ) - if sys.platform == "linux2" or sys.platform == "darwin": + if sys.platform == "linux2" or sys.platform == "darwin" or sys.platform[:6] == "netbsd": if str(env['debug']) == "1": cppflags += ['-Wall', '-g2', '-ggdb', '-O0'] for flag in env["optflags"].split(" "): @@ -73,6 +73,11 @@ def get_platform_flags( opts ): cppflags.append('-DLADSPA_SUPPORT') + includes.append( env['prefix'] + "/include" ) + ldflags.append( "-L" + env['prefix'] + "/lib" ) + ldflags.append( "-Wl,-R," + env['prefix'] + "/lib" ) + # XXX: this should go in py4.py but i'm not sure where + ldflags.append( "-Wl,-R," + env['prefix'] + "/qt4/lib" ) if str(env['libarchive']) == "1": cppflags.append('-DLIBARCHIVE_SUPPORT') @@ -87,6 +92,9 @@ def get_platform_flags( opts ): if sys.platform == 'linux2': ldflags.append('-lasound') + elif sys.platform[:6] == 'netbsd': + ldflags.append('-lossaudio') + elif sys.platform == "win32": includes.append( '3rdparty\libsndfile-1_0_17' ) includes.append( 'build\pthreads\include' ) @@ -269,7 +277,7 @@ def get_hydrogen_gui( lib_hydrogen , opt if str(env['lash']) == "1": env.ParseConfig('pkg-config --cflags --libs lash-1.0') - if sys.platform == "darwin" or sys.platform == "linux2": + if sys.platform == "darwin" or sys.platform == "linux2" or sys.platform[:6] == "netbsd": env.Append( LIBS = ["z"] ) if sys.platform == "darwin" and str(env['coreaudio']) == "1":