File fix-install-dirs.patch of Package essentia

Index: essentia-2.1.0+git20190804.ed59cc48/src/wscript
===================================================================
--- essentia-2.1.0+git20190804.ed59cc48.orig/src/wscript
+++ essentia-2.1.0+git20190804.ed59cc48/src/wscript
@@ -2,6 +2,7 @@
 # -*- coding: utf-8 -*-
 
 from __future__ import print_function
+from waflib import Utils
 
 import sys
 import os.path
@@ -471,13 +472,14 @@ def build(ctx):
         sources += ctx.path.ant_glob('3rdparty/cephes/bessel/*.cpp') 
     else:
         print('Building without 3rdparty Cephes library code (Bessel functions) because SNR algorithm is ignored')
+    ctx.env.INCLUDES += ['/usr/include/eigen3/' ]
 
     if ctx.env.BUILD_STATIC:
         ctx.stlib(
             source   = sources,
             target   = 'essentia',
             use      = ctx.env.USES,
-            install_path = '${PREFIX}/lib',
+            install_path = '${PREFIX}/lib%s' % Utils.lib64(),
             #includes = ctx.env.includes
         )
     else:
@@ -487,7 +489,7 @@ def build(ctx):
             use      = ctx.env.USES,
             includes = ctx.env.INCLUDES,
             cxxflags = [ '-w' ],
-            install_path = '${PREFIX}/lib'
+            install_path = '${PREFIX}/lib%s' % Utils.lib64()
         )
 
     ctx(source='../essentia.pc.in', **ctx.env.pcfile_opts)
@@ -508,7 +510,7 @@ def build(ctx):
     # install pkgconfig file
     #pc = ctx.path.ant_glob('essentia/build/essentia.pc') #TODO remove
     #ctx.install_files('${PREFIX}/lib/pkgconfig', pc)     #TODO remove
-    ctx.install_files('${PREFIX}/lib/pkgconfig', '../build/essentia.pc')
+    ctx.install_files('${PREFIX}/lib%s/pkgconfig' % Utils.lib64(), '../build/essentia.pc')
 
 
     if ctx.env.EXAMPLE_LIST or ctx.env.WITH_VAMP:
Index: essentia-2.1.0+git20190804.ed59cc48/src/python/wscript
===================================================================
--- essentia-2.1.0+git20190804.ed59cc48.orig/src/python/wscript
+++ essentia-2.1.0+git20190804.ed59cc48/src/python/wscript
@@ -54,9 +54,9 @@ def build(ctx):
         features = 'pyext',
         includes = NUMPY_INCPATH + [ '.', 'pytypes' ] + adjust(ctx.env.INCLUDES, '..'),
         cxxflags = [ '-w' ],
-        install_path = '${PYTHONDIR}/essentia',
+        install_path = '${PYTHONARCHDIR}/essentia',
         use      = ctx.env.USES if ctx.env.ONLY_PYTHON else 'essentia ' #+ ctx.env.USES
     )
 
-    ctx.install_files('${PYTHONDIR}', ctx.path.ant_glob('essentia/**/*.py'),
+    ctx.install_files('${PYTHONARCHDIR}', ctx.path.ant_glob('essentia/**/*.py'),
                       relative_trick=True)
Index: essentia-2.1.0+git20190804.ed59cc48/src/examples/wscript
===================================================================
--- essentia-2.1.0+git20190804.ed59cc48.orig/src/examples/wscript
+++ essentia-2.1.0+git20190804.ed59cc48/src/examples/wscript
@@ -3,6 +3,7 @@
 from __future__ import print_function
 
 from waflib.TaskGen import feature, before_method
+from waflib import Utils
 import distutils.sysconfig
 import os
 import sys
@@ -155,22 +156,18 @@ def build(ctx):
 
 
     if ctx.env.WITH_VAMP:
-        ctx.env.INCLUDES += [ '3rdparty/vamp-plugin-sdk-2.4' ]
-        vamp_sdk_files = ctx.path.parent.ant_glob('3rdparty/vamp-plugin-sdk-2.4/src/vamp-sdk/*.cpp')
-        # remove this file, it is already included by FFT.cpp
-        vamp_sdk_files = [ f for f in vamp_sdk_files if os.path.basename(f.srcpath()) != 'FFTimpl.cpp' ]
-
         if sys.platform == 'darwin':
             install_path = os.environ['HOME'] + '/Library/Audio/Plug-Ins/Vamp'
         elif sys.platform.startswith('linux'):
-            install_path = '/usr/local/lib/vamp'
+            install_path = '${PREFIX}/lib%s/vamp' % Utils.lib64()
         else:
             install_path = None
 
         vamp = ctx.shlib(
-            source   = ctx.path.ant_glob('vamp*.cpp') + vamp_sdk_files,
+            source   = ctx.path.ant_glob('vamp*.cpp'),
             target   = 'vamp_essentia',
-            includes = [ '.', '..', '../3rdparty/vamp-plugin-sdk-2.4' ],
+            includes = [ '.', '..' ],
             use      = 'essentia ', #+ ctx.env.USES,
+            uselib   = 'vamp-sdk',
             install_path = install_path)
 
openSUSE Build Service is sponsored by