~ubuntu-branches/ubuntu/karmic/csound/karmic

« back to all changes in this revision

Viewing changes to debian/patches/2002-csoundac.diff

  • Committer: Bazaar Package Importer
  • Author(s): Jonas Smedegaard
  • Date: 2008-06-21 23:12:05 UTC
  • mfrom: (3.1.1 lenny)
  • Revision ID: james.westby@ubuntu.com-20080621231205-3zn5a4jqvuy858j0
Tags: 1:5.08.0.dfsg2-8
Only warn about copyright-check.mk discoveries.  Closes: bug#487052.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Enable support for building CsoundAC as a shared library.
 
2
Index: csound-5.08.0.dfsg2/SConstruct
 
3
===================================================================
 
4
--- csound-5.08.0.dfsg2.orig/SConstruct 2008-05-09 22:06:37.000000000 -0400
 
5
+++ csound-5.08.0.dfsg2/SConstruct      2008-05-09 22:06:46.000000000 -0400
 
6
@@ -1961,7 +1961,7 @@
 
7
     acEnvironment.Append(LIBPATH = pythonLibraryPath)
 
8
     if getPlatform() != 'darwin':
 
9
         acEnvironment.Prepend(LIBS = pythonLibs)
 
10
-        acEnvironment.Prepend(LIBS = ['csnd'])
 
11
+        acEnvironment.Prepend(LIBS = csoundInterfaces)
 
12
     else:
 
13
         acEnvironment.Prepend(LIBS = ['_csnd'])
 
14
     acEnvironment.Append(LINKFLAGS = libCsoundLinkFlags)
 
15
@@ -1972,8 +1972,6 @@
 
16
         acEnvironment.Append(SHLINKFLAGS = '--no-export-all-symbols')
 
17
         acEnvironment.Append(LINKFLAGS = ['-Wl,-rpath-link,.'])
 
18
         guiProgramEnvironment.Prepend(LINKFLAGS = ['-Wl,-rpath-link,.'])
 
19
-        os.spawnvp(os.P_WAIT, 'rm', ['rm', '-f', '_CsoundAC.so'])
 
20
-        os.symlink('lib_CsoundAC.so', '_CsoundAC.so')
 
21
     elif getPlatform() == 'darwin':
 
22
         acEnvironment.Append(LIBS = ['dl', 'm'])
 
23
         acEnvironment.Append(SHLINKFLAGS = '--no-export-all-symbols')
 
24
@@ -2024,7 +2022,17 @@
 
25
     acWrapperEnvironment = acEnvironment.Copy()
 
26
     fixCFlagsForSwig(acWrapperEnvironment)
 
27
     if commonEnvironment['dynamicCsoundLibrary'] == '1':
 
28
-        csoundac = acEnvironment.Library('CsoundAC', csoundAcSources)
 
29
+        if getPlatform() == 'linux':
 
30
+            os.spawnvp(os.P_WAIT, 'rm', ['rm', '-f', 'libCsoundAC.so'])
 
31
+            os.symlink('libCsoundAC.so.%s' % csoundLibraryVersion,
 
32
+                'libCsoundAC.so')
 
33
+            linkflags = acEnvironment['SHLINKFLAGS'] + \
 
34
+                 [ '-Wl,-soname=libCsoundAC.so.%s' % csoundLibraryVersion ]
 
35
+            csoundac = acEnvironment.SharedLibrary(
 
36
+                'libCsoundAC.so.%s' % csoundLibraryVersion, csoundAcSources,
 
37
+                SHLIBPREFIX = '', SHLIBSUFFIX = '', SHLINKFLAGS = linkflags )
 
38
+        else:
 
39
+            csoundac = acEnvironment.Library('CsoundAC', csoundAcSources)
 
40
     else:
 
41
         csoundac = acEnvironment.Library('CsoundAC', csoundAcSources)
 
42
     libs.append(csoundac)
 
43
@@ -2043,7 +2051,7 @@
 
44
         acPythonEnvironment.Prepend(LIBPATH = pythonLibraryPath)
 
45
         acPythonEnvironment.Prepend(LIBS = pythonLibs)
 
46
         acPythonEnvironment.Append(CPPPATH = pythonIncludePath)
 
47
-        acPythonEnvironment.Prepend(LIBS = ['CsoundAC'])
 
48
+        acPythonEnvironment.Prepend(LIBS = csoundac)
 
49
         csoundAcPythonModule = makePythonModule(acPythonEnvironment, 'CsoundAC',
 
50
                                                 [csoundAcPythonWrapper])
 
51
         if getPlatform() == 'win32' and pythonLibs[0] < 'python24' and compilerGNU():
 
52
@@ -2051,7 +2059,7 @@
 
53
         pythonModules.append('CsoundAC.py')
 
54
     counterpoint = acEnvironment.Program(
 
55
         'counterpoint', ['frontends/CsoundAC/CounterpointMain.cpp'],
 
56
-        LIBS = Split('CsoundAC csnd csound64'))
 
57
+        LIBS = [csoundInterfaces, csoundac, csoundLibrary] )
 
58
     zipDependencies.append(counterpoint)
 
59
 
 
60
 # Build CsoundVST