From f390c32a770c4ffe2c97dddee9567c627a224c23 Mon Sep 17 00:00:00 2001 From: Timothy Gu Date: Sun, 16 Nov 2014 22:22:15 -0500 Subject: aubio: Update Signed-off-by: Timothy Gu --- src/aubio-1-fix-pkg-config.patch | 16 ---- src/aubio-1-fixes.patch | 192 +++++++++++++++++++++++++++++++++++++++ src/aubio.mk | 26 +++--- 3 files changed, 205 insertions(+), 29 deletions(-) delete mode 100644 src/aubio-1-fix-pkg-config.patch create mode 100644 src/aubio-1-fixes.patch diff --git a/src/aubio-1-fix-pkg-config.patch b/src/aubio-1-fix-pkg-config.patch deleted file mode 100644 index b57c86c..0000000 --- a/src/aubio-1-fix-pkg-config.patch +++ /dev/null @@ -1,16 +0,0 @@ -This file is part of MXE. -See index.html for further information. - -diff -urN aubio-0.3.2.orig/configure.ac aubio-0.3.2/configure.ac ---- aubio-0.3.2.orig/configure.ac 2006-10-09 01:11:39.000000000 +0200 -+++ aubio-0.3.2/configure.ac 2010-01-26 23:07:23.000000000 +0100 -@@ -135,9 +135,6 @@ - [Defined when c99 style varargs macros are supported]) - fi - --dnl Check for pkg-config --AC_PATH_PROG(PKG_CONFIG,pkg-config,no) -- - PKG_CHECK_MODULES(SNDLIB, sndfile >= 1.0.4, SNDLIB_SUPPORT=1) - PKG_CHECK_MODULES(SAMPLERATE, samplerate >= 0.0.15, SAMPLERATE_SUPPORT=1) - diff --git a/src/aubio-1-fixes.patch b/src/aubio-1-fixes.patch new file mode 100644 index 0000000..f900dea --- /dev/null +++ b/src/aubio-1-fixes.patch @@ -0,0 +1,192 @@ +From a34301d5fcdb6187dceb508bab341727ec57d0b4 Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Fri, 14 Nov 2014 16:37:52 -0500 +Subject: [PATCH 1/4] Add options for enabling shared and/or static libraries + +Signed-off-by: Timothy Gu + +diff --git a/src/wscript_build b/src/wscript_build +index 94b2062..1a72e4a 100644 +--- a/src/wscript_build ++++ b/src/wscript_build +@@ -18,13 +18,11 @@ ctx(features = 'c', + lib = 'm', + target = 'lib_objects') + +-# build libaubio.so (cshlib) and/or libaubio.a (cstlib) +-if ctx.env['DEST_OS'] in ['ios', 'iosimulator']: +- build_features = ['cstlib'] +-elif ctx.env['DEST_OS'] in ['win32', 'win64']: +- build_features = ['cshlib'] +-else: #linux, darwin, android, mingw, ... +- build_features = ['cshlib', 'cstlib'] ++build_features = [] ++if ctx.options.enable_shared: ++ build_features += ['cshlib'] ++if ctx.options.enable_static: ++ build_features += ['cstlib'] + + for target in build_features: + ctx(features = 'c ' + target, +diff --git a/wscript b/wscript +index 83ad7b8..7013f12 100644 +--- a/wscript ++++ b/wscript +@@ -73,6 +73,13 @@ def options(ctx): + help_str = 'compile in double precision mode', + help_disable_str = 'compile in single precision mode (default)') + ++ add_option_enable_disable(ctx, 'shared', default = True, ++ help_str = 'compile shared libraries (defaut)', ++ help_disable_str = 'do not compile shared library') ++ add_option_enable_disable(ctx, 'static', default = True, ++ help_str = 'compile static libraries (default)', ++ help_disable_str = 'do not compile static library') ++ + ctx.add_option('--with-target-platform', type='string', + help='set target platform for cross-compilation', dest='target_platform') + +-- +1.9.1 + + +From e133535438a965b3f6f7f0cac5cb5c062c07829f Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Fri, 14 Nov 2014 16:39:51 -0500 +Subject: [PATCH 2/4] fftw3 support requires -pthread + +Signed-off-by: Timothy Gu + +diff --git a/wscript b/wscript +index 7013f12..052fb27 100644 +--- a/wscript ++++ b/wscript +@@ -197,8 +197,10 @@ def configure(ctx): + # fftw not enabled, use vDSP or ooura + if 'HAVE_FFTW3F' in ctx.env.define_key: + ctx.msg('Checking for FFT implementation', 'fftw3f') ++ ctx.env.LINKFLAGS += ['-pthread'] + elif 'HAVE_FFTW3' in ctx.env.define_key: + ctx.msg('Checking for FFT implementation', 'fftw3') ++ ctx.env.LINKFLAGS += ['-pthread'] + elif 'HAVE_ACCELERATE' in ctx.env.define_key: + ctx.msg('Checking for FFT implementation', 'vDSP') + else: +-- +1.9.1 + + +From 16fda40e02065b670b63e193a453357051ca9c33 Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Fri, 14 Nov 2014 16:40:53 -0500 +Subject: [PATCH 3/4] Add static deps to pkgconfig file + +Signed-off-by: Timothy Gu + +diff --git a/aubio.pc.in b/aubio.pc.in +index 301a1b5..0cd2281 100644 +--- a/aubio.pc.in ++++ b/aubio.pc.in +@@ -6,5 +6,7 @@ includedir=@includedir@ + Name: aubio + Description: a library for audio labelling + Version: @VERSION@ ++Require.private: @PCREQUIRES@ + Libs: -L${libdir} -laubio ++Libs.private: @PCLIBS@ + Cflags: -I${includedir} +diff --git a/wscript b/wscript +index 052fb27..424bcf8 100644 +--- a/wscript ++++ b/wscript +@@ -176,6 +176,8 @@ def configure(ctx): + if (ctx.options.enable_complex == True): + ctx.check(header_name='complex.h') + ++ pcrequires = [] ++ pclibs = [] + # check for fftw3 + if (ctx.options.enable_fftw3 != False or ctx.options.enable_fftw3f != False): + # one of fftwf or fftw3f +@@ -197,9 +199,13 @@ def configure(ctx): + # fftw not enabled, use vDSP or ooura + if 'HAVE_FFTW3F' in ctx.env.define_key: + ctx.msg('Checking for FFT implementation', 'fftw3f') ++ pcrequires += ['fftw3f >= 3.0.0'] ++ pclibs += ['-lpthread'] + ctx.env.LINKFLAGS += ['-pthread'] + elif 'HAVE_FFTW3' in ctx.env.define_key: + ctx.msg('Checking for FFT implementation', 'fftw3') ++ pcrequires += ['fftw3 >= 3.0.0'] ++ pclibs += ['-lpthread'] + ctx.env.LINKFLAGS += ['-pthread'] + elif 'HAVE_ACCELERATE' in ctx.env.define_key: + ctx.msg('Checking for FFT implementation', 'vDSP') +@@ -210,16 +216,22 @@ def configure(ctx): + if (ctx.options.enable_sndfile != False): + ctx.check_cfg(package = 'sndfile', atleast_version = '1.0.4', + args = '--cflags --libs', mandatory = False) ++ if 'HAVE_SNDFILE' in ctx.env.define_key: ++ pcrequires += ['sndfile >= 1.0.4'] + + # check for libsamplerate + if (ctx.options.enable_samplerate != False): + ctx.check_cfg(package = 'samplerate', atleast_version = '0.0.15', + args = '--cflags --libs', mandatory = False) ++ if 'HAVE_SAMPLERATE' in ctx.env.define_key: ++ pcrequires += ['samplerate >= 0.0.15'] + + # check for jack + if (ctx.options.enable_jack != False): + ctx.check_cfg(package = 'jack', + args = '--cflags --libs', mandatory = False) ++ if 'HAVE_JACK' in ctx.env.define_key: ++ pcrequires += ['jack'] + + # check for libav + if (ctx.options.enable_avcodec != False): +@@ -235,9 +247,13 @@ def configure(ctx): + for i in ['AVCODEC', 'AVFORMAT', 'AVUTIL', 'AVRESAMPLE'] ): + ctx.define('HAVE_LIBAV', 1) + ctx.msg('Checking for all libav libraries', 'yes') ++ pcrequires += ['libavcodec >= 54.35.0', 'libavformat >= 52.3.0', ++ 'libavutil >= 52.3.0', 'libavresample >= 1.0.1'] + else: + ctx.msg('Checking for all libav libraries', 'not found', color = 'YELLOW') + ++ ctx.env.PCREQUIRES = ', '.join(pcrequires) ++ ctx.env.PCLIBS = ', '.join(pclibs) + ctx.define('HAVE_WAVREAD', 1) + ctx.define('HAVE_WAVWRITE', 1) + +-- +1.9.1 + + +From 407863716f05ffca5b2241d7dcedb3d1c1ae87ad Mon Sep 17 00:00:00 2001 +From: Timothy Gu +Date: Fri, 14 Nov 2014 16:45:04 -0500 +Subject: [PATCH 4/4] [MXE] disable tests and examples + +Signed-off-by: Timothy Gu + +diff --git a/wscript b/wscript +index 424bcf8..7f135b5 100644 +--- a/wscript ++++ b/wscript +@@ -290,9 +290,9 @@ def build(bld): + bld.recurse('src') + if bld.env['DEST_OS'] not in ['ios', 'iosimulator']: + pass +- if bld.env['DEST_OS'] not in ['ios', 'iosimulator', 'android']: +- bld.recurse('examples') +- bld.recurse('tests') ++ #if bld.env['DEST_OS'] not in ['ios', 'iosimulator', 'android']: ++ #bld.recurse('examples') ++ #bld.recurse('tests') + + bld( source = 'aubio.pc.in' ) + +-- +1.9.1 + diff --git a/src/aubio.mk b/src/aubio.mk index 78a3e9f..40728e7 100644 --- a/src/aubio.mk +++ b/src/aubio.mk @@ -3,12 +3,12 @@ PKG := aubio $(PKG)_IGNORE := -$(PKG)_VERSION := 0.3.2 -$(PKG)_CHECKSUM := 8ef7ccbf18a4fa6db712a9192acafc9c8d080978 +$(PKG)_VERSION := 0.4.1 +$(PKG)_CHECKSUM := 338ec9f633e82c371a370b9727d6f0b86b0ba376 $(PKG)_SUBDIR := aubio-$($(PKG)_VERSION) -$(PKG)_FILE := aubio-$($(PKG)_VERSION).tar.gz +$(PKG)_FILE := aubio-$($(PKG)_VERSION).tar.bz2 $(PKG)_URL := http://www.aubio.org/pub/$($(PKG)_FILE) -$(PKG)_DEPS := gcc fftw libsamplerate libsndfile +$(PKG)_DEPS := gcc ffmpeg fftw libsamplerate libsndfile define $(PKG)_UPDATE $(WGET) -q -O- 'http://www.aubio.org/download' | \ @@ -17,15 +17,15 @@ define $(PKG)_UPDATE endef define $(PKG)_BUILD - cd '$(1)' && autoconf - cd '$(1)' && ./configure \ - --host='$(TARGET)' \ - --disable-shared \ - --disable-jack \ - --prefix='$(PREFIX)/$(TARGET)' \ - PYTHON='no' - $(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= - $(MAKE) -C '$(1)' -j 1 install bin_PROGRAMS= sbin_PROGRAMS= noinst_PROGRAMS= + cd '$(1)' && \ + CC='$(TARGET)-gcc' \ + PKGCONFIG='$(TARGET)-pkg-config' \ + ./waf configure build install \ + -j '$(JOBS)' \ + --with-target-platform='win$(BITS)' \ + --prefix='$(PREFIX)/$(TARGET)' \ + --enable-fftw3f \ + --enable-static --disable-shared endef $(PKG)_BUILD_SHARED = -- cgit v0.12