diff mbox

[6/6] package/mpd: add choice between version 0.19 and 0.20

Message ID 20170209174759.15819-7-joerg.krause@embedded.rocks
State Changes Requested
Headers show

Commit Message

Jörg Krause Feb. 9, 2017, 5:47 p.m. UTC
MPD version 0.20 being affected by GCC PR libstdc++/64735 means no mpd
package available in Buildroot for the architectures NIOSII, ARMv4,
ARMv5 and SPARCv8 until GCC 7 is released.

As the next Buildroot release is in 2017.02 which is before GCC 7 is
expected to be released add a choise between version 0.19 and 0.20, so
that there is still an mpd package available for the affected
architectures.

Note, that we bumped the version from 0.19 to 0.20 within the current Buildroot
release cycle.

Note, that for the version 0.19 MPD requires libglib2.

Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
---
 package/mpd/Config.in | 31 +++++++++++++++++++++++++------
 package/mpd/mpd.mk    |  9 +++++++++
 2 files changed, 34 insertions(+), 6 deletions(-)

Comments

Thomas Petazzoni Feb. 9, 2017, 8:34 p.m. UTC | #1
Hello,

On Thu,  9 Feb 2017 18:47:59 +0100, Jörg Krause wrote:
> MPD version 0.20 being affected by GCC PR libstdc++/64735 means no mpd
> package available in Buildroot for the architectures NIOSII, ARMv4,
> ARMv5 and SPARCv8 until GCC 7 is released.
> 
> As the next Buildroot release is in 2017.02 which is before GCC 7 is
> expected to be released add a choise between version 0.19 and 0.20, so
> that there is still an mpd package available for the affected
> architectures.
> 
> Note, that we bumped the version from 0.19 to 0.20 within the current Buildroot
> release cycle.
> 
> Note, that for the version 0.19 MPD requires libglib2.
> 
> Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>

I am not sure we want to support a version choice for mpd just for the
sake of NIOSII, ARMv4, ARMv5 and SPARCv8.

I'll let Peter Korsgaard decide if he believes this is worth the
additional complexity.

Thomas
Jörg Krause Feb. 10, 2017, 7:04 a.m. UTC | #2
On Thu, 2017-02-09 at 21:34 +0100, Thomas Petazzoni wrote:
> Hello,
> 
> On Thu,  9 Feb 2017 18:47:59 +0100, Jörg Krause wrote:
> > MPD version 0.20 being affected by GCC PR libstdc++/64735 means no
> > mpd
> > package available in Buildroot for the architectures NIOSII, ARMv4,
> > ARMv5 and SPARCv8 until GCC 7 is released.
> > 
> > As the next Buildroot release is in 2017.02 which is before GCC 7
> > is
> > expected to be released add a choise between version 0.19 and 0.20,
> > so
> > that there is still an mpd package available for the affected
> > architectures.
> > 
> > Note, that we bumped the version from 0.19 to 0.20 within the
> > current Buildroot
> > release cycle.
> > 
> > Note, that for the version 0.19 MPD requires libglib2.
> > 
> > Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
> 
> I am not sure we want to support a version choice for mpd just for
> the
> sake of NIOSII, ARMv4, ARMv5 and SPARCv8.

I'm using an ARMv5 board with MPD myself. I really like to have that
package available for this arch in the next Buildroot release.

> I'll let Peter Korsgaard decide if he believes this is worth the
> additional complexity.

Thanks!

Jörg
Jörg Krause Feb. 10, 2017, 7:34 a.m. UTC | #3
On Thu, 2017-02-09 at 21:34 +0100, Thomas Petazzoni wrote:
> Hello,
> 
> On Thu,  9 Feb 2017 18:47:59 +0100, Jörg Krause wrote:
> > MPD version 0.20 being affected by GCC PR libstdc++/64735 means no
> > mpd
> > package available in Buildroot for the architectures NIOSII, ARMv4,
> > ARMv5 and SPARCv8 until GCC 7 is released.
> > 
> > As the next Buildroot release is in 2017.02 which is before GCC 7
> > is
> > expected to be released add a choise between version 0.19 and 0.20,
> > so
> > that there is still an mpd package available for the affected
> > architectures.
> > 
> > Note, that we bumped the version from 0.19 to 0.20 within the
> > current Buildroot
> > release cycle.
> > 
> > Note, that for the version 0.19 MPD requires libglib2.
> > 
> > Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
> 
> I am not sure we want to support a version choice for mpd just for
> the
> sake of NIOSII, ARMv4, ARMv5 and SPARCv8.
> 
> I'll let Peter Korsgaard decide if he believes this is worth the
> additional complexity.

Just noticed I forgot the hash for mpd 0.19. If Peter decides to accept
this patch, I can send an updated version.

Jörg
Thomas Petazzoni Feb. 11, 2017, 2:25 p.m. UTC | #4
Hello,

On Fri, 10 Feb 2017 08:04:32 +0100, Jörg Krause wrote:

> > I am not sure we want to support a version choice for mpd just for
> > the
> > sake of NIOSII, ARMv4, ARMv5 and SPARCv8.  
> 
> I'm using an ARMv5 board with MPD myself. I really like to have that
> package available for this arch in the next Buildroot release.

OK, makes sense. So could you send an updated version with the following
changes:

 - Hash for 0.19, as you mentioned.

 - Removal of visible options. Just use 0.20 if possible (recent enough
   and non-buggy compiler) and fallback to 0.19 if not. A visible
   choice is really not needed for this. Also, if you use any
   Config.in option for that, they should be prefixed BR2_PACKAGE_MPD
   and not BR2_MPD like your patch was doing.

Thanks a lot!

Thomas
diff mbox

Patch

diff --git a/package/mpd/Config.in b/package/mpd/Config.in
index 8a28b4f1a..2f993737f 100644
--- a/package/mpd/Config.in
+++ b/package/mpd/Config.in
@@ -4,8 +4,6 @@  menuconfig BR2_PACKAGE_MPD
 	depends on BR2_USE_WCHAR # flac
 	depends on BR2_TOOLCHAIN_HAS_THREADS
 	depends on BR2_USE_MMU # fork
-	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
-	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
 	depends on BR2_TOOLCHAIN_HAS_ATOMIC
 	select BR2_PACKAGE_BOOST
 	select BR2_PACKAGE_LIBICONV if !BR2_ENABLE_LOCALE
@@ -20,6 +18,30 @@  menuconfig BR2_PACKAGE_MPD
 
 if BR2_PACKAGE_MPD
 
+choice
+	prompt "MPD version"
+
+config BR2_MPD_VERSION_0_20
+	bool "0.20"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 # C++14
+	depends on !BR2_TOOLCHAIN_HAS_GCC_BUG_64735
+
+comment "version 0.20 needs toolchain w/ gcc >= 4.9"
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
+
+comment "version 0.20 needs a toolchain not affected by GCC bug 64735"
+	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
+
+config BR2_MPD_VERSION_0_19
+	bool "0.19"
+	depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+	select BR2_PACKAGE_LIBGLIB2
+
+comment "version 0.19 needs toolchain w/ gcc >= 4.6"
+	depends on !BR2_TOOLCHAIN_GCC_AT_LEAST_4_6
+
+endchoice
+
 comment "Archive plugins"
 
 config BR2_PACKAGE_MPD_BZIP2
@@ -319,7 +341,4 @@  comment "mpd needs a toolchain w/ C++, threads, wchar, gcc >= 4.9"
 	depends on BR2_USE_MMU
 	depends on BR2_TOOLCHAIN_HAS_ATOMIC
 	depends on !BR2_INSTALL_LIBSTDCPP || !BR2_USE_WCHAR || \
-		!BR2_TOOLCHAIN_HAS_THREADS || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9
-
-comment "mpd needs a toolchain not affected by GCC bug 64735"
-	depends on BR2_TOOLCHAIN_HAS_GCC_BUG_64735
+		!BR2_TOOLCHAIN_HAS_THREADS
diff --git a/package/mpd/mpd.mk b/package/mpd/mpd.mk
index 0efc8685f..ad5d2a678 100644
--- a/package/mpd/mpd.mk
+++ b/package/mpd/mpd.mk
@@ -4,8 +4,13 @@ 
 #
 ################################################################################
 
+ifeq ($(BR2_MPD_VERSION_0_20),y)
 MPD_VERSION_MAJOR = 0.20
 MPD_VERSION = $(MPD_VERSION_MAJOR).4
+else
+MPD_VERSION_MAJOR = 0.19
+MPD_VERSION = $(MPD_VERSION_MAJOR).21
+endif
 MPD_SOURCE = mpd-$(MPD_VERSION).tar.xz
 MPD_SITE = http://www.musicpd.org/download/mpd/$(MPD_VERSION_MAJOR)
 MPD_DEPENDENCIES = host-pkgconf boost
@@ -13,6 +18,10 @@  MPD_LICENSE = GPLv2+
 MPD_LICENSE_FILES = COPYING
 MPD_AUTORECONF = YES
 
+ifeq ($(BR2_MPD_VERSION_0_19),y)
+MPD_DEPENDENCIES += libglib2
+endif
+
 # Some options need an explicit --disable or --enable
 
 # Zeroconf support depends on libdns_sd from avahi.