From a7011404d33742578d9f28ee4ba780bf206377ae Mon Sep 17 00:00:00 2001 From: Peter Wagner <​tripolar@gmx.at> Date: Sun, 4 Aug 2013 13:53:57 +0000 Subject: [PATCH] cmus: add pulseaudio and oss support as seperate packages, fixes a dependency problem Signed-off-by: Peter Wagner SVN-Revision: 37683 --- sound/cmus/Config.in | 12 ------- sound/cmus/Makefile | 75 ++++++++++++++++++++++++++++++++++---------- 2 files changed, 59 insertions(+), 28 deletions(-) delete mode 100644 sound/cmus/Config.in diff --git a/sound/cmus/Config.in b/sound/cmus/Config.in deleted file mode 100644 index f143133d8..000000000 --- a/sound/cmus/Config.in +++ /dev/null @@ -1,12 +0,0 @@ -menu "Configuration" - depends on PACKAGE_cmus - -config CMUS_WITH_PULSE - bool "Enable pulseaudio support" - default n - -config CONFIG_CMUS_WITH_OSS - bool "Enable OSS support" - default n - -endmenu diff --git a/sound/cmus/Makefile b/sound/cmus/Makefile index 1b90ed7c9..bf0b3e77f 100644 --- a/sound/cmus/Makefile +++ b/sound/cmus/Makefile @@ -10,39 +10,54 @@ include $(TOPDIR)/rules.mk PKG_NAME:=cmus PKG_VERSION:=2.5.0 -PKG_RELEASE:=4 +PKG_RELEASE:=5 PKG_SOURCE:=$(PKG_NAME)-v$(PKG_VERSION).tar.bz2 PKG_SOURCE_URL:=@SF/cmus PKG_MD5SUM:=9af16d324060447996ed25e1a9c1c7d8 +PKG_BUILD_DEPENDS:=pulseaudio-daemon + PKG_INSTALL:=1 PKG_BUILD_DIR:=$(BUILD_DIR)/cmus-v$(PKG_VERSION) include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/nls.mk -define Package/cmus + +define Package/cmus/Default + SUBMENU:=cmus SECTION:=sound CATEGORY:=Sound + MAINTAINER:=Peter Wagner + URL:=http://cmus.sourceforge.net/ +endef + +define Package/cmus +$(call Package/cmus/Default) + TITLE:=C* Music Player DEPENDS:= \ +libpthread +librt +libncursesw $(ICONV_DEPENDS) \ +AUDIO_SUPPORT:alsa-lib \ - +BUILD_PATENTED:libmad +libvorbisidec +libflac \ - $(if $(CONFIG_CMUS_WITH_PULSE),+pulseaudio-daemon,) - - TITLE:=C* Music Player - MAINTAINER:=Peter Wagner - URL:=http://cmus.sourceforge.net/ - MENU:=1 + +BUILD_PATENTED:libmad +libvorbisidec +libflac endef -define Package/cmus/config - source "$(SOURCE)/Config.in" +define Package/cmus-plugin-pulse +$(call Package/cmus/Default) + TITLE:=cmus pulseaudio plugin + DEPENDS:= \ + +cmus \ + +pulseaudio-daemon endef +define Package/cmus-plugin-oss +$(call Package/cmus/Default) + TITLE:=cmus oss plugin + DEPENDS:= \ + +cmus +endef -define Package/cmus/description +define Package/cmus/Default/description C* Music Player is a modular and very configurable ncurses-based audio player. It has some interesting features like configurable colorscheme, mp3 and ogg streaming, it can be controlled with an @@ -50,6 +65,20 @@ define Package/cmus/description configuration interface. endef +define Package/cmus/description +$(call Package/cmus/Default/description) +endef + +define Package/cmus-plugin-pulse/description +$(call Package/cmus/Default/description) + This package adds the Pulseaudio plugin. +endef + +define Package/cmus-plugin-oss/description +$(call Package/cmus/Default/description) + This package adds the OSS plugin. +endef + define Build/Configure # this is *NOT* GNU configure ( cd $(PKG_BUILD_DIR); \ @@ -72,11 +101,11 @@ define Build/Configure CONFIG_AAC=n \ CONFIG_FFMPEG=n \ CONFIG_ROAR=n \ - CONFIG_PULSE=$(if $(CONFIG_CMUS_WITH_PULSE),a,n) \ + CONFIG_PULSE=a \ CONFIG_ALSA=$(if $(CONFIG_AUDIO_SUPPORT),a,n) \ CONFIG_AO=n \ CONFIG_ARTS=n \ - CONFIG_OSS=$(if $(CONFIG_CMUS_WITH_OSS),a,n) \ + CONFIG_OSS=a \ CONFIG_SUN=n \ CONFIG_WAVEOUT=n \ DEBUG=0 \ @@ -96,10 +125,24 @@ define Package/cmus/install $(INSTALL_DIR) $(1)/usr/lib/cmus/op $(INSTALL_DIR) $(1)/usr/share/cmus $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/cmus $(1)/usr/bin/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmus/ip/*.so $(1)/usr/lib/cmus/ip/ - $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmus/op/*.so $(1)/usr/lib/cmus/op/ + $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmus/ip/{flac,vorbis,wav}.so $(1)/usr/lib/cmus/ip/ + $(if $(CONFIG_BUILD_PATENTED),$(CP) $(PKG_INSTALL_DIR)/usr/lib/cmus/ip/mad.so $(1)/usr/lib/cmus/ip/,) + $(if $(CONFIG_AUDIO_SUPPORT),$(CP) $(PKG_INSTALL_DIR)/usr/lib/cmus/op/alsa.so $(1)/usr/lib/cmus/op/,) $(CP) $(PKG_INSTALL_DIR)/usr/share/cmus/{rc,default.theme} $(1)/usr/share/cmus/ endef +define Package/cmus-plugin-pulse/install + $(INSTALL_DIR) $(1)/usr/lib/cmus/op + $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmus/op/pulse.so $(1)/usr/lib/cmus/op/ +endef + +define Package/cmus-plugin-oss/install + $(INSTALL_DIR) $(1)/usr/lib/cmus/op + $(CP) $(PKG_INSTALL_DIR)/usr/lib/cmus/op/oss.so $(1)/usr/lib/cmus/op/ +endef + + $(eval $(call BuildPackage,cmus)) +$(eval $(call BuildPackage,cmus-plugin-pulse)) +$(eval $(call BuildPackage,cmus-plugin-oss)) -- 2.30.2