From: W. Trevor King Date: Sat, 10 Mar 2012 20:19:33 +0000 (-0500) Subject: Add assorted aubio patches to get the current Git trunk working. X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=d74f7bc92cc71d7f57cc9a4552df244ac10e4c4a;p=wtk-overlay.git Add assorted aubio patches to get the current Git trunk working. Also: * Update to EAPI 4 * Update to `git-2` eclass * Remove the `alsa` USE flag, since ASLA support was removed from aubio with: commit 705aec8b92b6bbe0394c6fe809706ad49828834e Author: Paul Brossier Date: Fri Sep 25 22:12:56 2009 +0200 ext/midi: remove all midi stuff borrowed from fluidsynth, now unused * Create an `m4` directory by hand to avoid: aclocal-1.11: couldn't open directory `m4': No such file or directory * Break `econf` out into `src_configure` for EAPI >= 2. * Don't try and install documentation that no longer exists. * Other changes to catch up with the trunk's aubio-0.3.2-r2.ebuild. --- diff --git a/media-libs/aubio/Manifest b/media-libs/aubio/Manifest index c7f4d46..612e728 100644 --- a/media-libs/aubio/Manifest +++ b/media-libs/aubio/Manifest @@ -1,2 +1,7 @@ AUX aubio-0.3.2-multilib.patch 420 RMD160 bff07b86d296ad8de57252260c3790167c543474 SHA1 da7552530668096be8bf94036fa82b34e6bc6577 SHA256 ff264f47c7c1d35f703c28dce59053428015c616a7c43ddf3dbd8c21e806b16a -EBUILD aubio-9999.ebuild 1635 RMD160 02b9dc68cf66e5ae58616db7cef546ef2ece9c19 SHA1 2dc61d67537519631517187cc9d8717b6629bc0a SHA256 3652df55706200f6165d04515971687cf68372e961193a081e034dbee2a94d3a +AUX aubio-9999-0001-Wrap-IFELSE-code-with-AC_LANG_SOURCE-in-configure.ac.patch 1029 RMD160 b7ada6e4c0f039067eecf0af8a53a1ce6c3c9fa7 SHA1 8822f3a2fb8693684dc2cb6278daefdf93bc285d SHA256 890f5dca47009d4ee529e21638a9020f5199da81dd169fbc19204766b2cd4dd5 +AUX aubio-9999-0002-Tell-autotools-that-macros-should-be-stored-in-the-m.patch 1152 RMD160 3c66ee1d77558d650fb3202b86d768d30eead4a7 SHA1 f589e5ec802c5139ea5ec3359cd3a9195a8b08b6 SHA256 5f29858524368dd2fa5484b5d8ded8fd14afdb9eeb47f87c06ca70d31edb5ad0 +AUX aubio-9999-0003-Add-trailing-slash-to-wrap-noinst_PROGRAMS-in-exampl.patch 988 RMD160 fc9207cafd53833cc628598511c4881515edf5fa SHA1 4ffbc0398405fbac2b9b014074a405437c136575 SHA256 23003d709257dbb63ae1abbb52c190a17ad404f346d107af67f1a70693781731 +AUX aubio-9999-0004-Include-aubio.h-and-config.h-in-examples-sndfileio.c.patch 1693 RMD160 b102a4f0225524bfef8622089c5dd18694ef3d42 SHA1 b09cc34f96c561b037eba920e1084ecb202792d2 SHA256 3345e6d48e0caa75bb74a124a621fa6d8c0f89af56e49e1b164fc478b52bde57 +AUX aubio-9999-0005-Declare-aubio_sndfile_read_mono-in-sndfileio.h.patch 1305 RMD160 63333fa889063c03f8dd4227ba16dcc1029a9c03 SHA1 ba9b9c4603036a892428a268074f8fdc2ef70452 SHA256 4d846d4439ef9f666f39d968ae31ee844ffdbe119a4c716c985ca60416542100 +EBUILD aubio-9999.ebuild 2182 RMD160 de416fddeb55bd4634ddbcb5474b737a4546f9ec SHA1 29b16027405a4d154081bf81ed60276b91d6789a SHA256 06d66147feb792d8839adaa2efc3f667cddfe40baa76fff972b98a5724efff36 diff --git a/media-libs/aubio/aubio-9999.ebuild b/media-libs/aubio/aubio-9999.ebuild index 681de0c..b3038c0 100644 --- a/media-libs/aubio/aubio-9999.ebuild +++ b/media-libs/aubio/aubio-9999.ebuild @@ -2,14 +2,13 @@ # Distributed under the terms of the GNU General Public License v2 # $Header: $ -EAPI="3" +EAPI="4" +PYTHON_DEPEND="2:2.6" -inherit eutils autotools - -IUSE="alsa doc jack lash" +inherit autotools eutils python if [[ "${PV}" == "9999" ]]; then - inherit git + inherit git-2 EGIT_BRANCH="master" EGIT_REPO_URI="git://git.aubio.org/git/${PN}" SRC_URI="" @@ -23,12 +22,12 @@ HOMEPAGE="http://aubio.piem.org" LICENSE="GPL-2" SLOT="0" KEYWORDS="~x86" +IUSE="doc examples jack lash static-libs" RDEPEND="=sci-libs/fftw-3* media-libs/libsndfile media-libs/libsamplerate dev-lang/python - alsa? ( media-libs/alsa-lib ) jack? ( media-sound/jack-audio-connection-kit ) lash? ( media-sound/lash )" DEPEND="${RDEPEND} @@ -36,30 +35,49 @@ DEPEND="${RDEPEND} dev-util/pkgconfig doc? ( app-doc/doxygen virtual/latex-base )" +pkg_setup() { + DOCS=( AUTHORS ChangeLog README ) + + python_set_active_version 2 + python_pkg_setup +} + src_prepare() { - cd "${S}" - if [ "${PV}" == "0.3.2" ]; then + # disable automagic puredata wrt #369835 + sed -i -e '/AC_CHECK_HEADER/s:m_pd.h:dIsAbLe&:' configure.ac + + if [ "${PV}" == "9999" ]; then + epatch "${FILESDIR}"/aubio-9999-*.patch + elif [ "${PV}" == "0.3.2" ]; then epatch "${FILESDIR}"/aubio-0.3.2-multilib.patch fi + mkdir -p "${S}/m4" eautoreconf } +src_configure() { + econf \ + $(use_enable static-libs static) \ + $(use_enable jack) \ + $(use_enable lash) +} + src_compile() { - econf $(use_enable jack) $(use_enable alsa) $(use_enable lash) - emake || die "emake failed." + default + if use doc; then export VARTEXFONTS="${T}/fonts" - cd "${S}/doc" - doxygen user.cfg || die "creating user doc failed" - doxygen devel.cfg || die "creating devel doc failed" - doxygen examples.cfg || die "creating examples doc failed" + cd "${S}"/doc + doxygen user.cfg + doxygen devel.cfg + doxygen examples.cfg fi } src_install() { - emake DESTDIR="${D}" install || die "make install failed" - dodoc AUTHORS ChangeLog README TODO - doman doc/*.1 + emake DESTDIR="${D}" install + dodoc "${DOCS[@]}" + if use doc; then mv doc/user/html doc/user/user dohtml -r doc/user/user @@ -68,4 +86,17 @@ src_install() { mv doc/examples/html doc/examples/examples dohtml -r doc/examples/examples fi + + if use examples; then + # install dist_noinst_SCRIPTS from Makefile.am + insinto "/usr/share/doc/${PF}/examples" + doins python/aubio{compare-onset,plot-notes,filter-notes,web.py} + docinto examples + newdoc python/README README.examples + fi + + find "${ED}"usr -name '*.la' -exec rm -f {} + } + +pkg_postinst() { python_mod_optimize aubio; } +pkg_postrm() { python_mod_cleanup aubio; } diff --git a/media-libs/aubio/files/aubio-9999-0001-Wrap-IFELSE-code-with-AC_LANG_SOURCE-in-configure.ac.patch b/media-libs/aubio/files/aubio-9999-0001-Wrap-IFELSE-code-with-AC_LANG_SOURCE-in-configure.ac.patch new file mode 100644 index 0000000..6116189 --- /dev/null +++ b/media-libs/aubio/files/aubio-9999-0001-Wrap-IFELSE-code-with-AC_LANG_SOURCE-in-configure.ac.patch @@ -0,0 +1,33 @@ +From 9b68e8211910808f97fbf9814124cba5ddef5372 Mon Sep 17 00:00:00 2001 +From: W. Trevor King +Date: Thu, 8 Mar 2012 16:32:45 -0500 +Subject: [PATCH 1/4] Wrap IFELSE code with AC_LANG_SOURCE in configure.ac. + +This keeps up with changes from 2.66 and 2.68 [1], and fixes + + aubio $ autoreconf --install --force + ... + configure.ac:70: warning: AC_LANG_CONFTEST: + no AC_LANG_SOURCE call detected in body + +[1]: http://www.flameeyes.eu/autotools-mythbuster/forwardporting/autoconf.html +--- + configure.ac | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 1df71e4..ea9e76b 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -70,7 +70,7 @@ then + AC_CACHE_CHECK([for -Wextra option to $CC], ac_cv_cc_wextra, + [old_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -Wextra" +- AC_COMPILE_IFELSE([void foo (void) {}], ++ AC_COMPILE_IFELSE([AC_LANG_SOURCE([void foo (void) {}])], + ac_cv_cc_wextra=yes, ac_cv_cc_wextra=no) + CFLAGS="$old_CFLAGS" + ]) +-- +1.7.3.4 + diff --git a/media-libs/aubio/files/aubio-9999-0002-Tell-autotools-that-macros-should-be-stored-in-the-m.patch b/media-libs/aubio/files/aubio-9999-0002-Tell-autotools-that-macros-should-be-stored-in-the-m.patch new file mode 100644 index 0000000..2891f1d --- /dev/null +++ b/media-libs/aubio/files/aubio-9999-0002-Tell-autotools-that-macros-should-be-stored-in-the-m.patch @@ -0,0 +1,46 @@ +From 4c7e473546296be4310d358e770b26f2883d3490 Mon Sep 17 00:00:00 2001 +From: W. Trevor King +Date: Thu, 8 Mar 2012 16:46:32 -0500 +Subject: [PATCH 2/4] Tell autotools that macros should be stored in the m4 directory. + +This fixes + + aubio $ autoreconf --install --force + ... + libtoolize: Consider adding `AC_CONFIG_MACRO_DIR([m4])' to configure.ac and + ... + libtoolize: Consider adding `-I m4' to ACLOCAL_AMFLAGS in Makefile.am. + ... +--- + Makefile.am | 2 +- + configure.ac | 1 + + 2 files changed, 2 insertions(+), 1 deletions(-) + +diff --git a/Makefile.am b/Makefile.am +index 8357c9f..966936a 100644 +--- a/Makefile.am ++++ b/Makefile.am +@@ -9,7 +9,7 @@ PYTHONDIR = python + endif + endif + +- ++ACLOCAL_AMFLAGS = -I m4 + SUBDIRS = src examples sounds $(PYTHONDIR) $(SWIGDIR) $(DOC) tests + EXTRA_DIST = bootstrap VERSION + +diff --git a/configure.ac b/configure.ac +index ea9e76b..41f06ed 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -103,6 +103,7 @@ AC_PROG_LIBTOOL + + AC_CONFIG_HEADERS(src/config.h) + AC_CONFIG_FILES(aubio.pc) ++AC_CONFIG_MACRO_DIR([m4]) + + AM_CONDITIONAL(MINGW, false) + AM_CONDITIONAL(DARWIN, false) +-- +1.7.3.4 + diff --git a/media-libs/aubio/files/aubio-9999-0003-Add-trailing-slash-to-wrap-noinst_PROGRAMS-in-exampl.patch b/media-libs/aubio/files/aubio-9999-0003-Add-trailing-slash-to-wrap-noinst_PROGRAMS-in-exampl.patch new file mode 100644 index 0000000..ab3a9c8 --- /dev/null +++ b/media-libs/aubio/files/aubio-9999-0003-Add-trailing-slash-to-wrap-noinst_PROGRAMS-in-exampl.patch @@ -0,0 +1,33 @@ +From f5b02bf22c0953eb419064cb171243465f789dfb Mon Sep 17 00:00:00 2001 +From: W. Trevor King +Date: Thu, 8 Mar 2012 17:18:11 -0500 +Subject: [PATCH 3/4] Add trailing slash to wrap noinst_PROGRAMS in examples/Makefile.am. + +This fixes + + aubio $ autoreconf --install --force + ... + examples/Makefile.am:24: variable `aubioquiet_SOURCES' is defined but no + program or library has `aubioquiet' as canonical name (possible typo) + examples/Makefile.am:31: variable `aubioquiet_LDADD' is defined but no + program or library has `aubioquiet' as canonical name (possible typo) +--- + examples/Makefile.am | 2 +- + 1 files changed, 1 insertions(+), 1 deletions(-) + +diff --git a/examples/Makefile.am b/examples/Makefile.am +index 45ac487..a9c2e05 100644 +--- a/examples/Makefile.am ++++ b/examples/Makefile.am +@@ -10,7 +10,7 @@ bin_PROGRAMS = \ + aubiomfcc + + noinst_PROGRAMS = \ +- aubiopitch ++ aubiopitch \ + aubioquiet + + EXTRA_DIST = utils.h sndfileio.h jackio.h +-- +1.7.3.4 + diff --git a/media-libs/aubio/files/aubio-9999-0004-Include-aubio.h-and-config.h-in-examples-sndfileio.c.patch b/media-libs/aubio/files/aubio-9999-0004-Include-aubio.h-and-config.h-in-examples-sndfileio.c.patch new file mode 100644 index 0000000..8f94697 --- /dev/null +++ b/media-libs/aubio/files/aubio-9999-0004-Include-aubio.h-and-config.h-in-examples-sndfileio.c.patch @@ -0,0 +1,48 @@ +From 21524ae2a950c29edb87f78b8179027d43fa8916 Mon Sep 17 00:00:00 2001 +From: W. Trevor King +Date: Sat, 10 Mar 2012 13:50:42 -0500 +Subject: [PATCH 4/4] Include aubio.h and config.h in examples/sndfileio.c. + +This fixes: + + $ make + /bin/sh ../libtool --tag=CC --mode=link gcc -DAUBIO_PREFIX=\"/usr/local\" -DP\ + ACKAGE=\"aubio\" -I../src -Wall -Wextra -g -O2 -L../src -laubio -lm -o a\ + ubioonset aubioonset.o utils.o jackio.o sndfileio.o -lsndfile -lpthread -lm + libtool: link: gcc -DAUBIO_PREFIX=\"/usr/local\" -DPACKAGE=\"aubio\" -I../src -\ + Wall -Wextra -g -O2 -o .libs/aubioonset aubioonset.o sndfileio.o jackio.o utils\ + .o -L../src /home/wking/src/aubio/src/.libs/libaubio.so /usr/lib/libfftw3f.so \ + /usr/lib/libsamplerate.so /usr/lib/libsndfile.so -lFLAC -lvorbisenc -lvorbis -l\ + ogg -lpthread -lm + utils.o: In function `examples_common_init': + /tmp/aubio/examples/utils.c:218: undefined reference to `new_aubio_sndfile_ro' + ... + +when you have sndfile support, because `utils.o` was (correctly) +looking for the sndfile support that `sndfileio.o` was (incorrectly) +not supplying. + +I'm not sure that `aubio.h` needs to be included, but it was in +`examples/jackio.c`, which I checked for inspiration, and including it +seemed like a good idea ;). It certainly shouldn't hurt to include it. +--- + examples/sndfileio.c | 3 +++ + 1 files changed, 3 insertions(+), 0 deletions(-) + +diff --git a/examples/sndfileio.c b/examples/sndfileio.c +index 808553b..9b01d95 100644 +--- a/examples/sndfileio.c ++++ b/examples/sndfileio.c +@@ -18,6 +18,9 @@ + + */ + ++#include ++#include "config.h" ++ + #ifdef HAVE_SNDFILE + + #include +-- +1.7.3.4 + diff --git a/media-libs/aubio/files/aubio-9999-0005-Declare-aubio_sndfile_read_mono-in-sndfileio.h.patch b/media-libs/aubio/files/aubio-9999-0005-Declare-aubio_sndfile_read_mono-in-sndfileio.h.patch new file mode 100644 index 0000000..2248774 --- /dev/null +++ b/media-libs/aubio/files/aubio-9999-0005-Declare-aubio_sndfile_read_mono-in-sndfileio.h.patch @@ -0,0 +1,36 @@ +From 1ca4e96588d4f8ac527d5f3be31f4ae24e4ef2a8 Mon Sep 17 00:00:00 2001 +From: W. Trevor King +Date: Sat, 10 Mar 2012 14:26:49 -0500 +Subject: [PATCH 5/5] Declare aubio_sndfile_read_mono in sndfileio.h. +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +This fixes: + + $ make + ... + x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../src -DAUBIO_PREFIX=\"/usr\" -DPACKAGE=\"aubio\" -I../src -Wall -Wextra -O2 -march=native -pipe -MT aubiotrack.o -MD -MP -MF .deps/aubiotrack.Tpo -c -o aubiotrack.o aubiotrack.c + utils.c: In function ‘examples_common_init’: + utils.c:260:5: warning: implicit declaration of function ‘aubio_sndfile_read_mono’ + ... +--- + examples/sndfileio.h | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/examples/sndfileio.h b/examples/sndfileio.h +index cfa3d54..135d7cd 100644 +--- a/examples/sndfileio.h ++++ b/examples/sndfileio.h +@@ -49,6 +49,8 @@ int aubio_sndfile_open_wo (aubio_sndfile_t * file, const char * outputname); + * Read frames data from file + */ + int aubio_sndfile_read(aubio_sndfile_t * file, int frames, fvec_t ** read); ++int aubio_sndfile_read_mono(aubio_sndfile_t * file, int frames, fvec_t * read); ++ + /** + * Write data of length frames to file + */ +-- +1.7.3.4 +