# Locally calculated after checking pgp signature
-sha256 a4337d06c85dc81a638821d30fce8a137a58d13d510be34a11c1cce95cabc547 mpc-0.28.tar.xz
+sha256 02f1daec902cb48f8cdaa6fe21c7219f6231b091dddbe437a3a4fb12cb07b9d3 mpc-0.29.tar.xz
+sha256 ab15fd526bd8dd18a9e77ebc139656bf4d33e97fc7238cd11bf60e2b9b8666c6 COPYING
################################################################################
MPD_MPC_VERSION_MAJOR = 0
-MPD_MPC_VERSION = $(MPD_MPC_VERSION_MAJOR).28
+MPD_MPC_VERSION = $(MPD_MPC_VERSION_MAJOR).29
MPD_MPC_SITE = http://www.musicpd.org/download/mpc/$(MPD_MPC_VERSION_MAJOR)
MPD_MPC_SOURCE = mpc-$(MPD_MPC_VERSION).tar.xz
MPD_MPC_LICENSE = GPL-2.0+
MPD_MPC_LICENSE_FILES = COPYING
-MPD_MPC_DEPENDENCIES = host-pkgconf libmpdclient
-MPD_MPC_CONF_ENV = ac_cv_prog_cc_c99='-std=c99'
+MPD_MPC_DEPENDENCIES = host-meson host-pkgconf libmpdclient
-$(eval $(autotools-package))
+MPD_MPC_CONF_OPTS += \
+ --prefix=/usr \
+ --buildtype $(if $(BR2_ENABLE_DEBUG),debug,release) \
+ --cross-file $(HOST_DIR)/etc/meson/cross-compilation.conf
+
+MPD_MPC_NINJA_OPTS = $(if $(VERBOSE),-v)
+
+define MPD_MPC_CONFIGURE_CMDS
+ rm -rf $(@D)/build
+ mkdir -p $(@D)/build
+ $(TARGET_MAKE_ENV) meson $(MPD_MPC_CONF_OPTS) $(@D) $(@D)/build
+endef
+
+define MPD_MPC_BUILD_CMDS
+ $(TARGET_MAKE_ENV) ninja $(MPD_MPC_NINJA_OPTS) -C $(@D)/build
+endef
+
+define MPD_MPC_INSTALL_TARGET_CMDS
+ $(TARGET_MAKE_ENV) DESTDIR=$(TARGET_DIR) ninja $(MPD_MPC_NINJA_OPTS) \
+ -C $(@D)/build install
+endef
+
+$(eval $(generic-package))