From b0f442c75f06b5f83b539c10de0fbca79035e822 Mon Sep 17 00:00:00 2001 From: Jerome Duval Date: Mon, 19 May 2014 23:28:19 +0000 Subject: [PATCH] added recipe for libaubio --- media-libs/libaubio/libaubio-0.4.1.recipe | 89 +++++++++++++++++++ .../libaubio/patches/libaubio-0.4.1.patchset | 79 ++++++++++++++++ 2 files changed, 168 insertions(+) create mode 100644 media-libs/libaubio/libaubio-0.4.1.recipe create mode 100644 media-libs/libaubio/patches/libaubio-0.4.1.patchset diff --git a/media-libs/libaubio/libaubio-0.4.1.recipe b/media-libs/libaubio/libaubio-0.4.1.recipe new file mode 100644 index 000000000..ad9801676 --- /dev/null +++ b/media-libs/libaubio/libaubio-0.4.1.recipe @@ -0,0 +1,89 @@ +SUMMARY="A library to label music and sounds" +DESCRIPTION=" +aubio is a library to label music and sounds. It listens to audio signals and \ +attempts to detect events. For instance, when a drum is hit, at which frequency \ +is a note, or at what tempo is a rhythmic melody. + +Its features include segmenting a sound file before each of its attacks, \ +performing pitch detection, tapping the beat and producing midi streams from \ +live audio. +" +HOMEPAGE="http://aubio.org" +COPYRIGHT=" + 2003-2013 Paul Brossier + " +LICENSE="GNU GPL v3" +SRC_URI="http://aubio.org/pub/aubio-$portVersion.tar.bz2" +CHECKSUM_SHA256="25d7df0a9cd6366fda764a803424caddf5fb819fc75b42a7a03e1e6f8eb3c695" +REVISION="1" +ARCHITECTURES="?x86_gcc2 x86 x86_64" +SECONDARY_ARCHITECTURES="?x86_gcc2 x86" + +SOURCE_DIR="aubio-$portVersion" + +PATCHES="libaubio-$portVersion.patchset" + +PROVIDES=" + libaubio$secondaryArchSuffix = $portVersion compat >= 0 + lib:libaubio$secondaryArchSuffix = 4.1.1 compat >= 4 + " +if [ -z "$secondaryArchSuffix" ]; then +PROVIDES="$PROVIDES + cmd:aubiomfcc = $portVersion compat >= 0 + cmd:aubionotes = $portVersion compat >= 0 + cmd:aubioonset = $portVersion compat >= 0 + cmd:aubiopitch = $portVersion compat >= 0 + cmd:aubioquiet = $portVersion compat >= 0 + cmd:aubiotrack = $portVersion compat >= 0 + " +fi + +REQUIRES=" + haiku$secondaryArchSuffix >= $haikuVersion +# lib:libsamplerate$secondaryArchSuffix + " +BUILD_REQUIRES=" + haiku${secondaryArchSuffix}_devel >= $haikuVersion +# devel:libsamplerate$secondaryArchSuffix + " +BUILD_PREREQUIRES=" + cmd:python + cmd:gcc$secondaryArchSuffix + cmd:ld$secondaryArchSuffix + cmd:pkg_config$secondaryArchSuffix + " + +BUILD() +{ + echo $includeDir + runConfigure --omit-buildspec ./waf configure \ + --with-target-platform=$effectiveTargetMachineTriple + ./waf build +} + +INSTALL() +{ + ./waf install + + prepareInstalledDevelLibs libaubio + fixPkgconfig + + # devel package + packageEntries devel \ + $developDir + + #remove bin commands when building for secondary arch + if [ -n "$secondaryArchSuffix" ];then + rm -rf $prefix/bin + fi +} + +# ----- devel package ------------------------------------------------------- + +PROVIDES_devel=" + libaubio${secondaryArchSuffix}_devel = $portVersion compat >= 0 + devel:libaubio$secondaryArchSuffix = 4.1.1 compat >= 4 + " +REQUIRES_devel=" + libaubio$secondaryArchSuffix == $portVersion base + " diff --git a/media-libs/libaubio/patches/libaubio-0.4.1.patchset b/media-libs/libaubio/patches/libaubio-0.4.1.patchset new file mode 100644 index 000000000..586bec539 --- /dev/null +++ b/media-libs/libaubio/patches/libaubio-0.4.1.patchset @@ -0,0 +1,79 @@ +From 0dc450424ce8c66628b22790656fc4f3577f80e7 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 19 May 2014 19:39:09 +0000 +Subject: Haiku has no libm + + +diff --git a/examples/wscript_build b/examples/wscript_build +index db5fed6..3f573cc 100644 +--- a/examples/wscript_build ++++ b/examples/wscript_build +@@ -17,7 +17,7 @@ bld(features = 'c', + for source_file in programs_source: + bld(features = 'c cprogram', + includes = '../src', +- lib = 'm', ++ lib = '', + use = ['aubio', 'utilsio'], + source = source_file, + target = str(source_file).split('.')[0] +diff --git a/src/wscript_build b/src/wscript_build +index 94b2062..2b9b60d 100644 +--- a/src/wscript_build ++++ b/src/wscript_build +@@ -15,7 +15,7 @@ ctx(features = 'c', + source = source, + includes = ['.'], + uselib = uselib, +- lib = 'm', ++ lib = '', + target = 'lib_objects') + + # build libaubio.so (cshlib) and/or libaubio.a (cstlib) +@@ -29,7 +29,7 @@ else: #linux, darwin, android, mingw, ... + for target in build_features: + ctx(features = 'c ' + target, + use = ['lib_objects'], +- lib = 'm', ++ lib = '', + target = 'aubio', + install_path = '${PREFIX}/lib', + vnum = ctx.env['LIB_VERSION']) +diff --git a/tests/wscript_build b/tests/wscript_build +index 04bbf9a..8a8c625 100644 +--- a/tests/wscript_build ++++ b/tests/wscript_build +@@ -6,7 +6,7 @@ for target_name in ctx.path.ant_glob('src/**/*.c'): + extra_source = [] + + bld(features = 'c cprogram test', +- lib = 'm', ++ lib = '', + uselib = uselib, + source = [target_name] + extra_source, + target = str(target_name).split('.')[0], +-- +1.8.3.4 + + +From 3d07ca19c7c3ec7044417c062553d3ea02375d17 Mon Sep 17 00:00:00 2001 +From: Jerome Duval +Date: Mon, 19 May 2014 23:15:04 +0000 +Subject: fix headers installation + + +diff --git a/src/wscript_build b/src/wscript_build +index 2b9b60d..194345d 100644 +--- a/src/wscript_build ++++ b/src/wscript_build +@@ -35,6 +35,6 @@ for target in build_features: + vnum = ctx.env['LIB_VERSION']) + + # install headers, except _priv.h ones +-ctx.install_files('${PREFIX}/include/aubio/', ++ctx.install_files('${INCLUDEDIR}/aubio/', + ctx.path.ant_glob('**/*.h', excl = ['**_priv.h', 'config.h']), + relative_trick=True) +-- +1.8.3.4 +