ALSA tools for build-root
All,
I have also added alsa-tools to build-root and attached is the patch. These tools have a lot of dependencies that I am not using the tools that build fine for me I have defaulted to 'default y' in the Config.in file, all tools that depend on X, GTK, or some other library I am not using I have set 'default n' there are also tools that are going to require a custom target that my makefile does not do anything with these are all commented out in the config file. The makefile is quite simple I have a macro that creates a target for each simple selected tool the tools are selected from the configure script this was the simplest way I could think of doing the simple targets for this tool set. I have not looked at what is needed for the more complicated targets and I don't plan on using then. But I have left them in for the next to make the job easier for the next person hopefully.
Regards,
Rod Boyce
-------------- next part --------------
A non-text attachment was scrubbed...
Name: alsa-tools.patch
Type: text/x-patch
Size: 9814 bytes
Desc: not available
Url : http://busybox.net/lists/buildroot/attachments/20070602/c5a914fa/attachment.bin
Quoted 3 lines · Rod Boyce
All,
+$(foreach var,$(ALSA-TOOLS_TGTS),$(eval $(call alsa-mk_target,$(var))))
I think that creating rules with a define was horribly broken with anything older than make-3.81
Did you test these changes against make-3.80, which is the oldest version that is currently needed to use buildroot?
Quoted 24 lines · Rod Boyce
All,
I have also added alsa-tools to build-root and attached is the patch. These tools have a lot of dependencies that I am not using the tools that build fine for me I have defaulted to 'default y' in the Config.in file, all tools that depend on X, GTK, or some other library I am not using I have set 'default n' there are also tools that are going to require a custom target that my makefile does not do anything with these are all commented out in the config file. The makefile is quite simple I have a macro that creates a target for each simple selected tool the tools are selected from the configure script this was the simplest way I could think of doing the simple targets for this tool set. I have not looked at what is needed for the more complicated targets and I don't plan on using then. But I have left them in for the next to make the job easier for the next person hopefully.
Regards,
Rod BoyceIndex:
package/alsa-tools/alsa-tools.mk
===================================================================
alsa-tools/alsa-tools.mk line 9
Quoted 9 lines
alsa-tools/alsa-tools.mk +9
-0@@ -0,0 +1,134 @@ +############################################################# +# +# ALSA Tools +# +############################################################# +ALSA-TOOLS_VERSION := 1.0.14rc3 +ALSA-TOOLS_SOURCE := alsa-tools-$(ALSA-TOOLS_VERSION).tar.bz2 +ALSA-TOOLS_SITE := ftp://ftp.alsa-project.org/pub/tools/ +ALSA-TOOLS_DIR := $(BUILD_DIR)/$(patsubst %.tar.bz2,%,$(ALSA-TOOLS_SOURCE))
Also, i'm curious where you picked up this notion of setting the FOO_DIR.
The established way is a simple
FOO_DIR:=$(BUILD_DIR)/foo-$(FOO_VERSION)
Quoted 6 lines · Bernhard Fischer
Quoted 2 lines · Rod Boyce
All,
Quoted 10 lines
Quoted 2 lines
+$(foreach var,$(ALSA-TOOLS_TGTS),$(eval $(call alsa-mk_target,$(var))))
I think that creating rules with a define was horribly broken with anything older than make-3.81
Did you test these changes against make-3.80, which is the oldest version that is currently needed to use buildroot?
Bernhard,
I cannot believe my luck but the output from make --version on my development machine is:
[rod at celeron root]$ make --version
GNU Make 3.80
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
So I guess that means I have tested this on 3.80 :-) 8-) :-)
Regards,
Rod Boyce
Quoted 9 lines · Bernhard Fischer
Quoted 2 lines
+ALSA-TOOLS_DIR := $(BUILD_DIR)/$(patsubst %.tar.bz2,%,$(ALSA-TOOLS_SOURCE))
Also, i'm curious where you picked up this notion of setting the
FOO_DIR.The established way is a simple
FOO_DIR:=$(BUILD_DIR)/foo-$(FOO_VERSION)
This way means I only have to type the name and version once, I'm a great believer in if I can make something automatic then eliminate the chance the user (mostly me) can get it wrong the second time. You rejected the $(shell basename .... ) approach which I agree with the rejection of using another shell to do something that make is quite capable of doing just makes sense. I guess when I started looking at all this I used mpg123 version 16930 as my starting point. I would prefer not to see this changed as long at the packaging convention is kept the same. If the ALSA group ever change there packaging convention to not use name+version for the folder then I will change the *_DIR to suit. But while it is the same and can be automatically extracted from the package filename I would prefer to use this automated approach.
Hope that makes sense, ultimately since I will not be personally committing this to SVN it is up to whoever commits this patch to SVN to decide.
Regards,
Rod Boyce
On Sat, 2007-06-02 at 11:00 +0100, Rod Boyce wrote:
<cut intro>
I am sorry if I break message threading, I am still getting used to evolution.
Quoted 21 lines
Index: package/Config.in
===================================================================Config.in (working copy) renamed from Config.in (revision 18725) +1
-0@@ -239,10 +239,11 @@ Support for audio libraries and applications if BR2_AUDIO_SUPPORT +source "package/alsa-tools/Config.in" source "package/asterisk/Config.in" source "package/libid3tag/Config.in" source "package/libmad/Config.in" source "package/libsndfile/Config.in" source "package/madplay/Config.in" source "package/mpg123/Config.in" endifIndex:
package/alsa-tools/alsa-tools.mk
===================================================================
alsa-tools/alsa-tools.mk (revision 0) line 6
Quoted 6 lines
alsa-tools/alsa-tools.mk (revision 0) +6
-0@@ -0,0 +1,134 @@ +############################################################# +# +# ALSA Tools +# +############################################################# +ALSA-TOOLS_VERSION := 1.0.14rc3
Perhaps I am just picky, but I prefer all underscore in a variable, i.e. ALSA_TOOLS_VERSION.
alsa-tools/alsa-tools.mk (revision 0) line 9
Quoted 3 lines
alsa-tools/alsa-tools.mk (revision 0) +3
-0+ALSA-TOOLS_SOURCE := alsa-tools-$(ALSA-TOOLS_VERSION).tar.bz2 +ALSA-TOOLS_SITE := ftp://ftp.alsa-project.org/pub/tools/ +ALSA-TOOLS_DIR := $(BUILD_DIR)/$(patsubst %.tar.bz2,%,$(ALSA-TOOLS_SOURCE))
As mentioned on other emails, I do not prefer this way of doing it. I like the old see-what-you-have way of writing the _DIR variable.
alsa-tools/alsa-tools.mk (revision 0) line 11
Quoted 2 lines
alsa-tools/alsa-tools.mk (revision 0) +2
-0+ALSA-TOOLS_CAT := $(BZCAT) +ALSA-TOOLS_PATH := /usr/lib
WOHA! This should be usr/lib, skip the initial /.
alsa-tools/alsa-tools.mk (revision 0) line 15
Quoted 4 lines
alsa-tools/alsa-tools.mk (revision 0) +4
-0+ALSA-TOOLS_TGTS := ac3dec as10k1 echomixer envy24control mixartloader pcxhrloader +ALSA-TOOLS_TGTS += rmedigicontrol sscape_ctl us428control vxloader +# These are going to require custom rules and can't use the defined macro below +# ld10k1 sb16_csp qlo10k1 hdspconf hdsploader hdspmixer usx2yloader
AFAICT you build these no mather what? Should be configurable IMHO.
I can not really see why they have to be treated different from the other tools.
alsa-tools/alsa-tools.mk (revision 0) line 19
Quoted 4 lines
alsa-tools/alsa-tools.mk (revision 0) +4
-0+ALSA-TOOLS_TARGETS := +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_AC3DEC)) +ALSA-TOOLS_TARGETS += alsa-tools_ac3dec +endif
Instead consider:
ALSA-TOOLS_TARGETS_ :=
ALSA-TOOLS_TARGETS_y := ALSA_UTILS_TARGETS_$(BR2_PACKAGE_ALSA-TOOLS_AS10K1) += alsa-tools_as10k1
For all the ones below.
Quoted 71 lines
alsa-tools/alsa-tools.mk (revision 0) +71
-0+ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_AS10K1)) +ALSA-TOOLS_TARGETS += alsa-tools_as10k1 +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_ECHOMIXER)) +ALSA-TOOLS_TARGETS += alsa-tools_echomixer +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_ENVY24CONTROL)) +ALSA-TOOLS_TARGETS += alsa-tools_envy24control +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_HDSPCONF)) +ALSA-TOOLS_TARGETS += alsa-tools_hdspconf +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_HDSPLOADER)) +ALSA-TOOLS_TARGETS += alsa-tools_hdsploader +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_HDSPMIXER)) +ALSA-TOOLS_TARGETS += alsa-tools_hdspmixer +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_LD10K1)) +ALSA-TOOLS_TARGETS += alsa-tools_ld10k1 +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_MIXARTLOADER)) +ALSA-TOOLS_TARGETS += alsa-tools_mixartloader +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_PCXHRLOADER)) +ALSA-TOOLS_TARGETS += alsa-tools_pcxhrloader +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_QLO10K1)) +ALSA-TOOLS_TARGETS += alsa-tools_qlo10k1 +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_RMEDIGICONTROL)) +ALSA-TOOLS_TARGETS += alsa-tools_rmedigicontrol +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_SB16_CSP)) +ALSA-TOOLS_TARGETS += alsa-tools_sb16_csp +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_SEQ)) +ALSA-TOOLS_TARGETS += alsa-tools_seq +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_SSCAPE_CTL)) +ALSA-TOOLS_TARGETS += alsa-tools_sscape_ctl +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_US428CONTROL)) +ALSA-TOOLS_TARGETS += alsa-tools_us428control +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_USX2YLOADER)) +ALSA-TOOLS_TARGETS += alsa-tools_usx2yloader +endif +ifeq (y,$(BR2_PACKAGE_ALSA-TOOLS_VXLOADER)) +ALSA-TOOLS_TARGETS += alsa-tools_vxloader +endif + +$(DL_DIR)/$(ALSA-TOOLS_SOURCE): + $(WGET) -P $(DL_DIR) $(ALSA-TOOLS_SITE)/$(ALSA-TOOLS_SOURCE) + +$(ALSA-TOOLS_DIR)/.unpacked: $(DL_DIR)/$(ALSA-TOOLS_SOURCE) + $(ALSA-TOOLS_CAT) $(DL_DIR)/$(ALSA-TOOLS_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) - + $(CONFIG_UPDATE) $(D@) + touch $@ + +define alsa-mk_target +$$(ALSA-TOOLS_DIR)/$(1)/.configured: $$(ALSA-TOOLS_DIR)/.unpacked + (cd $$(ALSA-TOOLS_DIR)/$(1); rm -rf config.cache; \ + $$(TARGET_CONFIGURE_OPTS) \ + ./configure \ + --target=$$(GNU_TARGET_NAME) \ + --host=$$(GNU_TARGET_NAME) \ + --build=$$(GNU_HOST_NAME) \ + --disable-docs \ + --prefix=/usr \ + --sysconfdir=/etc \
alsa-tools/alsa-tools.mk (revision 0) line 100
Quoted 10 lines
alsa-tools/alsa-tools.mk (revision 0) +10
-0+ $$(DISABLE_NLS) \ + ); + touch $$@ + +$$(ALSA-TOOLS_DIR)/$(1)/$(1): $$(ALSA-TOOLS_DIR)/$(1)/.configured + $$(MAKE) CC=$$(TARGET_CC) -C $$(ALSA-TOOLS_DIR)/$(1) + +$$(STAGING_DIR)/bin/$(1): $$(ALSA-TOOLS_DIR)/$(1)/$(1) + $$(MAKE) prefix=$$(STAGING_DIR)/usr exec_prefix=$$(STAGING_DIR)/usr \ + -C $$(ALSA-TOOLS_DIR)/$(1) install
Replace prefix and exec_prefix with DESTDIR=$$(STAGING_DIR) instead.
Quoted 6 lines
alsa-tools/alsa-tools.mk (revision 0) +6
-0+ touch -c $$@ + +$$(TARGET_DIR)/usr/bin/$(1): $$(STAGING_DIR)/bin/$(1) + cp -rdpf $$(STAGING_DIR)/usr/bin/$(1) $$@ + -$(STRIP) --strip-unneeded $$@ +
alsa-tools/alsa-tools.mk (revision 0) line 116
Quoted 10 lines
alsa-tools/alsa-tools.mk (revision 0) +10
-0+alsa-tools_$(1): $$(TARGET_DIR)/usr/bin/$(1) + +alsa-tools_$(1)-clean: + -$$(MAKE) -C $$(ALSA-TOOLS_DIR)/$(1) clean + +endef + +$(foreach var,$(ALSA-TOOLS_TGTS),$(eval $(call alsa-mk_target,$(var)))) + +alsa-tools: alsa-lib alsa-utils $(ALSA-TOOLS_TARGETS)
And change this to ALSA-TOOLS_TARGETS_y to match the change a bit above when adding the tools to build.
I guess alsa-tools also depends on ncurses, uclibc and linux26? Better being to specific IMHO.
Quoted 57 lines
alsa-tools/alsa-tools.mk (revision 0) +15
-0+alsa-tools-source: $(DL_DIR)/$(ALSA-TOOLS_SOURCE) + +alsa-tools-clean: $(addsuffix -clean,$(ALSA-TOOLS_TARGETS)) + +alsa-tools-dirclean: + rm -rf $(ALSA-TOOLS_DIR) $(ALSA-TOOLS_DIR) +############################################################# +# +# Toplevel Makefile options +# +############################################################# +ifeq ($(strip $(BR2_PACKAGE_ALSA-TOOLS)),y) +TARGETS+=alsa-tools +endif +Index: package/alsa-tools/Config.in
===================================================================alsa-tools/Config.in (revision 0) +37
-0@@ -0,0 +1,144 @@ +config BR2_PACKAGE_ALSA-TOOLS + bool "alsa-tools" + default n + help + Tools from Advanced Linux Sound Architecture + + http://www.alsa-project.org/ + + +config BR2_PACKAGE_ALSA-TOOLS_AC3DEC + bool "ac3dec from alsa-tools" + default y + depends on BR2_PACKAGE_ALSA-TOOLS + help + Build the ac3 decoder from the ALSA tools package + +config BR2_PACKAGE_ALSA-TOOLS_AS10K1 + bool "as10k1 from alsa-tools" + default y + depends on BR2_PACKAGE_ALSA-TOOLS + help + Build as10k1 from the ALSA tools package + WARNING unless you know what this is you do not need it + +config BR2_PACKAGE_ALSA-TOOLS_ECHOMIXER + bool "echomixer from alsa-tools" + default n + depends on BR2_PACKAGE_ALSA-TOOLS + help + Build the echo mixer from the ALSA tools package + WARNING unless you know what this is you do not need it + +config BR2_PACKAGE_ALSA-TOOLS_ENVY24CONTROL + bool "envy24control from alsa-tools" + default n + depends on BR2_PACKAGE_ALSA-TOOLS + help
alsa-tools/Config.in (revision 0) line 47
Quoted 10 lines
alsa-tools/Config.in (revision 0) +10
-0+ Build envy24control from the ALSA tools package + WARNING unless you know what this is you do not need it + +#config BR2_PACKAGE_ALSA-TOOLS_HDSPCONF +# bool "hdspconf from alsa-tools" +# default n +# depends on BR2_PACKAGE_ALSA-TOOLS +# help +# Build hdspconf from the ALSA tools package +# WARNING unless you know what this is you do not need it
Commented out? Remove if not used, or fix it so the config option works.
alsa-tools/Config.in (revision 0) line 54
Quoted 7 lines
alsa-tools/Config.in (revision 0) +7
-0+#config BR2_PACKAGE_ALSA-TOOLS_HDSPLOADER +# bool "hdsploader from alsa-tools" +# default n +# depends on BR2_PACKAGE_ALSA-TOOLS +# help +# Build hdsploader from the ALSA tools package +# WARNING unless you know what this is you do not need it
Same as above.
alsa-tools/Config.in (revision 0) line 61
Quoted 7 lines
alsa-tools/Config.in (revision 0) +7
-0+#config BR2_PACKAGE_ALSA-TOOLS_HDSPMIXER +# bool "hdspmixer from alsa-tools" +# default n +# depends on BR2_PACKAGE_ALSA-TOOLS +# help +# Build hdspmixer from the ALSA tools package +# WARNING unless you know what this is you do not need it
Same as above.
alsa-tools/Config.in (revision 0) line 68
Quoted 7 lines
alsa-tools/Config.in (revision 0) +7
-0+#config BR2_PACKAGE_ALSA-TOOLS_LD10K1 +# bool "ld10k1 from alsa-tools" +# default n +# depends on BR2_PACKAGE_ALSA-TOOLS +# help +# Build ld10k1 from the ALSA tools package +# WARNING unless you know what this is you do not need it
Same as above.
Quoted 13 lines
alsa-tools/Config.in (revision 0) +13
-0+config BR2_PACKAGE_ALSA-TOOLS_MIXARTLOADER + bool "mixartloader from alsa-tools" + default y + depends on BR2_PACKAGE_ALSA-TOOLS + help + Build mixartloader from the ALSA tools package + WARNING unless you know what this is you do not need it + +config BR2_PACKAGE_ALSA-TOOLS_PCXHRLOADER + bool "pcxhrloader from alsa-tools" + default y + depends on BR2_PACKAGE_ALSA-TOOLS + help
alsa-tools/Config.in (revision 0) line 91
Quoted 10 lines
alsa-tools/Config.in (revision 0) +10
-0+ Build pcxhrloader from the ALSA tools package + WARNING unless you know what this is you do not need it + +#config BR2_PACKAGE_ALSA-TOOLS_QLO10K1 +# bool "qlo10k1 from alsa-tools" +# default n +# depends on BR2_PACKAGE_ALSA-TOOLS +# help +# Build qlo10k1 from the ALSA tools package +# WARNING unless you know what this is you do not need it
Same as above.
Quoted 5 lines
alsa-tools/Config.in (revision 0) +5
-0+config BR2_PACKAGE_ALSA-TOOLS_RMEDIGICONTROL + bool "rmedigicontrol from alsa-tools" + default n + depends on BR2_PACKAGE_ALSA-TOOLS + help
alsa-tools/Config.in (revision 0) line 106
Quoted 10 lines
alsa-tools/Config.in (revision 0) +10
-0+ Build rmedigicontrol from the ALSA tools package + WARNING unless you know what this is you do not need it + +#config BR2_PACKAGE_ALSA-TOOLS_SB16_CSP +# bool "sb16_csp from alsa-tools" +# default n +# depends on BR2_PACKAGE_ALSA-TOOLS +# help +# Build sb16_csp from the ALSA tools package +# WARNING unless you know what this is you do not need it
Same as above.
Quoted 13 lines
alsa-tools/Config.in (revision 0) +13
-0+config BR2_PACKAGE_ALSA-TOOLS_SSCAPE_CTL + bool "sscape_ctl from alsa-tools" + default y + depends on BR2_PACKAGE_ALSA-TOOLS + help + Build sscape_ctl from the ALSA tools package + WARNING unless you know what this is you do not need it + +config BR2_PACKAGE_ALSA-TOOLS_US428CONTROL + bool "us428control from alsa-tools" + default y + depends on BR2_PACKAGE_ALSA-TOOLS + help
alsa-tools/Config.in (revision 0) line 129
Quoted 10 lines
alsa-tools/Config.in (revision 0) +10
-0+ Build us428control from the ALSA tools package + WARNING unless you know what this is you do not need it + +#config BR2_PACKAGE_ALSA-TOOLS_USX2YLOADER +# bool "usx2yloader from alsa-tools" +# default n +# depends on BR2_PACKAGE_ALSA-TOOLS +# help +# Build usx2yloader from the ALSA tools package +# WARNING unless you know what this is you do not need it
Same as above.
alsa-tools/Config.in (revision 0) line 137
Quoted 8 lines
alsa-tools/Config.in (revision 0) +8
-0+config BR2_PACKAGE_ALSA-TOOLS_VXLOADER + bool "vxloader from alsa-tools" + default y + depends on BR2_PACKAGE_ALSA-TOOLS + help + Build vxloader from the ALSA tools package + WARNING unless you know what this is you do not need it +
Overall I think your patch looks good. I only use alsa-lib and alsa-utils and are really no expert in alsa-tools.
Signature · 2 lines
Best regards, Hans-Christian Egtvedt