summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTimothy Gu <timothygu99@gmail.com>2015-06-19 03:21:09 (GMT)
committerTimothy Gu <timothygu99@gmail.com>2015-06-19 03:24:35 (GMT)
commit13bcb7732a22f6d4bc8091c212657d99c3e19db4 (patch)
tree9a7d0b9827dccfcdebed4c3957d358939d37fcb8
parentebe4b0ed598a02d1277dbb2554d71e0dde1a09b6 (diff)
downloadmxe-13bcb7732a22f6d4bc8091c212657d99c3e19db4.zip
mxe-13bcb7732a22f6d4bc8091c212657d99c3e19db4.tar.gz
mxe-13bcb7732a22f6d4bc8091c212657d99c3e19db4.tar.bz2
sox: Fix building
-rw-r--r--src/sox-1-fixes.patch58
-rw-r--r--src/sox.mk8
2 files changed, 4 insertions, 62 deletions
diff --git a/src/sox-1-fixes.patch b/src/sox-1-fixes.patch
deleted file mode 100644
index 2850e22..0000000
--- a/src/sox-1-fixes.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-This file is part of MXE.
-See index.html for further information.
-
-Contains ad hoc patches for cross building.
-
-From 72c87a290b580df8f5b40e6f07ecf135723bbdec Mon Sep 17 00:00:00 2001
-From: MXE
-Date: Sat, 25 May 2013 19:25:04 +1000
-Subject: [PATCH] cross build fixes
-
-
-diff --git a/configure b/configure
-index bfebd34..cb2d2b9 100755
---- a/configure
-+++ b/configure
-@@ -13240,7 +13240,7 @@ if ${ac_cv_lib_magic_magic_open+:} false; then :
- $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 @@ fi
- { $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/flac.c b/src/flac.c
-index eff2ae4..6cbd88d 100644
---- a/src/flac.c
-+++ b/src/flac.c
-@@ -55,7 +55,7 @@ typedef struct {
- } priv_t;
-
-
--#if defined(__MINGW32__)
-+#if defined(__MINGW32__) && !defined(__MINGW64_VERSION_MAJOR)
- /* Provide a local definition of ntohl so we don't need to load wsock32.dll. */
- unsigned long __stdcall ntohl(unsigned long val)
- {
-@@ -213,7 +213,7 @@ static size_t read_samples(sox_format_t * const ft, sox_sample_t * sampleBuffer,
- size_t prev_requested;
-
- if (p->seek_pending) {
-- p->seek_pending = sox_false;
-+ p->seek_pending = sox_false;
-
- /* discard leftover decoded data */
- free(p->leftover_buf);
---
-1.8.2.3
-
diff --git a/src/sox.mk b/src/sox.mk
index 7aff279..45aba6f 100644
--- a/src/sox.mk
+++ b/src/sox.mk
@@ -8,7 +8,7 @@ $(PKG)_CHECKSUM := f69f38f8a7ad6a88ecab3862d74db4edcd796695
$(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 file flac lame libgomp libmad libpng libsndfile libltdl opencore-amr twolame vorbis wavpack
+$(PKG)_DEPS := gcc file flac lame libgomp libmad libpng libsndfile libltdl opencore-amr opus twolame vorbis wavpack
define $(PKG)_UPDATE
$(WGET) -q -O- 'http://sourceforge.net/projects/sox/files/sox/' | \
@@ -22,7 +22,7 @@ define $(PKG)_BUILD
$(SED) -i '/Libs.private/d' '$(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'
+ $(SED) 's, sox_LDADD += ,,g' | tr -d '\n'` @LIBS@ >>'$(1)/sox.pc.in'
cd '$(1)' && ./configure \
--host='$(TARGET)' \
@@ -37,7 +37,6 @@ define $(PKG)_BUILD
--with-ladspa \
--with-amrwb \
--with-amrnb \
- --without-ffmpeg \
--with-flac \
--with-oggvorbis \
--with-sndfile \
@@ -53,7 +52,8 @@ define $(PKG)_BUILD
--without-oss \
--without-pulseaudio \
--without-sndio \
- --without-sunaudio
+ --without-sunaudio \
+ LIBS='-lshlwapi -lgnurx'
$(MAKE) -C '$(1)' -j '$(JOBS)' bin_PROGRAMS= EXTRA_PROGRAMS=
$(MAKE) -C '$(1)' -j 1 install