shithub: aubio

Download patch

ref: 8122581dc954a24f3beac5c2a8d8ec2603e96446
parent: d609841589f8bd82c5809963bb63e6ab435bc13b
author: Paul Brossier <piem@piem.org>
date: Fri Apr 7 12:05:23 EDT 2017

scripts/build_mingw: generate .def file (closes #97)

--- a/scripts/build_mingw
+++ b/scripts/build_mingw
@@ -81,8 +81,8 @@
   # fix dll location (see https://github.com/waf-project/waf/issues/1860)
   mv $DESTDIR/lib/libaubio-5.dll $DESTDIR/bin
   # generate def file (see https://github.com/aubio/aubio/issues/97)
-  ( echo -e "EXPORTS"; nm $DESTDIR/bin/libaubio-5.dll | grep T\ _ | \
-    egrep "(aubio|fvec|cvec|lvec|fmat)" | cut -d _ -f 2- ) \
+  ( echo -e "EXPORTS"; $NM $DESTDIR/bin/libaubio-5.dll | grep T\  | \
+    egrep "(aubio|fvec|cvec|lvec|fmat)" | sed 's/^.* T _\?//' ) \
     > $DESTDIR/bin/libaubio-5.def
   zip -r $DESTDIR.zip `basename $DESTDIR`
   rm -rf $DESTDIR
@@ -92,6 +92,7 @@
 function build_mingw32() {
   TARGET=win32
   export CC=i686-w64-mingw32-gcc
+  export NM=i686-w64-mingw32-nm
   build_mingw
 }
 
@@ -98,6 +99,7 @@
 function build_mingw64() {
   TARGET=win64
   export CC=x86_64-w64-mingw32-gcc
+  export NM=x86_64-w64-mingw32-nm
   build_mingw
 }