pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/audio/csound5 csound5: catch up with scons update; sup...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/fb9db1f48493
branches:  trunk
changeset: 317225:fb9db1f48493
user:      tnn <tnn%pkgsrc.org@localhost>
date:      Wed Jan 02 18:29:14 2019 +0000

description:
csound5: catch up with scons update; support building with python 3

diffstat:

 audio/csound5/Makefile                 |    11 +-
 audio/csound5/distinfo                 |     6 +-
 audio/csound5/patches/patch-ac         |  1023 +++++++++++++++++++++++++++++++-
 audio/csound5/patches/patch-install.py |   272 ++++++++-
 4 files changed, 1261 insertions(+), 51 deletions(-)

diffs (truncated from 1571 to 300 lines):

diff -r 2b3770430dc8 -r fb9db1f48493 audio/csound5/Makefile
--- a/audio/csound5/Makefile    Wed Jan 02 18:01:00 2019 +0000
+++ b/audio/csound5/Makefile    Wed Jan 02 18:29:14 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.41 2018/07/03 05:03:01 adam Exp $
+# $NetBSD: Makefile,v 1.42 2019/01/02 18:29:14 tnn Exp $
 
 DISTNAME=              Csound${CSOUND_VERSION}
 PKGNAME=               csound5-${CSOUND_VERSION}
@@ -16,8 +16,6 @@
 USE_LANGUAGES=         c c++
 USE_TOOLS+=            bison
 CFLAGS+=               -D__PKGSRC_PREFIX__=${PREFIX}/ -DBETA
-BUILD_DEPENDS+=                scons>=0.96:../../devel/scons
-SCONS=                 ${PREFIX}/bin/scons
 SCONS_ARGS=            -C ${WRKSRC} prefix=${PREFIX}
 SCONS_ARGS+=           buildDSSI=0 buildLoris=0 buildRelease=1
 SCONS_ARGS+=           useALSA=0 useJack=0 useOSC=0 usePortMIDI=0
@@ -27,8 +25,6 @@
 # Has long files our tar doesn't understand.
 EXTRACT_USING=         gtar
 
-PYTHON_VERSIONS_INCOMPATIBLE=  34 35 36 37 # not yet ported as of 5.01
-
 INSTALLATION_DIRS=     bin
 
 CHECK_PORTABILITY_SKIP+=       installer/misc/makedeb.sh
@@ -41,7 +37,7 @@
 do-build:
        cd ${WRKSRC} && ${TOOLS_PATH.bison} -d -o frontends/beats/beats.tab.c frontends/beats/beats.y
        cd ${WRKSRC} && if [ ! -f custom.py ]; then cp custom.py.mkg custom.py; fi
-       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONS} ${SCONS_ARGS}
+       cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${SCONSBIN} ${SCONS_ARGS}
 
 do-install:
        cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${INSTALL_ENV} ${PYTHONBIN} \
@@ -50,9 +46,10 @@
 
 .include "../../audio/fluidsynth/buildlink3.mk"
 .include "../../audio/libsndfile/buildlink3.mk"
+PYTHON_FOR_BUILD_ONLY= yes
+.include "../../devel/scons/buildlink3.mk"
 .include "../../mk/jpeg.buildlink3.mk"
 .include "../../graphics/png/buildlink3.mk"
-PYTHON_FOR_BUILD_ONLY= yes
 .include "../../lang/python/application.mk"
 .include "../../x11/fltk/buildlink3.mk"
 .include "../../mk/pthread.buildlink3.mk"
diff -r 2b3770430dc8 -r fb9db1f48493 audio/csound5/distinfo
--- a/audio/csound5/distinfo    Wed Jan 02 18:01:00 2019 +0000
+++ b/audio/csound5/distinfo    Wed Jan 02 18:29:14 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.13 2015/11/03 01:12:27 agc Exp $
+$NetBSD: distinfo,v 1.14 2019/01/02 18:29:14 tnn Exp $
 
 SHA1 (Csound5.19.01.tar.gz) = eeeb3591745c5b352b9040a2dfa3805f22f5fbda
 RMD160 (Csound5.19.01.tar.gz) = ceb9952d562c57b09143a47a4d51081753f1b694
@@ -10,7 +10,7 @@
 SHA1 (patch-H_cs__par__dispatch.h) = d4c2be5958f533c8383d85efb97ecda0a33ef43d
 SHA1 (patch-Opcodes_cpumeter.c) = 45cf1eafa0fbf7d430c5f4a39a193c63e0259d5a
 SHA1 (patch-Opcodes_wavegde.h) = e1a6d742b28dd9b6b129a993102baf7218efa57c
-SHA1 (patch-ac) = 6420eba18a5c06c84a592b96d3725d6f96d238a4
+SHA1 (patch-ac) = ac09a9ee3f8be72f63aef9bc2ac977ab914428fe
 SHA1 (patch-ad) = 30aa452d35dbcd6ba4fe2c9a7680fe028368aae4
 SHA1 (patch-ae) = cba2fb017f4b940debbf7f8fd482c73c3fe19587
 SHA1 (patch-ah) = 229fc00e122288ea16ebf07f081869965cab9365
@@ -23,4 +23,4 @@
 SHA1 (patch-ao) = 83a028f92ef743072728376cf4ddc79ef3d46381
 SHA1 (patch-custom.py.mkg) = ef45464105e7d7bc8ad2401d1b19f521e12333ca
 SHA1 (patch-frontends_beats_main.c) = 5de77ee83be93120a93b86b755d767c46c58fcdf
-SHA1 (patch-install.py) = 8a02d553440bf921761a189af7b96fdd9657e870
+SHA1 (patch-install.py) = 98397ed54f1afb1551a4d82492e020842ee4dee1
diff -r 2b3770430dc8 -r fb9db1f48493 audio/csound5/patches/patch-ac
--- a/audio/csound5/patches/patch-ac    Wed Jan 02 18:01:00 2019 +0000
+++ b/audio/csound5/patches/patch-ac    Wed Jan 02 18:29:14 2019 +0000
@@ -1,7 +1,25 @@
-$NetBSD: patch-ac,v 1.9 2014/02/24 16:19:39 joerg Exp $
+$NetBSD: patch-ac,v 1.10 2019/01/02 18:29:14 tnn Exp $
+
+fix python3.x support and paths
 
 --- SConstruct.orig    2013-01-07 12:49:34.000000000 +0000
 +++ SConstruct
+@@ -1,5 +1,5 @@
+ #J vim:syntax=python
+-print '''
++print('''
+       C S O U N D 5
+ 
+ SCons build file for Csound 5:
+@@ -16,7 +16,7 @@ For MinGW, run in the MSys shell
+     and use www.python.org WIN32 Python to run scons.
+ For Microsoft Visual C++, run in the Platform SDK
+     command shell, and use www.python.org WIN32 Python to run scons.
+-'''
++''')
+ 
+ import time
+ import glob
 @@ -60,6 +60,10 @@ def getPlatform():
          return 'darwin'
      elif sys.platform[:5] == 'sunos':
@@ -13,15 +31,125 @@
      else:
          return 'unsupported'
  
-@@ -408,6 +412,8 @@ if commonEnvironment['useGettext'] == '1
+@@ -69,7 +73,7 @@ def getPlatform():
+ #
+ #############################################################################
+ 
+-print "System platform is '" + getPlatform() + "'."
++print("System platform is '" + getPlatform() + "'.")
+ 
+ 
+ # Create options that can be set from the command line.
+@@ -317,24 +321,24 @@ def compilerGNU():
+ optionsFilename = 'custom.py'
+ 
+ if compilerIntel():
+-      Tool('icl')(commonEnvironment)
+-      optionsFilename = 'custom-msvc.py'
++        Tool('icl')(commonEnvironment)
++        optionsFilename = 'custom-msvc.py'
+ elif compilerMicrosoft():
+-      optionsFilename = 'custom-msvc.py'
++        optionsFilename = 'custom-msvc.py'
+ elif getPlatform() == 'win32':
+-      # On Windows, to exclude MSVC tools,
+-      # we have to force MinGW tools and then re-create
+-      # the environment from scratch.
+-      commonEnvironment = Environment(ENV = os.environ, tools = ['mingw', 'swig', 'javac', 'jar'])
+-      commandOptions.Update(commonEnvironment)
+-      #Tool('mingw')(commonEnvironment)
+-      optionsFilename = 'custom-mingw.py'
++        # On Windows, to exclude MSVC tools,
++        # we have to force MinGW tools and then re-create
++        # the environment from scratch.
++        commonEnvironment = Environment(ENV = os.environ, tools = ['mingw', 'swig', 'javac', 'jar'])
++        commandOptions.Update(commonEnvironment)
++        #Tool('mingw')(commonEnvironment)
++        optionsFilename = 'custom-mingw.py'
+ 
+ if(not FindFile(optionsFilename, '.')):
+-    print "\n\n*************************************************"  
+-    print "%s NOT FOUND, please copy one of the custom-***.py" % optionsFilename
+-    print "as %s and modify it to suit your system, if necessary" % optionsFilename
+-    print "*************************************************"  
++    print("\n\n*************************************************"  )
++    print("%s NOT FOUND, please copy one of the custom-***.py" % optionsFilename)
++    print("as %s and modify it to suit your system, if necessary" % optionsFilename)
++    print("*************************************************"  )
+     Exit(-1)
+ 
+ 
+@@ -346,7 +350,7 @@ if commonEnvironment['custom']:
+ Requires(optionsFilename, commonEnvironment)
+    
+ 
+-print "Using options from '%s.'" % optionsFilename
++print("Using options from '%s.'" % optionsFilename)
+ 
+ fileOptions = Variables(optionsFilename)
+ fileOptions.Add('customCPPPATH', 'List of custom CPPPATH variables')
+@@ -375,21 +379,21 @@ commonEnvironment.Prepend(SWIGFLAGS = cu
+ 
+ # Define options for different platforms.
+ if getPlatform() != 'win32' and getPlatform() != 'sunos':
+-    print "Build platform is '" + getPlatform() + "'."
++    print("Build platform is '" + getPlatform() + "'.")
+ elif getPlatform() == 'sunos':
+     if compilerSun():
+-        print "Build platform is Sun Studio."
++        print("Build platform is Sun Studio.")
+     elif compilerGNU():
+-        print "Build platform is '" + getPlatform() + "'."
++        print("Build platform is '" + getPlatform() + "'.")
+ else:
+     if compilerMicrosoft():
+-        print "Build platform is Microsoft Visual C++ (MSVC)."
++        print("Build platform is Microsoft Visual C++ (MSVC).")
+     elif compilerIntel():
+-        print "Build platform is the Intel C++ Compiler (ICL)."
++        print("Build platform is the Intel C++ Compiler (ICL).")
+     elif compilerGNU():
+-        print "Build platform is MinGW/MSYS"
++        print("Build platform is MinGW/MSYS")
+ 
+-print "SCons tools on this platform: ", commonEnvironment['TOOLS']
++print("SCons tools on this platform: ", commonEnvironment['TOOLS'])
+ 
+ commonEnvironment.Prepend(CPPPATH = ['.', './H'])
+ if commonEnvironment['useLrint'] != '0':
+@@ -398,7 +402,7 @@ if commonEnvironment['useLrint'] != '0':
+ cf = Configure(commonEnvironment)
+ if commonEnvironment['useGettext'] == '1':
+   if cf.CheckHeader("libintl.h"):
+-    print "CONFIGURATION DECISION: Using GNU gettext scheme"
++    print("CONFIGURATION DECISION: Using GNU gettext scheme")
+     commonEnvironment.Prepend(CCFLAGS = ['-DGNU_GETTEXT'])
+     if getPlatform() == "win32":
+         commonEnvironment.Append(LIBS=['intl'])
+@@ -408,8 +412,10 @@ if commonEnvironment['useGettext'] == '1
          commonEnvironment.Append(LIBS=['intl'])
      if getPlatform() == 'haiku':
          commonEnvironment.Append(LIBS=['intl'])
 +    if getPlatform() == 'netbsd':
 +        commonEnvironment.Append(LIBS=['intl'])
  else:
-     print "CONFIGURATION DECISION: No localisation"
+-    print "CONFIGURATION DECISION: No localisation"
++    print("CONFIGURATION DECISION: No localisation")
+ 
+ if getPlatform() == 'haiku':
+     commonEnvironment.Append(LIBS=['network'])
+@@ -495,9 +501,9 @@ if commonEnvironment['Word64'] == '1':
+         commonEnvironment.Append(CCFLAGS = ['-fPIC'])
  
+ if commonEnvironment['useDouble'] == '0':
+-    print 'CONFIGURATION DECISION: Using single-precision floating point for audio samples.'
++    print('CONFIGURATION DECISION: Using single-precision floating point for audio samples.')
+ else:
+-    print 'CONFIGURATION DECISION: Using double-precision floating point for audio samples.'
++    print('CONFIGURATION DECISION: Using double-precision floating point for audio samples.')
+     commonEnvironment.Append(CPPFLAGS = ['-DUSE_DOUBLE'])
+     
+ # Define different build environments for different types of targets.
 @@ -505,17 +511,17 @@ else:
  if getPlatform() == 'linux':
      commonEnvironment.Append(CCFLAGS = ["-DLINUX"])
@@ -46,9 +174,21 @@
      if compilerGNU():
          commonEnvironment.Append(CCFLAGS = "-DPIPES")
          commonEnvironment.Append(LINKFLAGS = ['-Wl,-Bdynamic'])
-@@ -570,6 +576,11 @@ elif getPlatform() == 'win32':
+@@ -524,7 +530,7 @@ elif getPlatform() == 'darwin':
+     commonEnvironment.Append(CPPPATH = '/usr/local/include')
+     commonEnvironment.Append(CCFLAGS = "-DPIPES")
+     if commonEnvironment['useAltivec'] == '1':
+-        print 'CONFIGURATION DECISION: Using Altivec optimisation'
++        print('CONFIGURATION DECISION: Using Altivec optimisation')
+         commonEnvironment.Append(CCFLAGS = "-faltivec")
+ elif getPlatform() == 'haiku':
+     commonEnvironment.Append(CPPPATH = '/boot/common/include')
+@@ -568,8 +574,13 @@ elif getPlatform() == 'win32':
+     if compilerMicrosoft():
+         commonEnvironment.Append(CCFLAGS =  '/arch:sse')
      if compilerIntel():
-         print 'Generating code optimized for Intel Core 2 Duo and Pentium 4 that will run on other processors also.'
+-        print 'Generating code optimized for Intel Core 2 Duo and Pentium 4 that will run on other processors also.'
++        print('Generating code optimized for Intel Core 2 Duo and Pentium 4 that will run on other processors also.')
          commonEnvironment.Append(CCFLAGS = Split('/O3 /QaxTP'))
 +elif getPlatform() == 'netbsd' or getPlatform() == 'dragonfly' or getPlatform() == 'sunos5':
 +    commonEnvironment.Append(CCFLAGS = Split(os.environ['CFLAGS']))
@@ -58,6 +198,162 @@
  
  if getPlatform() == 'linux':
      path1 = '/usr/include/python%s' % commonEnvironment['pythonVersion']
+@@ -603,7 +614,7 @@ elif getPlatform() == 'darwin':
+     kernelstr = fout.readline()
+     fout.close()
+     OSXvers = int(kernelstr[:kernelstr.find('.')]) - 4
+-    print "Mac OS X version 10.%d" % OSXvers
++    print("Mac OS X version 10.%d" % OSXvers)
+     # dictionary mapping OS X version to Apple Python version
+     # ex. 4:3 maps OS X 10.4 to Python 2.3
+     # Note that OS X 10.2 did not ship with a Python framework
+@@ -611,21 +622,21 @@ elif getPlatform() == 'darwin':
+     OSXSystemPythonVersions = { 0:0, 1:0, 2:2, 3:3, 4:3, 5:5, 6:6, 7:7, 8:7 }
+     sysPyVers = OSXSystemPythonVersions[OSXvers]
+     if OSXvers >= 2:
+-        print "Apple Python version is 2.%d" % sysPyVers
++        print("Apple Python version is 2.%d" % sysPyVers)
+     # vers = (int(sys.hexversion) >> 24, (int(sys.hexversion) >> 16) & 255)
+     vers = sys.version_info
+     pvers = "%s.%s" % (vers[0], vers[1])
+     # This logic is not quite right on OS X 10.2 and earlier
+     # or if the MacPython version equals the expected Apple Python version
+     if vers[1] == sysPyVers:
+-        print "Current Python version is %s, using Apple Python Framework" % pvers
++        print("Current Python version is %s, using Apple Python Framework" % pvers)
+         pyBasePath = '/System/Library/Frameworks'
+     else:
+-        print "Current Python version is %s, using MacPython Framework" % pvers
++        print("Current Python version is %s, using MacPython Framework" % pvers)
+         pyBasePath = '/Library/Frameworks'
+     if commonEnvironment['pythonVersion'] != pvers:
+         commonEnvironment['pythonVersion'] = pvers
+-        print "WARNING python version used is " + pvers
++        print("WARNING python version used is " + pvers)
+     pythonIncludePath = ['%s/Python.Framework/Headers' % pyBasePath]
+     pythonLinkFlags = [ '-F' + pyBasePath, '-framework', 'python']
+     path1 = '%s/Python.framework/Versions/Current/lib' % pyBasePath
+@@ -696,44 +707,44 @@ configure = commonEnvironment.Configure(
+ })
+ 
+ if not configure.CheckHeader("stdio.h", language = "C"):
+-    print " *** Failed to compile a simple test program. The compiler is"
+-    print " *** possibly not set up correctly, or is used with invalid flags."
+-    print " *** Check config.log to find out more about the error."



Home | Main Index | Thread Index | Old Index