ympd: new package
[Thomas: - Add the package to package/Config.in - Add dependency on largefile - Add new patch to CMakeLists.txt to remove the unused C++ dependency - Change the existing CMakeLists.txt patch to simply remove the problematic code, and reword the explanation.] Signed-off-by: Eric Limpens <limpens@gmail.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
This commit is contained in:
parent
1df7c56a7a
commit
40aa523af2
@ -35,6 +35,7 @@ menu "Audio and video applications"
|
||||
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"
|
||||
|
11
package/ympd/Config.in
Normal file
11
package/ympd/Config.in
Normal file
@ -0,0 +1,11 @@
|
||||
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
|
24
package/ympd/ympd-0001-CMake-cross-compile-mkdata.patch
Normal file
24
package/ympd/ympd-0001-CMake-cross-compile-mkdata.patch
Normal file
@ -0,0 +1,24 @@
|
||||
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}
|
21
package/ympd/ympd-0002-only-c-language.patch
Normal file
21
package/ympd/ympd-0002-only-c-language.patch
Normal file
@ -0,0 +1,21 @@
|
||||
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")
|
21
package/ympd/ympd.mk
Normal file
21
package/ympd/ympd.mk
Normal file
@ -0,0 +1,21 @@
|
||||
################################################################################
|
||||
#
|
||||
# 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))
|
Loading…
Reference in New Issue
Block a user