summaryrefslogtreecommitdiff
path: root/audio/hydrogen/patches/patch-aa
blob: 8fa1bdb9c83087f6adcbb958055581c93d3ac935 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
$NetBSD: patch-aa,v 1.5 2013/01/11 13:23:33 joerg Exp $

--- Sconstruct.orig	2012-02-19 21:54:05.000000000 +0000
+++ Sconstruct
@@ -47,7 +47,7 @@ def get_platform_flags( opts ):
 
 	env = Environment( options = opts )
 
-	if sys.platform == "linux2" or sys.platform == "linux3" or sys.platform == "darwin":
+	if sys.platform == "linux2" or sys.platform == "linux3" 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(" "):
@@ -75,6 +75,12 @@ def get_platform_flags( opts ):
 		    if str(env['bundle']) == "1": cppflags.append('-DBUNDLE_SUPPORT')
 
 		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['gui']) == "0": cppflags.append('-DNO_GUI_SUPPORT')
@@ -96,6 +102,10 @@ def get_platform_flags( opts ):
 		ldflags.append('-lasound')
 	#	ldflags.append('-lrubberband')
 
+	elif sys.platform[:6] == 'netbsd':
+		cppflags.append('-pthread')
+		ldflags.append('-lossaudio')
+
 	elif sys.platform == "win32":
 		includes.append( '3rdparty\libsndfile-1_0_17' )
 		includes.append( 'build\pthreads\include' )
@@ -283,6 +293,9 @@ def get_hydrogen_gui( lib_hydrogen , opt
 		env.Append( LIBS = ["z"] )
 		env.Append( LIBS = ["pthread"] )
 
+	if sys.platform[:6] == "netbsd":
+		env.Append( LIBS = ["z"] )
+
 	if sys.platform == "darwin" and str(env['coreaudio']) == "1":
 		env.Append( LINKFLAGS = ['-framework','ApplicationServices'])
 		env.Append( LINKFLAGS = ['-framework','AudioUnit'])
@@ -302,7 +315,7 @@ def get_hydrogen_gui( lib_hydrogen , opt
 	env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/img"))
 
 	#add every img in ./data/img to the install list. 
-	os.path.walk("./data/img/",install_images,env) 
+	#os.path.walk("./data/img/",install_images,env) 
 
 
 	env.Alias(target="install", source=env.Install(dir= env['DESTDIR'] + env['prefix'] + '/share/hydrogen/data', source="./data/drumkits"))
@@ -380,7 +393,7 @@ else:
 
 includes, a , b = get_platform_flags( opts )
 
-env = Environment(options = opts, CPPPATH = includes)
+env = Environment(options = opts, ENV=os.environ, CPPPATH = includes)
 
 
 Help(opts.GenerateHelpText(env))