diff options
author | Khem Raj <raj.khem@gmail.com> | 2021-03-01 19:24:05 -0800 |
---|---|---|
committer | Khem Raj <raj.khem@gmail.com> | 2021-03-02 10:13:24 -0800 |
commit | d21322a667633f63381ac9fffb407d7b4d09157d (patch) | |
tree | 0e6170d945e9797051adc83c852ed14b28282e92 /meta-multimedia | |
parent | b93ec079f96cd3001ccb62d393059ffb2ff0f6ed (diff) | |
download | meta-openembedded-d21322a667633f63381ac9fffb407d7b4d09157d.tar.gz |
mpd: Upgrade to 0.22 series
Drop the gcc10 patches the problem is fixed in newer versions
Migrate to use meson build system
Drop libwrap packageconfig, its dropped upstream too
Use systemd_user_unit_dir to match OE
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Max Kellermann <max.kellermann@gmail.com>
Cc: Andreas Müller <schnitzeltony@gmail.com>
Diffstat (limited to 'meta-multimedia')
4 files changed, 96 insertions, 168 deletions
diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-StringBuffer-Include-cstddef-for-size_t.patch b/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-StringBuffer-Include-cstddef-for-size_t.patch deleted file mode 100644 index 1d869aa83..000000000 --- a/meta-multimedia/recipes-multimedia/musicpd/mpd/0001-StringBuffer-Include-cstddef-for-size_t.patch +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | From c14877071f14b218835f7fb034dea11bd1ba56f5 Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 25 Dec 2019 09:40:16 -0800 | ||
4 | Subject: [PATCH] StringBuffer: Include cstddef for size_t | ||
5 | |||
6 | Fixes | ||
7 | a.cpp:3:1: error: 'size_t' does not name a type | ||
8 | 3 | size_t s; | ||
9 | | ^~~~~~ | ||
10 | a.cpp:2:1: note: 'size_t' is defined in header '<cstddef>'; did you forget to '#include <cstddef>'? | ||
11 | |||
12 | Upstream-Status: Submitted [https://github.com/MusicPlayerDaemon/MPD/pull/697] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | src/util/StringBuffer.hxx | 1 + | ||
16 | 1 file changed, 1 insertion(+) | ||
17 | |||
18 | --- a/src/util/StringBuffer.hxx | ||
19 | +++ b/src/util/StringBuffer.hxx | ||
20 | @@ -31,6 +31,7 @@ | ||
21 | #define STRING_BUFFER_HPP | ||
22 | |||
23 | #include <array> | ||
24 | +#include <cstddef> | ||
25 | |||
26 | /** | ||
27 | * A statically allocated string buffer. | ||
diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd/0002-Include-stdexcept-for-runtime_error.patch b/meta-multimedia/recipes-multimedia/musicpd/mpd/0002-Include-stdexcept-for-runtime_error.patch deleted file mode 100644 index 1f1186719..000000000 --- a/meta-multimedia/recipes-multimedia/musicpd/mpd/0002-Include-stdexcept-for-runtime_error.patch +++ /dev/null | |||
@@ -1,38 +0,0 @@ | |||
1 | From 06f78ced45f6622a2e02cd09e6a2c0c22a98b89e Mon Sep 17 00:00:00 2001 | ||
2 | From: Khem Raj <raj.khem@gmail.com> | ||
3 | Date: Wed, 25 Dec 2019 09:41:55 -0800 | ||
4 | Subject: [PATCH 2/2] Include <stdexcept> for runtime_error | ||
5 | |||
6 | Fixes | ||
7 | |||
8 | ../git/src/LocateUri.cxx:65:14: error: 'runtime_error' is not a member of 'std' | ||
9 | 65 | throw std::runtime_error("Unsupported URI scheme"); | ||
10 | | ^~~~~~~~~~~~~ | ||
11 | |||
12 | Upstream-Status: Inappropriate [ Fixed differently upstream ] | ||
13 | Signed-off-by: Khem Raj <raj.khem@gmail.com> | ||
14 | --- | ||
15 | src/LocateUri.cxx | 1 + | ||
16 | src/pcm/PcmConvert.cxx | 1 + | ||
17 | 2 files changed, 2 insertions(+) | ||
18 | |||
19 | --- a/src/LocateUri.cxx | ||
20 | +++ b/src/LocateUri.cxx | ||
21 | @@ -17,6 +17,7 @@ | ||
22 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
23 | */ | ||
24 | |||
25 | +#include <stdexcept> | ||
26 | #include "config.h" | ||
27 | #include "LocateUri.hxx" | ||
28 | #include "client/Client.hxx" | ||
29 | --- a/src/pcm/PcmConvert.cxx | ||
30 | +++ b/src/pcm/PcmConvert.cxx | ||
31 | @@ -17,6 +17,7 @@ | ||
32 | * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | ||
33 | */ | ||
34 | |||
35 | +#include <stdexcept> | ||
36 | #include "config.h" | ||
37 | #include "PcmConvert.hxx" | ||
38 | #include "ConfiguredResampler.hxx" | ||
diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb deleted file mode 100644 index b214672c6..000000000 --- a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.20.22.bb +++ /dev/null | |||
@@ -1,103 +0,0 @@ | |||
1 | SUMMARY = "Music Player Daemon" | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
4 | |||
5 | LICENSE_FLAGS = "${@bb.utils.contains_any('PACKAGECONFIG', ['ffmpeg', 'aac'], 'commercial', '', d)}" | ||
6 | |||
7 | HOMEPAGE ="http://www.musicpd.org" | ||
8 | |||
9 | inherit autotools useradd systemd pkgconfig | ||
10 | |||
11 | DEPENDS += " \ | ||
12 | curl \ | ||
13 | sqlite3 \ | ||
14 | ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ | ||
15 | yajl \ | ||
16 | boost \ | ||
17 | icu \ | ||
18 | dbus \ | ||
19 | expat \ | ||
20 | " | ||
21 | |||
22 | SRC_URI = " \ | ||
23 | git://github.com/MusicPlayerDaemon/MPD;branch=v0.20.x \ | ||
24 | file://mpd.conf.in \ | ||
25 | file://0001-StringBuffer-Include-cstddef-for-size_t.patch \ | ||
26 | file://0002-Include-stdexcept-for-runtime_error.patch \ | ||
27 | " | ||
28 | SRCREV = "9274bc15bc41bbe490fde847f8422468cc20375d" | ||
29 | S = "${WORKDIR}/git" | ||
30 | |||
31 | EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '--with-systemdsystemunitdir=${systemd_unitdir}/system/', '--without-systemdsystemunitdir', d)}" | ||
32 | |||
33 | PACKAGECONFIG ??= "aac alsa ao bzip2 daemon ffmpeg fifo flac fluidsynth iso9660 jack libsamplerate libwrap httpd mms mpg123 modplug sndfile upnp openal opus oss recorder vorbis wavpack zlib" | ||
34 | |||
35 | PACKAGECONFIG[aac] = "--enable-aac,--disable-aac,faad2" | ||
36 | PACKAGECONFIG[alsa] = "--enable-alsa,--disable-alsa,alsa-lib" | ||
37 | PACKAGECONFIG[ao] = "--enable-ao,--disable-ao,libao" | ||
38 | PACKAGECONFIG[audiofile] = "--enable-audiofile,--disable-audiofile,audiofile" | ||
39 | PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2" | ||
40 | PACKAGECONFIG[cdioparanoia] = "--enable-cdio-paranoia,--disable-cdio-paranoia,libcdio-paranoia" | ||
41 | PACKAGECONFIG[daemon] = "--enable-daemon,--disable-daemon" | ||
42 | PACKAGECONFIG[ffmpeg] = "--enable-ffmpeg,--disable-ffmpeg,ffmpeg" | ||
43 | PACKAGECONFIG[fifo] = "--enable-fifo,--disable-fifo" | ||
44 | PACKAGECONFIG[flac] = "--enable-flac,--disable-flac,flac" | ||
45 | PACKAGECONFIG[fluidsynth] = "--enable-fluidsynth,--disable-fluidsynth,fluidsynth" | ||
46 | PACKAGECONFIG[httpd] = "--enable-httpd-output,--disable-httpd-output" | ||
47 | PACKAGECONFIG[id3tag] = "--enable-id3,--disable-id3,libid3tag" | ||
48 | PACKAGECONFIG[iso9660] = "--enable-iso9660,--disable-iso9660,libcdio" | ||
49 | PACKAGECONFIG[jack] = "--enable-jack,--disable-jack,jack" | ||
50 | PACKAGECONFIG[lame] = "--enable-lame-encoder,--disable-lame-encoder,lame" | ||
51 | PACKAGECONFIG[libsamplerate] = "--enable-lsr,--disable-lsr,libsamplerate0" | ||
52 | PACKAGECONFIG[libwrap] = "--enable-libwrap,--disable-libwrap,tcp-wrappers" | ||
53 | PACKAGECONFIG[mad] = "--enable-mad,--disable-mad,libmad" | ||
54 | PACKAGECONFIG[mms] = "--enable-mms,--disable-mms,libmms" | ||
55 | PACKAGECONFIG[modplug] = "--enable-modplug,--disable-modplug,libmodplug" | ||
56 | PACKAGECONFIG[mpg123] = "--enable-mpg123,--disable-mpg123,mpg123" | ||
57 | PACKAGECONFIG[openal] = "--enable-openal,--disable-openal,openal-soft" | ||
58 | PACKAGECONFIG[opus] = "--enable-opus,--disable-opus,libopus libogg" | ||
59 | PACKAGECONFIG[oss] = "--enable-oss,--disable-oss," | ||
60 | PACKAGECONFIG[recorder] = "--enable-recorder-output,--disable-recorder-output" | ||
61 | PACKAGECONFIG[smb] = "--enable-smbclient,--disable-smbclient,samba" | ||
62 | PACKAGECONFIG[sndfile] = "--enable-sndfile,--disable-sndfile,libsndfile1" | ||
63 | PACKAGECONFIG[upnp] = "--enable-upnp,--disable-upnp,libupnp" | ||
64 | PACKAGECONFIG[vorbis] = "--enable-vorbis,--disable-vorbis,libvorbis libogg" | ||
65 | PACKAGECONFIG[wavpack] = "--enable-wavpack,--disable-wavpack,wavpack" | ||
66 | PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib" | ||
67 | |||
68 | do_configure_prepend() { | ||
69 | sed -i -e 's|libsystemd-daemon|libsystemd|' ${S}/configure.ac | ||
70 | } | ||
71 | |||
72 | do_install_append() { | ||
73 | install -o mpd -d \ | ||
74 | ${D}/${localstatedir}/lib/mpd \ | ||
75 | ${D}/${localstatedir}/lib/mpd/playlists | ||
76 | install -m775 -o mpd -g mpd -d \ | ||
77 | ${D}/${localstatedir}/lib/mpd/music | ||
78 | |||
79 | install -d ${D}/${sysconfdir} | ||
80 | install -m 644 ${WORKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf | ||
81 | sed -i \ | ||
82 | -e 's|%music_directory%|${localstatedir}/lib/mpd/music|' \ | ||
83 | -e 's|%playlist_directory%|${localstatedir}/lib/mpd/playlists|' \ | ||
84 | -e 's|%db_file%|${localstatedir}/lib/mpd/mpd.db|' \ | ||
85 | -e 's|%log_file%|${localstatedir}/log/mpd.log|' \ | ||
86 | -e 's|%state_file%|${localstatedir}/lib/mpd/state|' \ | ||
87 | ${D}/${sysconfdir}/mpd.conf | ||
88 | |||
89 | # we don't need the icon | ||
90 | rm -rf ${D}${datadir}/icons | ||
91 | } | ||
92 | |||
93 | RPROVIDES_${PN} += "${PN}-systemd" | ||
94 | RREPLACES_${PN} += "${PN}-systemd" | ||
95 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
96 | SYSTEMD_SERVICE_${PN} = "mpd.socket" | ||
97 | |||
98 | USERADD_PACKAGES = "${PN}" | ||
99 | USERADD_PARAM_${PN} = " \ | ||
100 | --system --no-create-home \ | ||
101 | --home ${localstatedir}/lib/mpd \ | ||
102 | --groups audio \ | ||
103 | --user-group mpd" | ||
diff --git a/meta-multimedia/recipes-multimedia/musicpd/mpd_0.22.6.bb b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.22.6.bb new file mode 100644 index 000000000..e91bb5d97 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/musicpd/mpd_0.22.6.bb | |||
@@ -0,0 +1,96 @@ | |||
1 | SUMMARY = "Music Player Daemon" | ||
2 | LICENSE = "GPLv2" | ||
3 | LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" | ||
4 | |||
5 | LICENSE_FLAGS = "${@bb.utils.contains_any('PACKAGECONFIG', ['ffmpeg', 'aac'], 'commercial', '', d)}" | ||
6 | |||
7 | HOMEPAGE ="http://www.musicpd.org" | ||
8 | |||
9 | inherit meson useradd systemd pkgconfig | ||
10 | |||
11 | DEPENDS += " \ | ||
12 | curl \ | ||
13 | sqlite3 \ | ||
14 | ${@bb.utils.filter('DISTRO_FEATURES', 'pulseaudio', d)} \ | ||
15 | yajl \ | ||
16 | boost \ | ||
17 | icu \ | ||
18 | dbus \ | ||
19 | expat \ | ||
20 | " | ||
21 | |||
22 | SRC_URI = " \ | ||
23 | git://github.com/MusicPlayerDaemon/MPD;branch=v0.22.x \ | ||
24 | file://mpd.conf.in \ | ||
25 | " | ||
26 | SRCREV = "938728820b11d4544a071994fe3c63c6ab710e8e" | ||
27 | S = "${WORKDIR}/git" | ||
28 | |||
29 | EXTRA_OEMESON += "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', '-Dsystemd=enabled -Dsystemd_system_unit_dir=${systemd_system_unitdir} -Dsystemd_user_unit_dir=${systemd_system_unitdir}', '-Dsystemd=disabled', d)}" | ||
30 | |||
31 | PACKAGECONFIG ??= "aac alsa ao bzip2 daemon ffmpeg fifo flac fluidsynth iso9660 jack libsamplerate httpd mms mpg123 modplug sndfile upnp openal opus oss recorder vorbis wavpack zlib" | ||
32 | |||
33 | PACKAGECONFIG[aac] = "-Dfaad=enabled,-Dfaad=disabled,faad2" | ||
34 | PACKAGECONFIG[alsa] = "-Dalsa=enabled,-Dalsa=disabled,alsa-lib" | ||
35 | PACKAGECONFIG[ao] = "-Dao=enabled,-Dao=disabled,libao" | ||
36 | PACKAGECONFIG[audiofile] = "-Daudiofile=enabled,-Daudiofile=disabled,audiofile" | ||
37 | PACKAGECONFIG[bzip2] = "-Dbzip2=enabled,-Dbzip2=disabled,bzip2" | ||
38 | PACKAGECONFIG[cdioparanoia] = "-Dcdio_paranoia=enabled,-Dcdio_paranoia=disabled,libcdio-paranoia" | ||
39 | PACKAGECONFIG[daemon] = "-Ddaemon=true,-Ddaemon=false" | ||
40 | PACKAGECONFIG[ffmpeg] = "-Dffmpeg=enabled,-Dffmpeg=disabled,ffmpeg" | ||
41 | PACKAGECONFIG[fifo] = "-Dfifo=true,-Dfifo=false" | ||
42 | PACKAGECONFIG[flac] = "-Dflac=enabled,-Dflac=disabled,flac" | ||
43 | PACKAGECONFIG[fluidsynth] = "-Dfluidsynth=enabled,-Dfluidsynth=disabled,fluidsynth" | ||
44 | PACKAGECONFIG[httpd] = "-Dhttpd=true,-Dhttpd=false" | ||
45 | PACKAGECONFIG[id3tag] = "-Did3tag=enabled,-Did3tag=disabled,libid3tag" | ||
46 | PACKAGECONFIG[iso9660] = "-Diso9660=enabled,-Diso9660=disabled,libcdio" | ||
47 | PACKAGECONFIG[jack] = "-Djack=enabled,-Djack=disabled,jack" | ||
48 | PACKAGECONFIG[lame] = "-Dlame=enabled,-Dlame=disabled,lame" | ||
49 | PACKAGECONFIG[libsamplerate] = "-Dlibsamplerate=enabled,-Dlibsamplerate=disabled,libsamplerate0" | ||
50 | PACKAGECONFIG[mad] = "-Dmad=enabled,-Dmad=disabled,libmad" | ||
51 | PACKAGECONFIG[mms] = "-Dmms=enabled,-Dmms=disabled,libmms" | ||
52 | PACKAGECONFIG[modplug] = "-Dmodplug=enabled,-Dmodplug=disabled,libmodplug" | ||
53 | PACKAGECONFIG[mpg123] = "-Dmpg123=enabled,-Dmpg123=disabled,mpg123" | ||
54 | PACKAGECONFIG[openal] = "-Dopenal=enabled,-Dopenal=disabled,openal-soft" | ||
55 | PACKAGECONFIG[opus] = "-Dopus=enabled,-Dopus=disabled,libopus libogg" | ||
56 | PACKAGECONFIG[oss] = "-Doss=enabled,-Doss=disabled," | ||
57 | PACKAGECONFIG[recorder] = "-Drecorder=true,-Drecorder=false" | ||
58 | PACKAGECONFIG[smb] = "-Dsmbclient=enabled,-Dsmbclient=disabled,samba" | ||
59 | PACKAGECONFIG[sndfile] = "-Dsndfile=enabled,-Dsndfile=disabled,libsndfile1" | ||
60 | PACKAGECONFIG[upnp] = "-Dupnp=enabled,-Dupnp=disabled,libupnp" | ||
61 | PACKAGECONFIG[vorbis] = "-Dvorbis=enabled,-Dvorbis=disabled,libvorbis libogg" | ||
62 | PACKAGECONFIG[wavpack] = "-Dwavpack=enabled,-Dwavpack=disabled,wavpack" | ||
63 | PACKAGECONFIG[zlib] = "-Dzlib=enabled,-Dzlib=disabled,zlib" | ||
64 | |||
65 | do_install_append() { | ||
66 | install -o mpd -d \ | ||
67 | ${D}/${localstatedir}/lib/mpd \ | ||
68 | ${D}/${localstatedir}/lib/mpd/playlists | ||
69 | install -m775 -o mpd -g mpd -d \ | ||
70 | ${D}/${localstatedir}/lib/mpd/music | ||
71 | |||
72 | install -d ${D}/${sysconfdir} | ||
73 | install -m 644 ${WORKDIR}/mpd.conf.in ${D}/${sysconfdir}/mpd.conf | ||
74 | sed -i \ | ||
75 | -e 's|%music_directory%|${localstatedir}/lib/mpd/music|' \ | ||
76 | -e 's|%playlist_directory%|${localstatedir}/lib/mpd/playlists|' \ | ||
77 | -e 's|%db_file%|${localstatedir}/lib/mpd/mpd.db|' \ | ||
78 | -e 's|%log_file%|${localstatedir}/log/mpd.log|' \ | ||
79 | -e 's|%state_file%|${localstatedir}/lib/mpd/state|' \ | ||
80 | ${D}/${sysconfdir}/mpd.conf | ||
81 | |||
82 | # we don't need the icon | ||
83 | rm -rf ${D}${datadir}/icons | ||
84 | } | ||
85 | |||
86 | RPROVIDES_${PN} += "${PN}-systemd" | ||
87 | RREPLACES_${PN} += "${PN}-systemd" | ||
88 | RCONFLICTS_${PN} += "${PN}-systemd" | ||
89 | SYSTEMD_SERVICE_${PN} = "mpd.socket" | ||
90 | |||
91 | USERADD_PACKAGES = "${PN}" | ||
92 | USERADD_PARAM_${PN} = " \ | ||
93 | --system --no-create-home \ | ||
94 | --home ${localstatedir}/lib/mpd \ | ||
95 | --groups audio \ | ||
96 | --user-group mpd" | ||