libmusicbrainz: new package
PATCH v3 1/1 libmusicbrainz: new package
This library is built for both host and target platform as required by cmake. This implies that dependencies are also built for the host platform (neon).
---
Changes v2 -> v3:
- Corrected host dependencies
Changes v1 -> v2: (suggested by Thomas Petazzoni)
- Added license info
- Added comment for clarification
package/Config.in | 1 + package/libmusicbrainz/Config.in | 18 ++++++++++++++++++ package/libmusicbrainz/libmusicbrainz.mk | 22 ++++++++++++++++++++++ package/neon/neon.mk | 1 + 4 files changed, 42 insertions(+) create mode 100644 package/libmusicbrainz/Config.in create mode 100644 package/libmusicbrainz/libmusicbrainz.mk
package/Config.in +1 -0
@@ -683,6 +683,7 @@ menu "Audio/Sound" source "package/libmodplug/Config.in" source "package/libmpd/Config.in" source "package/libmpdclient/Config.in" + source "package/libmusicbrainz/Config.in" source "package/libreplaygain/Config.in" source "package/libsamplerate/Config.in" source "package/libsidplay2/Config.in"
package/libmusicbrainz/Config.in new file +18 -0
@@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBMUSICBRAINZ + bool "libmusicbrainz" + depends on BR2_INSTALL_LIBSTDCPP + select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_NEON + select BR2_PACKAGE_NEON_LIBXML2 + help + The MusicBrainz Client Library (libmusicbrainz), + also known as mb_client, is a development library + geared towards developers who wish to add MusicBrainz + lookup capabilities to their applications. The library + supports Windows, Linux and Mac OS X, with packages + released for the RedHat and Debian distributions. + + http://musicbrainz.org/doc/libmusicbrainz + +comment "libmusicbrainz needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPP
package/libmusicbrainz/libmusicbrainz.mk new file +22 -0
@@ -0,0 +1,22 @@ +################################################################################ +# +# libmusicbrainz +# +################################################################################ + +LIBMUSICBRAINZ_VERSION = release-5.1.0 +LIBMUSICBRAINZ_SITE = $(call github,metabrainz,libmusicbrainz,$(LIBMUSICBRAINZ_VERSION)) +LIBMUSICBRAINZ_LICENSE = LGPLv2.1 +LIBMUSICBRAINZ_LICENSE_FILES = COPYING.txt +LIBMUSICBRAINZ_INSTALL_STAGING = YES + +# Cross compilation requires host compilation due to the +# automatic generation of the C interface source files (see INSTALL.txt) +HOST_LIBMUSICBRAINZ_DEPENDENCIES = host-libxml2 host-neon host-pkgconf +LIBMUSICBRAINZ_DEPENDENCIES = libxml2 neon host-pkgconf host-libmusicbrainz + +# Cross compilation variable for cmake to find the host generated files +LIBMUSICBRAINZ_CONF_OPTS = -DIMPORT_EXECUTABLES=$(HOST_LIBMUSICBRAINZ_DIR)/ImportExecutables.cmake + +$(eval $(cmake-package)) +$(eval $(host-cmake-package))
package/neon/neon.mk +1 -0
@@ -48,3 +48,4 @@ NEON_CONF_OPTS += --disable-webdav endif $(eval $(autotools-package)) +$(eval $(host-autotools-package))
Signature · 1 line
2.4.3
PATCH v3 1/1 libmusicbrainz: new package
Quoted 3 lines · Pieter De Gendt
This library is built for both host and target platform as required by cmake. This implies that dependencies are also built for the host platform (neon).
This should be split into two patches: the first one adds the host version of
neon (with the commit message mentioning why), the second one adds libmusicbrainz.
Quoted 37 lines
Signed-off-by Pieter De Gendt <[email protected]>---
Changes v2 -> v3:
- Corrected host dependencies
Changes v1 -> v2: (suggested by Thomas Petazzoni)
- Added license info
- Added comment for clarificationpackage/Config.in | 1 + package/libmusicbrainz/Config.in | 18 ++++++++++++++++++ package/libmusicbrainz/libmusicbrainz.mk | 22 ++++++++++++++++++++++ package/neon/neon.mk | 1 + 4 files changed, 42 insertions(+) create mode 100644 package/libmusicbrainz/Config.in create mode 100644 package/libmusicbrainz/libmusicbrainz.mkpackage/Config.in +1
-0@@ -683,6 +683,7 @@ menu "Audio/Sound" source "package/libmodplug/Config.in" source "package/libmpd/Config.in" source "package/libmpdclient/Config.in" + source "package/libmusicbrainz/Config.in" source "package/libreplaygain/Config.in" source "package/libsamplerate/Config.in" source "package/libsidplay2/Config.in"package/libmusicbrainz/Config.in new file +3
-0@@ -0,0 +1,18 @@ +config BR2_PACKAGE_LIBMUSICBRAINZ + bool "libmusicbrainz" + depends on BR2_INSTALL_LIBSTDCPP
package/libmusicbrainz/Config.in line 13
Quoted 10 lines
package/libmusicbrainz/Config.in new file +10
-0+ select BR2_PACKAGE_LIBXML2 + select BR2_PACKAGE_NEON + select BR2_PACKAGE_NEON_LIBXML2 + help + The MusicBrainz Client Library (libmusicbrainz), + also known as mb_client, is a development library + geared towards developers who wish to add MusicBrainz + lookup capabilities to their applications. The library + supports Windows, Linux and Mac OS X, with packages + released for the RedHat and Debian distributions.
Help text should be wrapped at 72 columns. Also a lot of end-of-line spaces.
The last sentence is not really helpful in the buildroot context.
Quoted 11 lines
package/libmusicbrainz/Config.in new file +5
-0+ + http://musicbrainz.org/doc/libmusicbrainz + +comment "libmusicbrainz needs a toolchain w/ C++" + depends on !BR2_INSTALL_LIBSTDCPPpackage/libmusicbrainz/libmusicbrainz.mk new file +0
-0
package/libmusicbrainz/libmusicbrainz.mk line 8
Quoted 8 lines
package/libmusicbrainz/libmusicbrainz.mk new file +8
-0@@ -0,0 +1,22 @@ +################################################################################ +# +# libmusicbrainz +# +################################################################################ + +LIBMUSICBRAINZ_VERSION = release-5.1.0 +LIBMUSICBRAINZ_SITE = $(call github,metabrainz,libmusicbrainz,$(LIBMUSICBRAINZ_VERSION))
There's also an uploaded file:
so _VERSION = 5.1.0 and _SITE =
https://github.com/metabrainz/libmusicbrainz/releases/download/release-$(LIBMUSICBRAINZ_VERSION)
(note: http:// URL redirects to https://)
package/libmusicbrainz/libmusicbrainz.mk line 9
Quoted 1 line
package/libmusicbrainz/libmusicbrainz.mk new file +1
-0+LIBMUSICBRAINZ_LICENSE = LGPLv2.1
Although the website says LGPL, all the source files have 'or later', so LGPLv2.1+
package/libmusicbrainz/libmusicbrainz.mk line 15
Quoted 6 lines
package/libmusicbrainz/libmusicbrainz.mk new file +6
-0+LIBMUSICBRAINZ_LICENSE_FILES = COPYING.txt +LIBMUSICBRAINZ_INSTALL_STAGING = YES + +# Cross compilation requires host compilation due to the +# automatic generation of the C interface source files (see INSTALL.txt) +HOST_LIBMUSICBRAINZ_DEPENDENCIES = host-libxml2 host-neon host-pkgconf
It is possible to avoid these dependencies by patching libmusicbrainz, but the
patch becomes pretty complicated so I guess this is OK.
package/libmusicbrainz/libmusicbrainz.mk line 22
Quoted 7 lines
package/libmusicbrainz/libmusicbrainz.mk new file +7
-0+LIBMUSICBRAINZ_DEPENDENCIES = libxml2 neon host-pkgconf host-libmusicbrainz + +# Cross compilation variable for cmake to find the host generated files +LIBMUSICBRAINZ_CONF_OPTS = -DIMPORT_EXECUTABLES=$(HOST_LIBMUSICBRAINZ_DIR)/ImportExecutables.cmake + +$(eval $(cmake-package)) +$(eval $(host-cmake-package))
There's a hash file missing:
# From https://musicbrainz.org/doc/libmusicbrainz
md5 4cc5556aa40ff7ab8f8cb83965535bc3 libmusicbrainz-5.1.0.tar.gz
# Locally calculated
sha256 6749259e89bbb273f3f5ad7acdffb7c47a2cf8fcaeab4c4695484cef5f4c6b46
libmusicbrainz-5.1.0.tar.gz
package/neon/neon.mk NEON_CONF_OPTS += --disable-webdav · line 51
Quoted 9 lines
package/neon/neon.mk +1
-0@@ -48,3 +48,4 @@ NEON_CONF_OPTS += --disable-webdav endif $(eval $(autotools-package)) +$(eval $(host-autotools-package))
Well, it's not so simple... neon has a lot of optional dependencies, which
depending on the order of the build will be taken from the host directory or from the system (or skipped if they don't exist on the system). This may lead to linking with incompatible libraries. In this case, host-neon is not actually used (it just needs to be present to satisfy cmake), so it doesn't really matter. However, if another package ever does use host-neon, it could become a problem.
Therefore I think it is best to explicitly disable all optional dependencies inHOST_NEON_CONF_OPTS. And also set HOST_NEON_DEPENDENCIES = host-pkgconfig to avoid all the redundant dependencies.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH v3 1/1 libmusicbrainz: new package
In reply to Pieter De GendtPieter,
Quoted 5 lines · Pieter De Gendt
This library is built for both host and target platform as required by cmake. This implies that dependencies are also built for the host platform (neon).
Signed-off-by Pieter De Gendt <[email protected]>
Arnout made a detailed review of your patch on June 17, but you didn't get back with an updated version (as far as I know).
So I've marked this patch as Changes Requested in patchwork. Please resubmit an updated version if you're interested in getting this merged in Buildroot.
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com