SoX is the Swiss Army Knife of sound processing utilities. It can convert audio files to other popular audio file types and also apply sound effects and filters during the conversion. See http://sox.sourceforge.net/ for more information.
In addition to libsox, optionally the command-line tool "sox" and its shortcuts "soxi", "play", "rec" can be installed. Signed-off-by: Andreas Pretzsch <[email protected]> --- rules/sox.in | 91 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ rules/sox.make | 85 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 176 insertions(+) create mode 100644 rules/sox.in create mode 100644 rules/sox.make diff --git a/rules/sox.in b/rules/sox.in new file mode 100644 index 0000000..abaffc3 --- /dev/null +++ b/rules/sox.in @@ -0,0 +1,91 @@ +## SECTION=multimedia_sound + +menuconfig SOX + tristate + prompt "sox " + select FILE if SOX_MAGIC + select LIBPNG if SOX_PNG + # no LADSPA in PTXdist + select LIBMAD if SOX_MAD + select LIBID3TAG if SOX_ID3TAG + select LAME if SOX_LAME + select TWOLAME if SOX_TWOLAME + help + SoX is the Swiss Army Knife of sound processing utilities. + + It can convert audio files to other popular audio file types + and also apply sound effects and filters during the conversion. + See http://sox.sourceforge.net/ for more information. + + Selecting this option installs libsox. For sox binary, see menu. + +if SOX + +# features using external libraries +# --------------------------------- + +config SOX_MAGIC + bool + prompt "MAGIC support" + help + Include support for libmagic based file type autodetection. + libmagic is part of file utils. + +config SOX_PNG + bool + prompt "PNG support" + help + Include support for libpng based PNG generation. + Used in sox for spectrogram generation. + +# no LADSPA in PTXdist + +config SOX_MAD + bool + prompt "MAD support" + help + Include support for libmad based MP3 decoding. + +config SOX_ID3TAG + bool + prompt "ID3TAG support" + help + Include support for libid3tag based ID3 tag handling. + +config SOX_LAME + bool + prompt "LAME support" + help + Include support for libmp3lame based MP3 encoding. + +config SOX_TWOLAME + bool + prompt "TWOLAME support" + help + Include support for libtwolame based MP2 encoding. + + +# sox command-line tools +# ---------------------- + +config SOX_TOOLS_SOX_SOXI + bool + default y + prompt "Install sox command-line tools sox, soxi" + help + Install command-line tool 'sox' providing all libSoX functionality. + Also install symlink 'soxi' pointing to 'sox'. soxi displays + sound file metadata and is a shortcut for "sox --info". + +config SOX_TOOLS_PLAY_REC + bool + depends on SOX_TOOLS_SOX_SOXI + prompt "Install sox command-line tools play, rec" + help + Install symlinks 'play' and 'rec' pointing to 'sox'. + play will use sox for basic playing and is a shortcut + for "sox <file> -d". + rec will use sox for basic recording and is a shortcut + for "sox -d <file>". + +endif diff --git a/rules/sox.make b/rules/sox.make new file mode 100644 index 0000000..b3c4e87 --- /dev/null +++ b/rules/sox.make @@ -0,0 +1,85 @@ +# -*-makefile-*- +# +# Copyright (C) 2015 by Andreas Pretzsch <[email protected]> +# +# See CREDITS for details about who has contributed to this project. +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +PACKAGES-$(PTXCONF_SOX) += sox + +SOX_VERSION := 14.4.2 +SOX_MD5 := ba804bb1ce5c71dd484a102a5b27d0dd +SOX := sox-$(SOX_VERSION) +SOX_SUFFIX := tar.bz2 +SOX_URL := $(call ptx/mirror, SF, sox/$(SOX).$(SOX_SUFFIX)) +SOX_SOURCE := $(SRCDIR)/$(SOX).$(SOX_SUFFIX) +SOX_DIR := $(BUILDDIR)/$(SOX) +SOX_LICENSE := GPLv2+ (tools), LGPLv2.1+ (libs) + +# ---------------------------------------------------------------------------- +# Prepare +# ---------------------------------------------------------------------------- + +SOX_CONF_TOOL := autoconf + +SOX_CONF_OPT := \ + $(CROSS_AUTOCONF_USR) \ + $(GLOBAL_LARGE_FILE_OPTION) + +# --disable-openmp : configure detects OpenMP support but won't run on +# targets without libgomp (GCC OpenMP) or similar +SOX_CONF_OPT += \ + --disable-openmp + +# --disable-dl-* : configure default ; link instead if Dlopen library +# --enable-symlinks : configure default ; for soxi, play, rec +SOX_CONF_OPT += \ + --disable-dl-mad \ + --disable-dl-lame \ + --disable-dl-twolame \ + --disable-dl-amrwb \ + --disable-dl-amrnb \ + --disable-dl-sndfile \ + --enable-symlinks + +# --without-ladspa : no LADSPA in PTXdist +SOX_CONF_OPT += \ + --$(call ptx/wwo, PTXCONF_SOX_MAGIC)-magic \ + --$(call ptx/wwo, PTXCONF_SOX_PNG)-png \ + --without-ladspa \ + --$(call ptx/wwo, PTXCONF_SOX_MAD)-mad \ + --$(call ptx/wwo, PTXCONF_SOX_ID3TAG)-id3tag \ + --$(call ptx/wwo, PTXCONF_SOX_LAME)-lame \ + --$(call ptx/wwo, PTXCONF_SOX_TWOLAME)-twolame + +# ---------------------------------------------------------------------------- +# Target-Install +# ---------------------------------------------------------------------------- + +$(STATEDIR)/sox.targetinstall: + @$(call targetinfo) + + @$(call install_init, sox) + @$(call install_fixup, sox,PRIORITY,optional) + @$(call install_fixup, sox,SECTION,base) + @$(call install_fixup, sox,AUTHOR,"Andreas Pretzsch <[email protected]>") + @$(call install_fixup, sox,DESCRIPTION,"Sound eXchange") + + @$(call install_lib, sox, 0, 0, 0644, libsox) +ifdef PTXCONF_SOX_TOOLS_SOX_SOXI + @$(call install_copy, sox, 0, 0, 0755, -, /usr/bin/sox) + @$(call install_link, sox, sox, /usr/bin/soxi) +endif +ifdef PTXCONF_SOX_TOOLS_PLAY_REC + @$(call install_link, sox, sox, /usr/bin/play) + @$(call install_link, sox, sox, /usr/bin/rec) +endif + + @$(call install_finish, sox) + + @$(call touch) + +# vim: syntax=make -- 2.1.3 -- ptxdist mailing list [email protected]
