Skip to contentSkip to conversation

portaudio: upgrade to latest release

PATCH In review Ross Burton 2 participants 3 messages Sep 15, 2016 – Sep 16, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 portaudio: upgrade to latest release

PortAudio has moved from Subversion to Git, so the SRC_URI needs to be updated. They also have stable tarballs so instead of taking a random git hash use the latest release. This was svn revision 1919 so to keep the version order correct hard-code this into the PV.

The license is in fact MIT, so use that in LICENSE instead of PortAudio (which wasn't defined anywhere, resulting in QA warnings).

Add a patch to pass LDFLAGS to all the compiles.

Remove the useless assignment to TESTS. Install the test suite manually using libtool so that we don't install the wrapper scripts.

Explicitly disable ASIHPI to avoid floating dependencies.

Remove redundant commented-out lines.

---
 .../recipes-support/portaudio/files/ldflags.patch  | 51 ++++++++++++++++++++++
 .../portaudio/portaudio-v19_20140130.bb            | 32 ++++++++++++++
 .../recipes-support/portaudio/portaudio-v19_svn.bb | 32 --------------
 3 files changed, 83 insertions(+), 32 deletions(-)
 create mode 100644 meta-oe/recipes-support/portaudio/files/ldflags.patch
 create mode 100644 meta-oe/recipes-support/portaudio/portaudio-v19_20140130.bb
 delete mode 100644 meta-oe/recipes-support/portaudio/portaudio-v19_svn.bb
meta-oe/recipes-support/portaudio/files/ldflags.patch new file +51 -0
new file mode 100644
index 0000000..aca93a5
@@ -0,0 +1,51 @@
+Upstream forgot to pass LDFLAGS to everything apart from the main library.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <[email protected]>
+
+diff --git a/Makefile.in b/Makefile.in
+index 5e1a764..61ecdd1 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -171,20 +171,20 @@ lib/$(PALIB): lib-stamp $(LTOBJS) $(MAKEFILE) $(PAINC)
+ 	@WITH_ASIO_TRUE@  $(LIBTOOL) --mode=link --tag=CXX $(CXX) $(PA_LDFLAGS) -o lib/$(PALIB) $(LTOBJS) $(DLL_LIBS)
+ 
+ $(ALL_TESTS): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) test/%.c
+-	@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)
+-	@WITH_ASIO_TRUE@  $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)
++	@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)
++	@WITH_ASIO_TRUE@  $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)
+ 
+ $(EXAMPLES): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) examples/%.c
+-	@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS)
+-	@WITH_ASIO_TRUE@  $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS)
++	@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS)
++	@WITH_ASIO_TRUE@  $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS)
+ 
+ $(SELFTESTS): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) qa/%.c
+-	@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(top_srcdir)/qa/$*.c lib/$(PALIB) $(LIBS)
+-	@WITH_ASIO_TRUE@  $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(top_srcdir)/qa/$*.c lib/$(PALIB) $(LIBS)
++	@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(top_srcdir)/qa/$*.c lib/$(PALIB) $(LIBS)
++	@WITH_ASIO_TRUE@  $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(top_srcdir)/qa/$*.c lib/$(PALIB) $(LIBS)
+ 
+ bin/paloopback: lib/$(PALIB) $(MAKEFILE) $(PAINC) $(LOOPBACK_OBJS)
+-	@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS)
+-	@WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS)  $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS)
++	@WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS) $(LDFLAGS) $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS)
++	@WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@ $(CXXFLAGS) $(LDFLAGS) $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS)
+ 
+ install: lib/$(PALIB) portaudio-2.0.pc
+ 	$(INSTALL) -d $(DESTDIR)$(libdir)
+@@ -224,10 +224,10 @@ distclean: clean
+ 	$(CC) -c $(CFLAGS) $< -o $@
+ 
+ %.lo: %.c $(MAKEFILE) $(PAINC)
+-	$(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $< -o $@
++	$(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(LDFLAGS) $< -o $@
+ 
+ %.lo: %.cpp $(MAKEFILE) $(PAINC)
+-	$(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $(CXXFLAGS) $< -o $@
++	$(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $(CXXFLAGS) $(LDFLAGS) $< -o $@
+ 
+ %.o: %.cpp $(MAKEFILE) $(PAINC)
+ 	$(CXX) -c $(CXXFLAGS) $< -o $@
meta-oe/recipes-support/portaudio/portaudio-v19_20140130.bb new file +32 -0
new file mode 100644
index 0000000..8f2b0db
@@ -0,0 +1,32 @@
+SUMMARY = "A portable audio library"
+SECTION = "libs/multimedia"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=26107732c2ab637c5710446fcfaf02df"
+
+PV = "v19+svnr1919"
+
+SRC_URI = "http://www.portaudio.com/archives/pa_stable_v19_20140130.tgz \
+           file://ldflags.patch"
+SRC_URI[md5sum] = "7f220406902af9dca009668e198cbd23"
+SRC_URI[sha256sum] = "8fe024a5f0681e112c6979808f684c3516061cc51d3acc0b726af98fc96c8d57"
+
+S = "${WORKDIR}/portaudio"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "alsa jack"
+PACKAGECONFIG[alsa] = "--with-alsa, --without-alsa, alsa-lib,"
+PACKAGECONFIG[jack] = "--with-jack, --without-jack, jack,"
+
+EXTRA_OECONF = "--without-oss --without-asihpi"
+
+do_install_append() {
+    mkdir --parents ${D}${bindir}
+    for b in ${B}/bin/pa*; do
+        # Bit nasty, should always work
+        ${B}/*-libtool --mode install install $b ${D}${bindir}
+    done
+}
+
+PACKAGES += "portaudio-examples"
+FILES_portaudio-examples = "${bindir}"
meta-oe/recipes-support/portaudio/portaudio-v19_svn.bb deleted +0 -32
deleted file mode 100644
index c8d7378..0000000
@@ -1,32 +0,0 @@
-SUMMARY = "A portable audio library"
-SECTION = "libs/multimedia"
-LICENSE = "PortAudio"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=26107732c2ab637c5710446fcfaf02df"
-
-PV = "v19+svnr${SRCPV}"
-
-SRCREV = "1387"
-SRC_URI = "svn://subversion.assembla.com/svn/portaudio/portaudio;module=trunk;protocol=http"
-S = "${WORKDIR}/trunk"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "alsa jack"
-PACKAGECONFIG[alsa] = "--with-alsa, --without-alsa, alsa-lib,"
-PACKAGECONFIG[jack] = "--with-jack, --without-jack, jack,"
-
-EXTRA_OECONF = "--without-oss"
-
-TESTS = "  pa_devs patest1      patest_hang patest_many                   patest_prime patest_sine patest_stop     patest_write_sine        \
-pa_fuzz    patest_buffer        patest_in_overflow  patest_maxsines       patest_read_record  patest_sine8         patest_sync              \
-pa_minlat  patest_callbackstop  patest_latency      patest_multi_sine     patest_record       patest_sine_formats  patest_toomanysines      \
-paqa_devs  patest_clip          patest_leftright    patest_out_underflow  patest_ringmix      patest_sine_time     patest_underflow         \
-paqa_errs  patest_dither        patest_longsine     patest_pink           patest_saw          patest_start_stop    patest_wire"
-
-# DEFINES = PA_USE_OSS=1 HAVE_LIBPTHREAD=1
-# DEFINES += PA_LITTLE_ENDIAN
-
-# INCLUDEPATH = ../pa_common
-
-PACKAGES += "portaudio-examples"
-FILES_portaudio-examples = "${bindir}"
Signature · 1 line
2.8.1
#1 lore raw

This PV change looks like a downgrade as old recipe had SRCREV = "1387" and new PV indicates 1919.

Quoted 207 lines · Ross Burton

PortAudio has moved from Subversion to Git, so the SRC_URI needs to be updated.
They also have stable tarballs so instead of taking a random git hash use the
latest release. This was svn revision 1919 so to keep the version order correct
hard-code this into the PV.

The license is in fact MIT, so use that in LICENSE instead of PortAudio (which
wasn't defined anywhere, resulting in QA warnings).

Add a patch to pass LDFLAGS to all the compiles.

Remove the useless assignment to TESTS. Install the test suite manually using
libtool so that we don't install the wrapper scripts.

Explicitly disable ASIHPI to avoid floating dependencies.

Remove redundant commented-out lines.

---
 .../recipes-support/portaudio/files/ldflags.patch  | 51
++++++++++++++++++++++
 .../portaudio/portaudio-v19_20140130.bb            | 32 ++++++++++++++
 .../recipes-support/portaudio/portaudio-v19_svn.bb | 32 --------------
 3 files changed, 83 insertions(+), 32 deletions(-)
 create mode 100644 meta-oe/recipes-support/portaudio/files/ldflags.patch
 create mode 100644 meta-oe/recipes-support/portaudio/portaudio-v19_
20140130.bb
 delete mode 100644 meta-oe/recipes-support/portaudio/portaudio-v19_svn.bb
meta-oe/recipes-support/portaudio/files/ldflags.patch new file +10 -0
new file mode 100644
index 0000000..aca93a5
@@ -0,0 +1,51 @@
+Upstream forgot to pass LDFLAGS to everything apart from the main library.
+
+Upstream-Status: Pending
+Signed-off-by: Ross Burton <[email protected]>
+
+diff --git a/Makefile.in b/Makefile.in
+index 5e1a764..61ecdd1 100644
+--- a/Makefile.in
++++ b/Makefile.in
+@@ -171,20 +171,20 @@ lib/$(PALIB): lib-stamp $(LTOBJS) $(MAKEFILE)

$(PAINC)
+ @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX)
$(PA_LDFLAGS) -o lib/$(PALIB) $(LTOBJS) $(DLL_LIBS)
+
+ $(ALL_TESTS): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) test/%.c
+- @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS)
$(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)
+- @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@
$(CXXFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)
++ @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS)
$(LDFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS)
++ @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@
$(CXXFLAGS) $(LDFLAGS) $(top_srcdir)/test/$*.c lib/$(PALIB) $(LIBS) +
+ $(EXAMPLES): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) examples/%.c
+- @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS)
$(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS)
+- @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@
$(CXXFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS)
++ @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS)
$(LDFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS)
++ @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@
$(CXXFLAGS) $(LDFLAGS) $(top_srcdir)/examples/$*.c lib/$(PALIB) $(LIBS) +
+ $(SELFTESTS): bin/%: lib/$(PALIB) $(MAKEFILE) $(PAINC) qa/%.c
+- @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS)
$(top_srcdir)/qa/$*.c lib/$(PALIB) $(LIBS)
+- @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@
$(CXXFLAGS) $(top_srcdir)/qa/$*.c lib/$(PALIB) $(LIBS)
++ @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS)
$(LDFLAGS) $(top_srcdir)/qa/$*.c lib/$(PALIB) $(LIBS)
++ @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@
$(CXXFLAGS) $(LDFLAGS) $(top_srcdir)/qa/$*.c lib/$(PALIB) $(LIBS) +
+ bin/paloopback: lib/$(PALIB) $(MAKEFILE) $(PAINC) $(LOOPBACK_OBJS)
+- @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS)
$(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS)

+-      @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@
$(CXXFLAGS)  $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS)
++      @WITH_ASIO_FALSE@ $(LIBTOOL) --mode=link $(CC) -o $@ $(CFLAGS)

$(LDFLAGS) $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS)
++ @WITH_ASIO_TRUE@ $(LIBTOOL) --mode=link --tag=CXX $(CXX) -o $@
$(CXXFLAGS) $(LDFLAGS) $(LOOPBACK_OBJS) lib/$(PALIB) $(LIBS)

meta-oe/recipes-support/portaudio/files/ldflags.patch new file +13 -0
+
+ install: lib/$(PALIB) portaudio-2.0.pc
+       $(INSTALL) -d $(DESTDIR)$(libdir)
+@@ -224,10 +224,10 @@ distclean: clean
+       $(CC) -c $(CFLAGS) $< -o $@
+
+ %.lo: %.c $(MAKEFILE) $(PAINC)
+-      $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $< -o $@
++      $(LIBTOOL) --mode=compile $(CC) -c $(CFLAGS) $(LDFLAGS) $< -o $@
+
+ %.lo: %.cpp $(MAKEFILE) $(PAINC)
+-      $(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $(CXXFLAGS) $< -o $@
++      $(LIBTOOL) --mode=compile --tag=CXX $(CXX) -c $(CXXFLAGS)

$(LDFLAGS) $< -o $@

meta-oe/recipes-support/portaudio/files/ldflags.patch new file +3 -0
+
+ %.o: %.cpp $(MAKEFILE) $(PAINC)
+       $(CXX) -c $(CXXFLAGS) $< -o $@
meta-oe/recipes-support/portaudio/portaudio-v19_20140130.bb new file +4 -0
new file mode 100644
index 0000000..8f2b0db
@@ -0,0 +1,32 @@
+SUMMARY = "A portable audio library"
+SECTION = "libs/multimedia"
+LICENSE = "MIT"
+LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=26107732c2ab637c5710446fcfaf02

df"

meta-oe/recipes-support/portaudio/portaudio-v19_20140130.bb new file +7 -0
+
+PV = "v19+svnr1919"
+
+SRC_URI = "http://www.portaudio.com/archives/pa_stable_v19_20140130.tgz \
+           file://ldflags.patch"
+SRC_URI[md5sum] = "7f220406902af9dca009668e198cbd23"
+SRC_URI[sha256sum] = "8fe024a5f0681e112c6979808f684c

3516061cc51d3acc0b726af98fc96c8d57"

meta-oe/recipes-support/portaudio/portaudio-v19_20140130.bb new file +21 -0
+
+S = "${WORKDIR}/portaudio"
+
+inherit autotools pkgconfig
+
+PACKAGECONFIG ??= "alsa jack"
+PACKAGECONFIG[alsa] = "--with-alsa, --without-alsa, alsa-lib,"
+PACKAGECONFIG[jack] = "--with-jack, --without-jack, jack,"
+
+EXTRA_OECONF = "--without-oss --without-asihpi"
+
+do_install_append() {
+    mkdir --parents ${D}${bindir}
+    for b in ${B}/bin/pa*; do
+        # Bit nasty, should always work
+        ${B}/*-libtool --mode install install $b ${D}${bindir}
+    done
+}
+
+PACKAGES += "portaudio-examples"
+FILES_portaudio-examples = "${bindir}"
meta-oe/recipes-support/portaudio/portaudio-v19_svn.bb deleted +0 -4
deleted file mode 100644
index c8d7378..0000000
@@ -1,32 +0,0 @@
-SUMMARY = "A portable audio library"
-SECTION = "libs/multimedia"
-LICENSE = "PortAudio"
-LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=26107732c2ab637c5710446fcfaf02

df"

meta-oe/recipes-support/portaudio/portaudio-v19_svn.bb deleted +0 -5
-
-PV = "v19+svnr${SRCPV}"
-
-SRCREV = "1387"
-SRC_URI = "svn://subversion.assembla.com/svn/portaudio/portaudio;

module=trunk;protocol=http"

meta-oe/recipes-support/portaudio/portaudio-v19_svn.bb deleted +0 -14
-S = "${WORKDIR}/trunk"
-
-inherit autotools pkgconfig
-
-PACKAGECONFIG ??= "alsa jack"
-PACKAGECONFIG[alsa] = "--with-alsa, --without-alsa, alsa-lib,"
-PACKAGECONFIG[jack] = "--with-jack, --without-jack, jack,"
-
-EXTRA_OECONF = "--without-oss"
-
-TESTS = "  pa_devs patest1      patest_hang patest_many
 patest_prime patest_sine patest_stop     patest_write_sine        \
-pa_fuzz    patest_buffer        patest_in_overflow  patest_maxsines
 patest_read_record  patest_sine8         patest_sync              \
-pa_minlat  patest_callbackstop  patest_latency      patest_multi_sine
 patest_record       patest_sine_formats  patest_toomanysines      \
-paqa_devs  patest_clip          patest_leftright    patest_out_underflow

patest_ringmix patest_sine_time patest_underflow \

meta-oe/recipes-support/portaudio/portaudio-v19_svn.bb deleted +0 -10
-paqa_errs  patest_dither        patest_longsine     patest_pink
 patest_saw          patest_start_stop    patest_wire"
-
-# DEFINES = PA_USE_OSS=1 HAVE_LIBPTHREAD=1
-# DEFINES += PA_LITTLE_ENDIAN
-
-# INCLUDEPATH = ../pa_common
-
-PACKAGES += "portaudio-examples"
-FILES_portaudio-examples = "${bindir}"
--

2.8.1

--
_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-devel

#2 lore raw
Quoted 3 lines · Martin Jansa

This PV change looks like a downgrade as old recipe had SRCREV = "1387" and new PV indicates 1919.

Old recipe:

-PV = "v19+svnr${SRCPV}"
-SRCREV = "1387"

New recipe:

+PV = "v19+svnr1919"

Surely that's an upgrade?

Ross