rpms/csound/OLPC-2 csound-5.07.0-version-libcsnd.patch, NONE, 1.1 csound.spec, 1.15, 1.16

Daniel Williams (dcbw) fedora-extras-commits at redhat.com
Thu Sep 13 19:37:27 UTC 2007


Author: dcbw

Update of /cvs/extras/rpms/csound/OLPC-2
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv27376

Modified Files:
	csound.spec 
Added Files:
	csound-5.07.0-version-libcsnd.patch 
Log Message:
* Thu Sep 13 2007 Dan Williams <dcbw at redhat.com> - 5.07.0-0.4.cvs20070830
- Put libcsnd.so in the right place, and version it



csound-5.07.0-version-libcsnd.patch:

--- NEW FILE csound-5.07.0-version-libcsnd.patch ---
diff -up csound5/install.py.version-libcsnd csound5/install.py
--- csound5/install.py.version-libcsnd	2007-09-13 14:50:54.000000000 -0400
+++ csound5/install.py	2007-09-13 14:51:40.000000000 -0400
@@ -256,6 +256,7 @@ libList = findFiles('.', 'libcsound\\.a'
 libList += findFiles('.', 'libcsound64\\.a')
 libList += findFiles('.', 'libcsound\\.so\\..+')
 libList += findFiles('.', 'libcsound64\\.so\\..+')
+libList += findFiles('.', 'libcsnd\\.so\\..+')
 libList += findFiles('.', '_csnd\\.so')
 libList += findFiles('.', 'lib_jcsound\\.so')
 libList += findFiles('.', 'lib_CsoundVST\\.so')
@@ -269,6 +270,8 @@ for i in libList:
     if err == 0:
         if i[:13] == 'libcsound.so.':
             err = installLink(i, concatPath([libDir, 'libcsound.so']))
+        elif i[:11] == 'libcsnd.so.':
+            err = installLink(i, concatPath([libDir, 'libcsnd.so']))
         elif i[:15] == 'libcsound64.so.':
             err = installLink(i, concatPath([libDir, 'libcsound64.so']))
         elif i == 'lib_CsoundVST.so':
diff -up csound5/SConstruct.version-libcsnd csound5/SConstruct
--- csound5/SConstruct.version-libcsnd	2007-09-13 13:58:28.000000000 -0400
+++ csound5/SConstruct	2007-09-13 13:58:28.000000000 -0400
@@ -1097,6 +1097,8 @@ else:
         os.spawnvp(os.P_WAIT, 'rm', ['rm', '-f', '_csnd.so'])
         # os.symlink('lib_csnd.so', '_csnd.so')
         csoundInterfacesEnvironment.Append(LINKFLAGS = ['-Wl,-rpath-link,.'])
+    # Copy here to avoid poluting SHLINKFLAGS for python
+    csndPythonEnvironment = csoundInterfacesEnvironment.Copy()
     if getPlatform() == 'darwin':
         ilibName = "lib_csnd.dylib"
         ilibVersion = csoundLibraryVersion
@@ -1112,22 +1114,35 @@ else:
         csoundInterfaces = csoundInterfacesEnvironment.SharedLibrary(
          '_csnd', csoundInterfacesSources)
     else:
-        csoundInterfaces = csoundInterfacesEnvironment.SharedLibrary('csnd', csoundInterfacesSources)
+        if getPlatform() == 'linux':
+            # save interfaces environment before adding -soname
+            libName = 'libcsnd.so'
+            libName2 = libName + '.' + csoundLibraryVersion
+            os.spawnvp(os.P_WAIT, 'rm', ['rm', '-f', libName])
+            os.symlink(libName2, libName)
+            tmp = csoundInterfacesEnvironment['SHLINKFLAGS']
+            tmp += ['-Wl,-soname=%s' % libName2]
+            csoundInterfaces = csoundInterfacesEnvironment.SharedLibrary(
+                libName2, csoundInterfacesSources,
+                SHLINKFLAGS = tmp, SHLIBPREFIX = '', SHLIBSUFFIX = '')
+        else:
+            csoundInterfaces = csoundInterfacesEnvironment.SharedLibrary('csnd', csoundInterfacesSources)
+
     Depends(csoundInterfaces, csoundLibrary)
     libs.append(csoundInterfaces)
     if pythonFound:
-        csoundInterfacesEnvironment.Append(LINKFLAGS = pythonLinkFlags)
-        csoundInterfacesEnvironment.Prepend(LIBPATH = pythonLibraryPath)
-        csoundInterfacesEnvironment.Prepend(LIBS = pythonLibs)
-        csoundInterfacesEnvironment.Append(CPPPATH = pythonIncludePath)
-        csndPythonEnvironment = csoundInterfacesEnvironment.Copy()
+        csndPythonEnvironment.Append(LINKFLAGS = pythonLinkFlags)
+        csndPythonEnvironment.Prepend(LIBPATH = pythonLibraryPath)
+        csndPythonEnvironment.Prepend(LIBS = pythonLibs)
+        csndPythonEnvironment.Append(CPPPATH = pythonIncludePath)
         if getPlatform() == 'darwin':
          csndPythonEnvironment.Append(LIBS = ['_csnd'])
         else:
          csndPythonEnvironment.Append(LIBS = ['csnd'])
         csoundPythonInterface = csndPythonEnvironment.SharedObject(
             'interfaces/python_interface.i',
-            SWIGFLAGS = [swigflags, '-python', '-outdir', '.'])
+            SWIGFLAGS = [swigflags, '-python', '-outdir', '.'],
+            SHLINKFLAGS = '')
         if getPlatform() == 'win32' and pythonLibs[0] < 'python24' and not withMSVC():
             Depends(csoundPythonInterface, pythonImportLibrary)
         csndModule = makePythonModule(csndPythonEnvironment, 'csnd', [csoundPythonInterface])


Index: csound.spec
===================================================================
RCS file: /cvs/extras/rpms/csound/OLPC-2/csound.spec,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- csound.spec	31 Aug 2007 16:05:11 -0000	1.15
+++ csound.spec	13 Sep 2007 19:36:54 -0000	1.16
@@ -11,7 +11,7 @@
 Summary:       Csound - sound synthesis language and library
 Name:          csound
 Version:       5.07.0
-Release:       0.3.cvs20070830%{?dist}
+Release:       0.4.cvs20070830%{?dist}
 URL:           http://csound.sourceforge.net/
 License:       LGPL
 Group:         Applications/Multimedia
@@ -45,6 +45,7 @@
 Patch5: csound-5.03.0-rtalsa-fix.patch
 Patch6: csound-5.07-log-segfault-fix.patch
 Patch7: csound-5.03.0-add-oggplay.patch
+Patch8: csound-5.07.0-version-libcsnd.patch
 
 %description
 Csound is a sound and music synthesis system, providing facilities for
@@ -191,6 +192,7 @@
 %patch5 -p1 -b .rtalsa-fix
 %patch6 -p1 -b .logfile-segfault-fix
 %patch7 -p1 -b .add-oggplay
+%patch8 -p1 -b .version-libcsnd
 
 tar xf %{SOURCE1}
 
@@ -250,6 +252,8 @@
 # This file is zero-lenth for some reason
 %{__rm} -f manual/examples/ifthen.csd
 
+%{__rm} -f %{buildroot}%{_libdir}/%{name}/plugins/libcsnd.so
+
 install -dm 755 %{buildroot}%{_javadir}
 (cd %{buildroot}%{_javadir}; ln -s %{_libdir}/%{name}/java/csnd.jar .)
 
@@ -304,6 +308,7 @@
 %{_bindir}/pv_export
 %{_bindir}/pv_import
 %{_libdir}/lib%{name}.so.5.1
+%{_libdir}/libcsnd.so.5.1
 %dir %{_datadir}/%{name}
 %{_datadir}/%{name}/xmg/*.xmg
 %dir %{_libdir}/%{name}/plugins
@@ -312,7 +317,6 @@
 %{_libdir}/%{name}/plugins/libbarmodel.so
 %{_libdir}/%{name}/plugins/libcompress.so
 %{_libdir}/%{name}/plugins/libcontrol.so
-%{_libdir}/%{name}/plugins/libcsnd.so
 %{_libdir}/%{name}/plugins/libdate.so
 %{_libdir}/%{name}/plugins/libeqfil.so
 %{_libdir}/%{name}/plugins/libftest.so
@@ -353,6 +357,7 @@
 %defattr(-,root,root,0755)
 %{_includedir}/%{name}/
 %{_libdir}/lib%{name}.so
+%{_libdir}/libcsnd.so
 
 %files python
 %defattr(-,root,root,0755)
@@ -420,6 +425,9 @@
 %doc tutorial/*.py
 
 %changelog
+* Thu Sep 13 2007 Dan Williams <dcbw at redhat.com> - 5.07.0-0.4.cvs20070830
+- Put libcsnd.so in the right place, and version it
+
 * Fri Aug 31 2007 Dan Williams <dcbw at redhat.com> - 5.07.0-0.3.cvs20070830
 - Add oggplay patch
 




More information about the fedora-extras-commits mailing list