source "package/wavpack/Config.in"
source "package/xbmc/Config.in"
source "package/yavta/Config.in"
+ source "package/ympd/Config.in"
endmenu
menu "Compressors and decompressors"
--- /dev/null
+config BR2_PACKAGE_YMPD
+ bool "ympd"
+ select BR2_PACKAGE_LIBMPDCLIENT
+ depends on BR2_TOOLCHAIN_HAS_THREADS
+ depends on BR2_LARGEFILE
+ help
+ ympd, a standalone MPD Web GUI written in C, utilizing
+ Websockets and Bootstrap/JS
+
+comment "ympd needs a toolchain w/ threads, largefile"
+ depends on !BR2_TOOLCHAIN_HAS_THREADS || !BR2_LARGEFILE
--- /dev/null
+Do not build the mkdata tool
+
+The mkdata tool is needed on the host, during the build, so building
+it for the target does not work when cross-compiling. Buildroot will
+manually build mkdata before starting the ympd build.
+
+Upstream is looking into a proper solution.
+
+Signed-off-by: Eric Limpens <Limpens@Gmail.com>
+
+Index: b/CMakeLists.txt
+===================================================================
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -28,9 +28,6 @@
+ htdocs/index.html
+ )
+
+-add_executable(mkdata htdocs/mkdata.c)
+-get_target_property(MKDATA_EXE mkdata LOCATION)
+-
+ add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/assets.c
+ COMMAND ${MKDATA_EXE} ${RESOURCES} > ${PROJECT_BINARY_DIR}/assets.c
+ WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
--- /dev/null
+ympd is implemented only in C
+
+By default, CMake assumes that the project is using both C and C++. By
+explicitly passing 'C' as argument of the project() macro, we tell
+CMake that only C is used, which prevents CMake from checking if a C++
+compiler exists.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/CMakeLists.txt
+===================================================================
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -1,6 +1,6 @@
+ cmake_minimum_required(VERSION 2.6)
+
+-project (ympd)
++project (ympd C)
+ set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${PROJECT_SOURCE_DIR}/cmake/")
+ set(CPACK_PACKAGE_VERSION_MAJOR "1")
+ set(CPACK_PACKAGE_VERSION_MINOR "2")
--- /dev/null
+################################################################################
+#
+# ympd
+#
+################################################################################
+
+YMPD_VERSION = a98d760dddff4b0dd595d977c9077f34beff05c5
+YMPD_SITE = $(call github,notandy,ympd,$(YMPD_VERSION))
+YMPD_LICENSE = GPLv2
+YMPD_LICENSE_FILE = LICENSE
+YMPD_DEPENDENCIES = libmpdclient
+
+define YMPD_MAKE_HOST_TOOL
+ $(HOSTCC) $(HOST_CFLAGS) $(@D)/htdocs/mkdata.c -o $(@D)/mkdata
+endef
+
+YMPD_PRE_BUILD_HOOKS += YMPD_MAKE_HOST_TOOL
+
+YMPD_CONF_OPT += -DMKDATA_EXE=$(@D)/mkdata
+
+$(eval $(cmake-package))