[90507] trunk/dports/audio/csound
jmr at macports.org
jmr at macports.org
Wed Mar 7 17:19:27 PST 2012
Revision: 90507
http://trac.macports.org/changeset/90507
Author: jmr at macports.org
Date: 2012-03-07 17:19:26 -0800 (Wed, 07 Mar 2012)
Log Message:
-----------
csound: update to 5.16.6
Modified Paths:
--------------
trunk/dports/audio/csound/Portfile
Added Paths:
-----------
trunk/dports/audio/csound/files/
trunk/dports/audio/csound/files/InOut_widgets.cpp.patch
trunk/dports/audio/csound/files/SConstruct.patch
trunk/dports/audio/csound/files/custom-osx.py.patch
trunk/dports/audio/csound/files/pluginSDK_SConstruct.patch
Modified: trunk/dports/audio/csound/Portfile
===================================================================
--- trunk/dports/audio/csound/Portfile 2012-03-07 20:48:31 UTC (rev 90506)
+++ trunk/dports/audio/csound/Portfile 2012-03-08 01:19:26 UTC (rev 90507)
@@ -1,9 +1,12 @@
# $Id$
PortSystem 1.0
+
name csound
-version 4.23f13gbs.0
+set branch 5.16
+version ${branch}.6
categories audio
+license LGPL-2.1+
maintainers nomaintainer
description A language that is used to describe sound synthesizers.
long_description \
@@ -11,27 +14,50 @@
It is called Csound because it is written in the C programming language, \
as opposed to some of its predecessors. \
Csound was written at MIT by Barry Vercoe, \
- based on an earlier language called Music360. \
- It is free software, available under the LGPL.
+ based on an earlier language called Music360.
-homepage http://www.csounds.com
+homepage http://www.csounds.com/
platforms darwin
-master_sites sourceforge:project/csound/OldFiles/csound4
-checksums md5 2fd893dfa0256f64fb20dc8772f0c051
-depends_lib path:bin/fltk-config:fltk
+master_sites sourceforge:project/csound/csound5/csound${branch}
+distname Csound${version}
+# no bz2 for 5.16.6
+#use_bzip2 yes
+checksums md5 bfca0a5e521781e253fe8ae457bbb9c3 \
+ sha1 28bbf5d34ee5bb11dc1d50fb122b5a706d317c33 \
+ rmd160 49f3f7af3cfca6e129750564822698f4d2433329
+depends_lib path:bin/fltk-config:fltk port:libsndfile port:gettext
+depends_build port:scons
# fltk is 32-bit only
supported_archs i386 ppc
-configure.args --infodir=${prefix}/share/info
+patchfiles SConstruct.patch pluginSDK_SConstruct.patch \
+ custom-osx.py.patch InOut_widgets.cpp.patch
+post-patch {
+ reinplace "s|__PREFIX__|${prefix}|" ${worksrcpath}/custom-osx.py
+ reinplace "s|__CFLAGS__|${configure.cflags}|" ${worksrcpath}/custom-osx.py
+ reinplace "s|__CXXFLAGS__|${configure.cxxflags}|" ${worksrcpath}/custom-osx.py
+ reinplace "s|__ARCHFLAGS__|'[join ${configure.cc_archflags} "', '"]'|" ${worksrcpath}/custom-osx.py
+ reinplace "s|__FRAMEWORKS_DIR__|${frameworks_dir}|g" ${worksrcpath}/SConstruct
+ platform darwin {
+ copy ${worksrcpath}/custom-osx.py ${worksrcpath}/custom.py
+ }
+}
-post-build {
- system "cd ${worksrcpath}/flcsound/dmg && make"
-}
+use_configure no
+
+build.cmd ${prefix}/bin/scons
+build.target
+build.args prefix=${prefix} CC=${configure.cc} CXX=${configure.cxx} \
+ usePortAudio=0 usePortMIDI=0 useJack=0 useFLTK=1 \
+ buildCsound5GUI=1 buildRelease=1 dynamicCsoundLibrary=1 \
+ instdir=${destroot}
+build.post_args install=0
+destroot.args ${build.args}
+destroot.target install=1 install
+destroot.destdir
+
post-destroot {
- xinstall -d ${destroot}${applications_dir}/${name}
- file copy ${worksrcpath}/flcsound/dmg/flCsound.app \
- ${destroot}${applications_dir}/${name}
- file delete -force ${destroot}${prefix}/bin/flcsound \
- ${destroot}${prefix}/share/info/dir
+ copy ${worksrcpath}/frontends/fltk_gui/Csound5GUI.app \
+ ${destroot}${applications_dir}
}
Added: trunk/dports/audio/csound/files/InOut_widgets.cpp.patch
===================================================================
--- trunk/dports/audio/csound/files/InOut_widgets.cpp.patch (rev 0)
+++ trunk/dports/audio/csound/files/InOut_widgets.cpp.patch 2012-03-08 01:19:26 UTC (rev 90507)
@@ -0,0 +1,11 @@
+--- InOut/widgets.cpp.orig 2012-02-13 18:17:02.000000000 +1100
++++ InOut/widgets.cpp 2012-03-08 08:52:23.000000000 +1100
+@@ -25,6 +25,8 @@
+ #include <FL/Fl_Output.H>
+ #endif
+ #include "widglobals.h"
++/* this macro breaks carbon headers */
++#undef DP
+ #include <FL/x.H>
+
+
Added: trunk/dports/audio/csound/files/SConstruct.patch
===================================================================
--- trunk/dports/audio/csound/files/SConstruct.patch (rev 0)
+++ trunk/dports/audio/csound/files/SConstruct.patch 2012-03-08 01:19:26 UTC (rev 90507)
@@ -0,0 +1,166 @@
+--- SConstruct.orig 2012-02-13 18:17:02.000000000 +1100
++++ SConstruct 2012-03-08 11:36:17.000000000 +1100
+@@ -353,6 +353,7 @@
+ fileOptions.Add('customLIBS')
+ fileOptions.Add('customLIBPATH')
+ fileOptions.Add('customSHLINKFLAGS')
++fileOptions.Add('customLINKFLAGS')
+ fileOptions.Add('customSWIGFLAGS')
+ fileOptions.Update(commonEnvironment)
+
+@@ -368,6 +369,8 @@
+ commonEnvironment.Prepend(LIBPATH = customLIBPATH)
+ customSHLINKFLAGS = commonEnvironment['customSHLINKFLAGS']
+ commonEnvironment.Prepend(SHLINKFLAGS = customSHLINKFLAGS)
++customLINKFLAGS = commonEnvironment['customLINKFLAGS']
++commonEnvironment.Prepend(LINKFLAGS = customLINKFLAGS)
+ customSWIGFLAGS = commonEnvironment['customSWIGFLAGS']
+ commonEnvironment.Prepend(SWIGFLAGS = customSWIGFLAGS)
+
+@@ -475,7 +478,7 @@
+ else:
+ commonEnvironment.Prepend(LIBPATH = ['.', '#.', '/usr/local/lib64'])
+ else:
+- commonEnvironment.Prepend(LIBPATH = ['.', '#.', '/usr/local/lib'])
++ commonEnvironment.Prepend(LIBPATH = ['.', '#.'])
+
+ if commonEnvironment['Word64'] == '1':
+ if compilerSun():
+@@ -510,7 +513,6 @@
+ commonEnvironment.Append(LINKFLAGS = ['-Wl,-Bdynamic'])
+ elif getPlatform() == 'darwin':
+ commonEnvironment.Append(CCFLAGS = "-DMACOSX")
+- commonEnvironment.Append(CPPPATH = '/usr/local/include')
+ commonEnvironment.Append(CCFLAGS = "-DPIPES")
+ if commonEnvironment['useAltivec'] == '1':
+ print 'CONFIGURATION DECISION: Using Altivec optimisation'
+@@ -929,7 +931,7 @@
+ s = '-DCS_DEFAULT_PLUGINDIR=\\"%s\\"' % tmp
+ csoundLibraryEnvironment.Append(CPPFLAGS = [s])
+ elif buildOSXFramework != 0:
+- tmp = '/Library/Frameworks/%s' % OSXFrameworkCurrentVersion
++ tmp = '__FRAMEWORKS_DIR__/%s' % OSXFrameworkCurrentVersion
+ tmp += '/Resources/Opcodes'
+ if commonEnvironment['useDouble'] != '0':
+ tmp += '64'
+@@ -1026,7 +1028,7 @@
+ os.symlink(i[1], '%s/%s' % (OSXFrameworkBaseDir, i[0]))
+
+ def MacOSX_InstallHeader(headerName):
+- if not buildOSXFramework:
++ if not buildOSXFramework or commonEnvironment['install'] != '1':
+ return
+ baseName = headerName[(headerName.rfind('/') + 1):]
+ targetName = '%s/Headers/%s' % (OSXFrameworkCurrentVersion, baseName)
+@@ -1038,8 +1040,8 @@
+ csoundFrameworkEnvironment.Command(targetName, headerName, cmd)
+
+ def MacOSX_InstallPlugin(fileName):
+- if buildOSXFramework:
+- print "COPYINNG plugin"
++ if buildOSXFramework and commonEnvironment['install'] == '1':
++ print "COPYING plugin"
+ pluginDir = '%s/Resources/Opcodes' % OSXFrameworkCurrentVersion
+ if commonEnvironment['useDouble'] != '0':
+ pluginDir += '64'
+@@ -1227,6 +1229,7 @@
+ libCsoundSources += newParserSources
+
+ csoundLibraryEnvironment.Append(CCFLAGS='-fPIC')
++append_csoundLibrary_to_libs = True
+ if commonEnvironment['dynamicCsoundLibrary'] == '1':
+ print 'CONFIGURATION DECISION: Building dynamic Csound library'
+ if getPlatform() == 'linux' or getPlatform() == 'sunos':
+@@ -1256,7 +1259,7 @@
+ -Xlinker -current_version -Xlinker %s
+ ''' % libVersion))
+ csoundFrameworkEnvironment.Append(SHLINKFLAGS = Split('''
+- -install_name /Library/Frameworks/%s/%s
++ -install_name __FRAMEWORKS_DIR__/%s/%s
+ ''' % (OSXFrameworkCurrentVersion, libName)))
+ csoundLibraryFile = csoundFrameworkEnvironment.SharedLibrary(
+ libName, libCsoundSources, SHLIBPREFIX = '', SHLIBSUFFIX = '')
+@@ -1266,10 +1269,16 @@
+ 'cp -f %s %s/' % (libName, OSXFrameworkCurrentVersion))
+ for i in headers:
+ MacOSX_InstallHeader(i)
++ CsoundLib_install_path = '%s__FRAMEWORKS_DIR__/%s' % (commonEnvironment['instdir'], OSXFrameworkBaseDir)
++ if commonEnvironment['install'] == '1':
++ CsoundLib_install_cmd = 'rm -r CsoundLib_install_path; cp -R %s %s__FRAMEWORKS_DIR__/' % (OSXFrameworkBaseDir, commonEnvironment['instdir'])
++ else:
++ CsoundLib_install_cmd = 'true'
+ csoundLibrary = csoundFrameworkEnvironment.Command(
+- 'CsoundLib_install',
++ 'CsoundLib.framework',
+ libName,
+- 'rm -r /Library/Frameworks/%s; cp -R %s /Library/Frameworks/' % (OSXFrameworkBaseDir, OSXFrameworkBaseDir))
++ CsoundLib_install_cmd)
++ append_csoundLibrary_to_libs = False
+ libCsoundLinkFlags += ['-F.', '-framework', libName, '-lsndfile']
+ libCsoundLibs = []
+ elif getPlatform() == 'win32':
+@@ -1290,15 +1299,16 @@
+ libCsoundLibs.insert(0,csoundLibrary)
+ elif getPlatform() == 'win32' or (getPlatform() == 'darwin' and commonEnvironment['dynamicCsoundLibrary']=='0'):
+ libCsoundLibs.append(csoundLibraryName)
+-libs.append(csoundLibrary)
++if append_csoundLibrary_to_libs:
++ libs.append(csoundLibrary)
+
+ pluginEnvironment = commonEnvironment.Clone()
+ pluginEnvironment.Append(LIBS = Split('sndfile'))
+
+ if getPlatform() == 'darwin':
+- pluginEnvironment.Append(LINKFLAGS = Split('''
+- -framework CoreMidi -framework CoreFoundation -framework CoreServices -framework CoreAudio
+- '''))
++ # Append is behaving like AppendUnique and eating "duplicate" -framework args for some reason...
++ for f in ['CoreMidi', 'CoreFoundation', 'CoreServices', 'CoreAudio']:
++ pluginEnvironment.Append(FRAMEWORKS = [f])
+ # pluginEnvironment.Append(LINKFLAGS = ['-dynamiclib'])
+ pluginEnvironment['SHLIBSUFFIX'] = '.dylib'
+ # pluginEnvironment.Prepend(CXXFLAGS = "-fno-rtti")
+@@ -1402,14 +1412,14 @@
+ csoundInterfacesEnvironment.Append(SHLINKFLAGS = Split(
+ '''-Xlinker -current_version -Xlinker %s''' % ilibVersion))
+ tmp = '''-install_name
+- /Library/Frameworks/%s/%s'''
++ __FRAMEWORKS_DIR__/%s/%s'''
+ csoundInterfacesEnvironment.Append(SHLINKFLAGS = Split(
+ tmp % (OSXFrameworkCurrentVersion,ilibName)))
+ csnd = csoundInterfacesEnvironment.SharedLibrary(
+ '_csnd', csoundInterfacesSources)
+ try: os.symlink('lib_csnd.dylib', 'libcsnd.dylib')
+ except: pass
+- csoundInterfacesEnvironment.Command('interfaces install', csnd, "cp lib_csnd.dylib /Library/Frameworks/%s/lib_csnd.dylib" % (OSXFrameworkCurrentVersion))
++ csoundInterfacesEnvironment.Command('interfaces install', csnd, "cp lib_csnd.dylib __FRAMEWORKS_DIR__/%s/lib_csnd.dylib" % (OSXFrameworkCurrentVersion))
+ else:
+ csnd = csoundInterfacesEnvironment.Library('csnd', csoundInterfacesSources)
+ elif getPlatform() == 'linux':
+@@ -1826,7 +1836,8 @@
+ vstEnvironment.Append(LIBS = ['stdc++', 'pthread', 'm'])
+ guiProgramEnvironment.Append(LIBS = ['stdc++', 'pthread', 'm'])
+ if getPlatform() == 'darwin':
+- csoundProgramEnvironment.Append(LINKFLAGS = Split('''-framework Carbon -framework CoreAudio -framework CoreMidi'''))
++ for f in ['Carbon', 'CoreAudio', 'CoreMidi']:
++ csoundProgramEnvironment.Append(FRAMEWORKS = [f])
+
+ if (not (commonEnvironment['useFLTK'] == '1' and fltkFound)):
+ print 'CONFIGURATION DECISION: Not building with FLTK graphs and widgets.'
+@@ -2009,7 +2020,7 @@
+ vst4Environment = vstEnvironment.Clone()
+ vst4Environment.Append(LIBS = ['fltk'])
+ vst4Environment.Append(LIBS = ['stdc++'])
+- vst4Environment.Append(LINKFLAGS=['-framework', 'carbon', '-framework',
++ vst4Environment.Append(LINKFLAGS=['-framework', 'Carbon', '-framework',
+ 'ApplicationServices'])
+ vst4Environment.Append(CPPPATH = ['frontends/CsoundVST'])
+ vst4Environment.Append(CPPFLAGS = ['-DCS_VSTHOST'])
+@@ -2193,7 +2204,6 @@
+ luaEnvironment['ENV']['PATH'] = os.environ['PATH']
+ elif getPlatform() == 'darwin':
+ luaEnvironment.Append(LIBS = 'luajit-51')
+- luaEnvironment.Append(CPPPATH = '/usr/local/include/luajit-2.0')
+ luaEnvironment.Append(CPPFLAGS = '-fopenmp')
+ luaOpcodes = makePlugin(luaEnvironment, 'LuaCsound',
+ ['Opcodes/LuaCsound.cpp'])
Added: trunk/dports/audio/csound/files/custom-osx.py.patch
===================================================================
--- trunk/dports/audio/csound/files/custom-osx.py.patch (rev 0)
+++ trunk/dports/audio/csound/files/custom-osx.py.patch 2012-03-08 01:19:26 UTC (rev 90507)
@@ -0,0 +1,31 @@
+--- custom-osx.py.orig 2012-02-13 18:17:02.000000000 +1100
++++ custom-osx.py 2012-03-08 08:39:20.000000000 +1100
+@@ -7,13 +7,14 @@
+ '''
+ import sys
+
+-customCPPPATH = []
+-customCCFLAGS = []
++customCPPPATH = ['__PREFIX__/include']
++customCCFLAGS = ['__CFLAGS__', __ARCHFLAGS__]
+ customCCPFLAGS = []
+-customCXXFLAGS = []
++customCXXFLAGS = ['__CXXFLAGS__', __ARCHFLAGS__]
+ customLIBS = []
+-customLIBPATH = []
++customLIBPATH = ['__PREFIX__/lib']
+ customSHLINKFLAGS = []
++customLINKFLAGS = [__ARCHFLAGS__]
+ customSWIGFLAGS = []
+
+ ## This seems to do nothing
+@@ -26,9 +27,6 @@
+ customCCFLAGS.append('-I/usr/local/include/libcwiimote-0.4.0/libcwiimote')
+ elif sys.platform == 'darwin':
+ platform = 'darwin'
+- customCPPPATH.append('/usr/include/malloc')
+- customCPPPATH.append('/opt/local/include/boost-1_32/')
+- customCPPPATH.append('/usr/include/python2.3')
+ customCXXFLAGS.append('-fabi-version=0')
+ elif sys.platform[:3] == 'win':
+ # For the basic build you need MinGW, MSys, and libsndfile.
Added: trunk/dports/audio/csound/files/pluginSDK_SConstruct.patch
===================================================================
--- trunk/dports/audio/csound/files/pluginSDK_SConstruct.patch (rev 0)
+++ trunk/dports/audio/csound/files/pluginSDK_SConstruct.patch 2012-03-08 01:19:26 UTC (rev 90507)
@@ -0,0 +1,48 @@
+--- pluginSDK/SConstruct.orig 2012-02-13 18:17:02.000000000 +1100
++++ pluginSDK/SConstruct 2012-03-08 11:34:58.000000000 +1100
+@@ -87,6 +87,7 @@
+ opts.Add('customLIBS')
+ opts.Add('customLIBPATH')
+ opts.Add('customSHLINKFLAGS')
++opts.Add('customLINKFLAGS')
+ opts.Add('customSWIGFLAGS')
+ opts.Add('useDouble',
+ 'Set to 1 to use double-precision floating point for audio samples.',
+@@ -135,6 +136,8 @@
+ commonEnvironment.Prepend(LIBPATH = customLIBPATH)
+ customSHLINKFLAGS = commonEnvironment['customSHLINKFLAGS']
+ commonEnvironment.Prepend(SHLINKFLAGS = customSHLINKFLAGS)
++customLINKFLAGS = commonEnvironment['customLINKFLAGS']
++commonEnvironment.Prepend(LINKFLAGS = customLINKFLAGS)
+ customSWIGFLAGS = commonEnvironment['customSWIGFLAGS']
+ commonEnvironment.Prepend(SWIGFLAGS = customSWIGFLAGS)
+
+@@ -192,7 +195,7 @@
+ commonEnvironment.Prepend(LIBPATH = ['.', '#.', '/usr/local/lib64'])
+ commonEnvironment.Append(CCFLAGS = ['-fPIC'])
+ else:
+- commonEnvironment.Prepend(LIBPATH = ['.', '#.', '/usr/local/lib'])
++ commonEnvironment.Prepend(LIBPATH = ['.', '#.'])
+
+ if commonEnvironment['useDouble'] == '0':
+ print 'CONFIGURATION DECISION: Using single-precision floating point for audio samples.'
+@@ -214,7 +217,6 @@
+ commonEnvironment.Append(LINKFLAGS = ['-Wl,-Bdynamic'])
+ elif getPlatform() == 'darwin':
+ commonEnvironment.Append(CCFLAGS = "-DMACOSX")
+- commonEnvironment.Append(CPPPATH = '/usr/local/include')
+ commonEnvironment.Append(CCFLAGS = "-DPIPES")
+ if commonEnvironment['useAltivec'] == '1':
+ print 'CONFIGURATION DECISION using Altivec optmisation'
+@@ -278,9 +280,8 @@
+ #pluginEnvironment.Append(LIBS = ['sndfile'])
+
+ if getPlatform() == 'darwin':
+- pluginEnvironment.Append(LINKFLAGS = Split('''
+- -framework CoreMidi -framework CoreFoundation -framework CoreAudio
+- '''))
++ for f in ['CoreMidi', 'CoreFoundation', 'CoreAudio']:
++ pluginEnvironment.Append(FRAMEWORKS = [f])
+ # pluginEnvironment.Append(LINKFLAGS = ['-dynamiclib'])
+ pluginEnvironment['SHLIBSUFFIX'] = '.dylib'
+ pluginEnvironment.Prepend(CXXFLAGS = "-fno-rtti")
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20120307/88985710/attachment-0001.html>
More information about the macports-changes
mailing list