From e447c58a7c810c26cfcdbd4812ce030412eb2c9e Mon Sep 17 00:00:00 2001 From: Ulrich Klauer Date: Sun, 10 Mar 2013 08:32:16 +0100 Subject: [PATCH 1/2] Enable most optional libraries for sox Enable most remaining optional libraries for package sox. Still disabled are file/magic (needs a patch), ffmpeg (doesn't compile, will be removed from next upstream version) and id3tag (not yet in MXE), as well as the audio drivers for platforms other than Windows. --- src/sox.mk | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/sox.mk b/src/sox.mk index 18ce693b..e81ae9e9 100644 --- a/src/sox.mk +++ b/src/sox.mk @@ -8,7 +8,7 @@ $(PKG)_CHECKSUM := 71f05afc51e3d9b03376b2f98fd452d3a274d595 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc flac lame libgomp libmad libsndfile twolame vorbis wavpack +$(PKG)_DEPS := gcc flac lame libgomp libmad libpng libsndfile libtool opencore-amr twolame vorbis wavpack define $(PKG)_UPDATE $(WGET) -q -O- 'http://sourceforge.net/projects/sox/files/sox/' | \ @@ -30,11 +30,12 @@ define $(PKG)_BUILD --disable-shared \ --enable-static \ --disable-debug \ + --with-libltdl \ --without-magic \ - --without-png \ - --without-ladspa \ - --without-amrwb \ - --without-amrnb \ + --with-png \ + --with-ladspa \ + --with-amrwb \ + --with-amrnb \ --without-ffmpeg \ --with-flac \ --with-oggvorbis \ From d51295150e83a6229644eadb1a405d68e0b0acf2 Mon Sep 17 00:00:00 2001 From: Ulrich Klauer Date: Sun, 10 Mar 2013 09:03:39 +0100 Subject: [PATCH 2/2] Enable use of optional libmagic for sox Make sox use libmagic (package "file") for file type detection. Requires two ugly hacks. --- src/sox-1-magic.patch | 24 ++++++++++++++++++++++++ src/sox.mk | 9 +++++---- 2 files changed, 29 insertions(+), 4 deletions(-) create mode 100644 src/sox-1-magic.patch diff --git a/src/sox-1-magic.patch b/src/sox-1-magic.patch new file mode 100644 index 00000000..47a52f9f --- /dev/null +++ b/src/sox-1-magic.patch @@ -0,0 +1,24 @@ +This file is part of MXE. +See index.html for further information. + +diff -urN sox-14.4.1.orig/configure sox-14.4.1/configure +--- sox-14.4.1.orig/configure 2013-02-02 03:02:52.000000000 +0100 ++++ sox-14.4.1/configure 2013-03-10 08:48:41.000000000 +0100 +@@ -13240,7 +13240,7 @@ + $as_echo_n "(cached) " >&6 + else + ac_check_lib_save_LIBS=$LIBS +-LIBS="-lmagic $LIBS" ++LIBS="-lmagic -lshlwapi -lgnurx $LIBS" + cat confdefs.h - <<_ACEOF >conftest.$ac_ext + /* end confdefs.h. */ + +@@ -13271,7 +13271,7 @@ + { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_magic_magic_open" >&5 + $as_echo "$ac_cv_lib_magic_magic_open" >&6; } + if test "x$ac_cv_lib_magic_magic_open" = xyes; then : +- MAGIC_LIBS="-lmagic" ++ MAGIC_LIBS="-lmagic -lshlwapi -lgnurx" + else + using_magic=no + fi diff --git a/src/sox.mk b/src/sox.mk index e81ae9e9..a482a7d9 100644 --- a/src/sox.mk +++ b/src/sox.mk @@ -8,7 +8,7 @@ $(PKG)_CHECKSUM := 71f05afc51e3d9b03376b2f98fd452d3a274d595 $(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION) $(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.gz $(PKG)_URL := http://$(SOURCEFORGE_MIRROR)/project/$(PKG)/$(PKG)/$($(PKG)_VERSION)/$($(PKG)_FILE) -$(PKG)_DEPS := gcc flac lame libgomp libmad libpng libsndfile libtool opencore-amr twolame vorbis wavpack +$(PKG)_DEPS := gcc file flac lame libgomp libmad libpng libsndfile libtool opencore-amr twolame vorbis wavpack define $(PKG)_UPDATE $(WGET) -q -O- 'http://sourceforge.net/projects/sox/files/sox/' | \ @@ -20,8 +20,9 @@ define $(PKG)_BUILD # set pkg-config cflags and libs $(SED) -i 's,^\(Cflags:.*\),\1 -fopenmp,' '$(1)/sox.pc.in' $(SED) -i '/Libs.private/d' '$(1)/sox.pc.in' - echo Libs.private: `grep sox_LDADD '$(1)/src/optional-fmts.am' | \ - $(SED) 's, sox_LDADD += ,,g' | tr -d '\n'` >>'$(1)/sox.pc.in' + echo Libs.private: @MAGIC_LIBS@ \ + `grep sox_LDADD '$(1)/src/optional-fmts.am' | \ + $(SED) 's, sox_LDADD += ,,g' | tr -d '\n'` >>'$(1)/sox.pc.in' cd '$(1)' && ./configure \ --host='$(TARGET)' \ @@ -31,7 +32,7 @@ define $(PKG)_BUILD --enable-static \ --disable-debug \ --with-libltdl \ - --without-magic \ + --with-magic \ --with-png \ --with-ladspa \ --with-amrwb \