mirror of https://git.wownero.com/dsc/mxe.git
new package: sox
This commit is contained in:
parent
fe2aea1a6d
commit
d3aa8cfff8
|
@ -0,0 +1,226 @@
|
|||
This file is part of mingw-cross-env.
|
||||
See doc/index.html for further information.
|
||||
|
||||
This patch has been taken from:
|
||||
http://sourceforge.net/mailarchive/forum.php?thread_name=4DD823B6.908%40cheramy.net&forum_name=sox-devel
|
||||
|
||||
diff --git a/src/optional-fmts.am b/src/optional-fmts.am
|
||||
index 6c496aa..7e91176 100644
|
||||
--- a/src/optional-fmts.am
|
||||
+++ b/src/optional-fmts.am
|
||||
@@ -3,11 +3,7 @@
|
||||
if HAVE_ALSA
|
||||
if STATIC_ALSA
|
||||
libsox_la_SOURCES += alsa.c
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @ALSA_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @ALSA_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_alsa_la_SOURCES = alsa.c
|
||||
libsox_fmt_alsa_la_LIBADD = libsox.la @ALSA_LIBS@
|
||||
@@ -18,11 +14,7 @@ endif
|
||||
if HAVE_AMRNB
|
||||
if STATIC_AMRNB
|
||||
libsox_la_SOURCES += amr-nb.c amr.h
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @AMRNB_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @AMRNB_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_amr_nb_la_SOURCES = amr-nb.c amr.h
|
||||
libsox_fmt_amr_nb_la_LIBADD = libsox.la @AMRNB_LIBS@
|
||||
@@ -33,11 +25,7 @@ endif
|
||||
if HAVE_AMRWB
|
||||
if STATIC_AMRWB
|
||||
libsox_la_SOURCES += amr-wb.c amr.h
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @AMRWB_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @AMRWB_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_amr_wb_la_SOURCES = amr-wb.c amr.h
|
||||
libsox_fmt_amr_wb_la_LIBADD = libsox.la @AMRWB_LIBS@
|
||||
@@ -48,11 +36,7 @@ endif
|
||||
if HAVE_AO
|
||||
if STATIC_AO
|
||||
libsox_la_SOURCES += ao.c
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @AO_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @AO_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_ao_la_SOURCES = ao.c
|
||||
libsox_fmt_ao_la_LIBADD = libsox.la @AO_LIBS@
|
||||
@@ -63,11 +47,7 @@ endif
|
||||
if HAVE_COREAUDIO
|
||||
if STATIC_COREAUDIO
|
||||
libsox_la_SOURCES += coreaudio.c
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @COREAUDIO_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @COREAUDIO_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_coreaudio_la_SOURCES = coreaudio.c
|
||||
libsox_fmt_coreaudio_la_LIBADD = libsox.la @COREAUDIO_LIBS@
|
||||
@@ -78,11 +58,7 @@ endif
|
||||
if HAVE_FFMPEG
|
||||
if STATIC_FFMPEG
|
||||
libsox_la_SOURCES += ffmpeg.c ffmpeg.h
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @FFMPEG_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @FFMPEG_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_ffmpeg_la_SOURCES = ffmpeg.c ffmpeg.h
|
||||
libsox_fmt_ffmpeg_la_LIBADD = libsox.la @FFMPEG_LIBS@
|
||||
@@ -93,11 +69,7 @@ endif
|
||||
if HAVE_FLAC
|
||||
if STATIC_FLAC
|
||||
libsox_la_SOURCES += flac.c
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @FLAC_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @FLAC_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_flac_la_SOURCES = flac.c
|
||||
libsox_fmt_flac_la_LIBADD = libsox.la @FLAC_LIBS@
|
||||
@@ -108,11 +80,7 @@ endif
|
||||
if HAVE_GSM
|
||||
if STATIC_GSM
|
||||
libsox_la_SOURCES += gsm.c
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @GSM_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @GSM_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_gsm_la_SOURCES = gsm.c
|
||||
libsox_fmt_gsm_la_LIBADD = libsox.la @GSM_LIBS@
|
||||
@@ -123,11 +91,7 @@ endif
|
||||
if HAVE_LPC10
|
||||
if STATIC_LPC10
|
||||
libsox_la_SOURCES += lpc10.c
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @LPC10_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @LPC10_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_lpc10_la_SOURCES = lpc10.c
|
||||
libsox_fmt_lpc10_la_LIBADD = libsox.la @LPC10_LIBS@
|
||||
@@ -138,11 +102,7 @@ endif
|
||||
if HAVE_MP3
|
||||
if STATIC_MP3
|
||||
libsox_la_SOURCES += mp3.c mp3-util.h
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @MP3_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @MP3_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_mp3_la_SOURCES = mp3.c mp3-util.h
|
||||
libsox_fmt_mp3_la_LIBADD = libsox.la @MP3_LIBS@
|
||||
@@ -153,11 +113,7 @@ endif
|
||||
if HAVE_OSS
|
||||
if STATIC_OSS
|
||||
libsox_la_SOURCES += oss.c
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @OSS_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @OSS_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_oss_la_SOURCES = oss.c
|
||||
libsox_fmt_oss_la_LIBADD = libsox.la @OSS_LIBS@
|
||||
@@ -168,11 +124,7 @@ endif
|
||||
if HAVE_PULSEAUDIO
|
||||
if STATIC_PULSEAUDIO
|
||||
libsox_la_SOURCES += pulseaudio.c
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @PULSEAUDIO_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @PULSEAUDIO_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_pulseaudio_la_SOURCES = pulseaudio.c
|
||||
libsox_fmt_pulseaudio_la_LIBADD = libsox.la @PULSEAUDIO_LIBS@
|
||||
@@ -183,11 +135,7 @@ endif
|
||||
if HAVE_WAVEAUDIO
|
||||
if STATIC_WAVEAUDIO
|
||||
libsox_la_SOURCES += waveaudio.c
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @WAVEAUDIO_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @WAVEAUDIO_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_waveaudio_la_SOURCES = waveaudio.c
|
||||
libsox_fmt_waveaudio_la_LIBADD = libsox.la @WAVEAUDIO_LIBS@
|
||||
@@ -199,11 +147,6 @@ if HAVE_SNDIO
|
||||
if STATIC_SNDIO
|
||||
libsox_la_SOURCES += sndio.c
|
||||
libsox_la_LIBADD += @SNDIO_LIBS@
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @SNDIO_LIBS@
|
||||
-else
|
||||
- libsox_la_LIBADD += @SNDIO_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_sndio_la_SOURCES = sndio.c
|
||||
libsox_fmt_sndio_la_LIBADD = libsox.la @SNDIO_LIBS@
|
||||
@@ -214,11 +157,7 @@ endif
|
||||
if HAVE_SUN_AUDIO
|
||||
if STATIC_SUN_AUDIO
|
||||
libsox_la_SOURCES += sunaudio.c
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @SUN_AUDIO_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @SUN_AUDIO_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_sunau_la_SOURCES = sunaudio.c
|
||||
libsox_fmt_sunau_la_LIBADD = libsox.la @SUN_AUDIO_LIBS@
|
||||
@@ -229,11 +168,7 @@ endif
|
||||
if HAVE_OGG_VORBIS
|
||||
if STATIC_OGG_VORBIS
|
||||
libsox_la_SOURCES += vorbis.c
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @OGG_VORBIS_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @OGG_VORBIS_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_vorbis_la_SOURCES = vorbis.c
|
||||
libsox_fmt_vorbis_la_LIBADD = libsox.la @OGG_VORBIS_LIBS@
|
||||
@@ -244,11 +179,7 @@ endif
|
||||
if HAVE_WAVPACK
|
||||
if STATIC_WAVPACK
|
||||
libsox_la_SOURCES += wavpack.c
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @WAVPACK_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @WAVPACK_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_wavpack_la_SOURCES = wavpack.c
|
||||
libsox_fmt_wavpack_la_LIBADD = libsox.la @WAVPACK_LIBS@
|
||||
@@ -261,11 +192,7 @@ if HAVE_SNDFILE
|
||||
if STATIC_SNDFILE
|
||||
libsox_la_SOURCES += sndfile.c caf.c mat4.c mat5.c paf.c fap.c w64.c xi.c pvf.c sd2.c
|
||||
libsox_la_CFLAGS += @SNDFILE_CFLAGS@
|
||||
-if STATIC_LIBSOX_ONLY
|
||||
- sox_LDADD += @SNDFILE_LIBS@
|
||||
-else
|
||||
libsox_la_LIBADD += @SNDFILE_LIBS@
|
||||
-endif
|
||||
else
|
||||
libsox_fmt_sndfile_la_SOURCES = sndfile.c
|
||||
libsox_fmt_sndfile_la_CFLAGS = @WARN_CFLAGS@ @SNDFILE_CFLAGS@
|
|
@ -0,0 +1,6 @@
|
|||
#include <sox.h>
|
||||
|
||||
int main(void) {
|
||||
sox_format_init();
|
||||
return(0);
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
# This file is part of mingw-cross-env.
|
||||
# See doc/index.html for further information.
|
||||
|
||||
# sox
|
||||
PKG := sox
|
||||
$(PKG)_IGNORE :=
|
||||
$(PKG)_VERSION := 14.3.2
|
||||
$(PKG)_CHECKSUM := ad462114ff47b094078f18148bc9e29e31b42b92
|
||||
$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
|
||||
$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz
|
||||
$(PKG)_WEBSITE := http://sox.sourceforge.net/
|
||||
$(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE)
|
||||
$(PKG)_DEPS := gcc libmad lame vorbis ffmpeg flac
|
||||
|
||||
define $(PKG)_UPDATE
|
||||
wget -q -O- 'http://sourceforge.net/projects/sox/files/sox/' | \
|
||||
$(SED) -n 's,.*/\([0-9][^"]*\)/".*,\1,p' | \
|
||||
head -1
|
||||
endef
|
||||
|
||||
define $(PKG)_BUILD
|
||||
# wine confuses the cross-compiling detection, so set it explicitly
|
||||
$(SED) -i 's,cross_compiling=no,cross_compiling=yes,' '$(1)/configure'
|
||||
cd '$(1)' && ./configure \
|
||||
--host='$(TARGET)' \
|
||||
--prefix='$(PREFIX)/$(TARGET)' \
|
||||
--disable-shared
|
||||
|
||||
$(MAKE) -C '$(1)' -j '$(JOBS)'
|
||||
$(MAKE) -C '$(1)' -j 1 install
|
||||
|
||||
'$(1)/libtool' --tag=CC --mode=link '$(TARGET)-gcc' -all-static \
|
||||
-W -Wall -Werror -ansi -pedantic \
|
||||
'$(2).c' -o '$(PREFIX)/$(TARGET)/bin/test-sox.exe' \
|
||||
-lsox
|
||||
endef
|
Loading…
Reference in New Issue