From 471928ffa01d0fbfd8bd93bb385638f84f477edb Mon Sep 17 00:00:00 2001 From: Alexey Pavlov Date: Wed, 10 Feb 2016 09:45:22 +0300 Subject: [PATCH] libsndfile: Update to 1.0.26 --- ...t-and-foolproof-autogen-fallback.all.patch | 54 +++++++++---------- .../0002-conditional-truncate.mingw.patch | 34 ------------ .../0003-fix-source-searches.mingw.patch | 10 ++-- .../0004-fix-linking-external-libs.patch | 11 ---- mingw-w64-libsndfile/PKGBUILD | 24 ++++----- 5 files changed, 44 insertions(+), 89 deletions(-) delete mode 100644 mingw-w64-libsndfile/0002-conditional-truncate.mingw.patch delete mode 100644 mingw-w64-libsndfile/0004-fix-linking-external-libs.patch diff --git a/mingw-w64-libsndfile/0001-more-elegant-and-foolproof-autogen-fallback.all.patch b/mingw-w64-libsndfile/0001-more-elegant-and-foolproof-autogen-fallback.all.patch index df7cdbfa76..603db8f14d 100644 --- a/mingw-w64-libsndfile/0001-more-elegant-and-foolproof-autogen-fallback.all.patch +++ b/mingw-w64-libsndfile/0001-more-elegant-and-foolproof-autogen-fallback.all.patch @@ -14,57 +14,57 @@ #==================================================================================== # Settings for the HTML documentation. ---- libsndfile-1.0.25/src/Makefile.am.orig 2012-09-15 09:59:44 +0400 -+++ libsndfile-1.0.25/src/Makefile.am 2012-09-15 10:08:56 +0400 -@@ -78,7 +78,7 @@ +--- libsndfile-1.0.26/src/Makefile.am.orig 2012-09-15 09:59:44 +0400 ++++ libsndfile-1.0.26/src/Makefile.am 2012-09-15 10:08:56 +0400 +@@ -82,7 +82,7 @@ G72x_g72x_test_LDADD = G72x/libg72x.la test_endswap.c: test_endswap.def test_endswap.tpl -- autogen --writable test_endswap.def -+ @AUTOGEN@ test_endswap.def +- cd $(srcdir) && autogen --writable test_endswap.def && cd $(abs_builddir) ++ cd $(srcdir) && @AUTOGEN@ test_endswap.def && cd $(abs_builddir) - genfiles : test_endswap.c $(SYMBOL_FILES) + genfiles : $(SYMBOL_FILES) test_endswap.c ---- libsndfile-1.0.25/tests/Makefile.am.orig 2012-09-15 09:59:41 +0400 -+++ libsndfile-1.0.25/tests/Makefile.am 2012-09-15 10:09:37 +0400 -@@ -179,31 +179,31 @@ +--- libsndfile-1.0.26/tests/Makefile.am.orig 2012-09-15 09:59:41 +0400 ++++ libsndfile-1.0.26/tests/Makefile.am 2012-09-15 10:09:37 +0400 +@@ -189,31 +189,31 @@ #=============================================================================== write_read_test.c: write_read_test.def write_read_test.tpl -- autogen --writable write_read_test.def -+ @AUTOGEN@ write_read_test.def +- cd $(srcdir) && autogen --writable write_read_test.def && cd $(abs_builddir) ++ cd $(srcdir) && @AUTOGEN@ write_read_test.def && cd $(abs_builddir) pcm_test.c: pcm_test.def pcm_test.tpl -- autogen --writable pcm_test.def -+ @AUTOGEN@ pcm_test.def +- cd $(srcdir) && autogen --writable pcm_test.def && cd $(abs_builddir) ++ cd $(srcdir) && @AUTOGEN@ pcm_test.def && cd $(abs_builddir) header_test.c: header_test.def header_test.tpl -- autogen --writable header_test.def -+ @AUTOGEN@ header_test.def +- cd $(srcdir) && autogen --writable header_test.def && cd $(abs_builddir) ++ cd $(srcdir) && @AUTOGEN@ header_test.def && cd $(abs_builddir) utils.c utils.h : utils.def utils.tpl -- autogen --writable utils.def -+ @AUTOGEN@ utils.def +- cd $(srcdir) && autogen --writable utils.def && cd $(abs_builddir) ++ cd $(srcdir) && @AUTOGEN@ utils.def && cd $(abs_builddir) scale_clip_test.c: scale_clip_test.def scale_clip_test.tpl -- autogen --writable scale_clip_test.def -+ @AUTOGEN@ scale_clip_test.def +- cd $(srcdir) && autogen --writable scale_clip_test.def && cd $(abs_builddir) ++ cd $(srcdir) && @AUTOGEN@ scale_clip_test.def && cd $(abs_builddir) pipe_test.c: pipe_test.def pipe_test.tpl -- autogen --writable pipe_test.def -+ @AUTOGEN@ pipe_test.def +- cd $(srcdir) && autogen --writable pipe_test.def && cd $(abs_builddir) ++ cd $(srcdir) && @AUTOGEN@ pipe_test.def && cd $(abs_builddir) rdwr_test.c: rdwr_test.def rdwr_test.tpl -- autogen --writable rdwr_test.def -+ @AUTOGEN@ rdwr_test.def +- cd $(srcdir) && autogen --writable rdwr_test.def && cd $(abs_builddir) ++ cd $(srcdir) && @AUTOGEN@ rdwr_test.def && cd $(abs_builddir) floating_point_test.c: floating_point_test.def floating_point_test.tpl -- autogen --writable floating_point_test.def -+ @AUTOGEN@ floating_point_test.def +- cd $(srcdir) && autogen --writable floating_point_test.def && cd $(abs_builddir) ++ cd $(srcdir) && @AUTOGEN@ floating_point_test.def benchmark.c: benchmark.def benchmark.tpl -- autogen --writable benchmark.def -+ @AUTOGEN@ benchmark.def +- cd $(srcdir) && autogen --writable benchmark.def && cd $(abs_builddir) ++ cd $(srcdir) && @AUTOGEN@ benchmark.def && cd $(abs_builddir) genfiles : write_read_test.c pcm_test.c header_test.c utils.c \ scale_clip_test.c pipe_test.c floating_point_test.c rdwr_test.c \ diff --git a/mingw-w64-libsndfile/0002-conditional-truncate.mingw.patch b/mingw-w64-libsndfile/0002-conditional-truncate.mingw.patch deleted file mode 100644 index a5d5be886d..0000000000 --- a/mingw-w64-libsndfile/0002-conditional-truncate.mingw.patch +++ /dev/null @@ -1,34 +0,0 @@ ---- libsndfile-1.0.25/configure.ac.orig 2013-04-07 23:17:05 +0400 -+++ libsndfile-1.0.25/configure.ac 2013-04-07 23:43:49 +0400 -@@ -266,7 +266,7 @@ - # Check for functions. - - AC_CHECK_FUNCS(malloc calloc realloc free) --AC_CHECK_FUNCS(open read write lseek pread pwrite) -+AC_CHECK_FUNCS(open read write lseek pread pwrite truncate) - AC_CHECK_FUNCS(fstat ftruncate fsync) - AC_CHECK_FUNCS(snprintf vsnprintf) - AC_CHECK_FUNCS(gmtime gmtime_r localtime localtime_r gettimeofday) ---- libsndfile-1.0.25/tests/write_read_test.c.orig 2013-04-07 23:17:05 +0400 -+++ libsndfile-1.0.25/tests/write_read_test.c 2013-04-07 23:45:20 +0400 -@@ -28,7 +28,7 @@ - - #include - --#if (defined (WIN32) || defined (_WIN32)) -+#include -+#ifndef HAVE_TRUNCATE --#include - static int truncate (const char *filename, int ignored) ; - #endif ---- libsndfile-1.0.25/tests/write_read_test.c.orig 2013-04-08 00:02:01 +0400 -+++ libsndfile-1.0.25/tests/write_read_test.c 2013-04-08 00:03:11 +0400 -@@ -3609,7 +3609,7 @@ - fclose (file) ; - } /* create_short_file */ - --#if (defined (WIN32) || defined (__WIN32)) -+#ifndef HAVE_TRUNCATE - - /* Win32 does not have truncate (nor does it have the POSIX function ftruncate). - ** Hack somethng up here to over come this. This function can only truncate to a diff --git a/mingw-w64-libsndfile/0003-fix-source-searches.mingw.patch b/mingw-w64-libsndfile/0003-fix-source-searches.mingw.patch index bdb317ca77..e6b002478c 100644 --- a/mingw-w64-libsndfile/0003-fix-source-searches.mingw.patch +++ b/mingw-w64-libsndfile/0003-fix-source-searches.mingw.patch @@ -1,13 +1,13 @@ ---- libsndfile-1.0.25/configure.ac.orig 2013-04-08 00:08:06 +0400 -+++ libsndfile-1.0.25/configure.ac 2013-04-08 00:08:00 +0400 -@@ -629,6 +629,7 @@ +--- libsndfile-1.0.26/configure.ac.orig 2013-04-08 00:08:06 +0400 ++++ libsndfile-1.0.6/configure.ac 2013-04-08 00:08:00 +0400 +@@ -651,6 +651,7 @@ M4/Makefile doc/Makefile Win32/Makefile Octave/Makefile programs/Makefile \ Makefile \ src/version-metadata.rc tests/test_wrapper.sh tests/pedantic-header-test.sh \ + tests/win32_ordinal_test.c \ - doc/libsndfile.css build-test-tarball.mk libsndfile.spec sndfile.pc \ + doc/libsndfile.css Scripts/build-test-tarball.mk libsndfile.spec sndfile.pc \ src/sndfile.h \ - ]) + echo-install-dirs --- /dev/null 2013-04-08 00:11:18 +0400 +++ libsndfile-1.0.25/tests/win32_ordinal_test.c.in 2013-04-08 00:06:17 +0400 @@ -0,0 +1,147 @@ diff --git a/mingw-w64-libsndfile/0004-fix-linking-external-libs.patch b/mingw-w64-libsndfile/0004-fix-linking-external-libs.patch deleted file mode 100644 index 67e7264cc5..0000000000 --- a/mingw-w64-libsndfile/0004-fix-linking-external-libs.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- libsndfile-1.0.25/configure.ac.orig 2014-04-21 07:35:07.656800000 +0400 -+++ libsndfile-1.0.25/configure.ac 2014-04-21 07:35:43.256000000 +0400 -@@ -335,7 +335,7 @@ - enable_external_libs=yes - - EXTERNAL_CFLAGS="$FLAC_CFLAGS $OGG_CFLAGS $VORBISENC_CFLAGS $SPEEX_CFLAGS" -- EXTERNAL_LIBS="$FLAC_LIBS $VORBISENC_LIBS $SPEEX_LIBS" -+ EXTERNAL_LIBS="$FLAC_LIBS $OGG_LIBS $VORBIS_LIBS $VORBISENC_LIBS $SPEEX_LIBS" - else - echo - AC_MSG_WARN([[*** One or more of the external libraries (ie libflac, libogg and]]) diff --git a/mingw-w64-libsndfile/PKGBUILD b/mingw-w64-libsndfile/PKGBUILD index 5240b3d434..518c06563a 100644 --- a/mingw-w64-libsndfile/PKGBUILD +++ b/mingw-w64-libsndfile/PKGBUILD @@ -1,9 +1,10 @@ # Maintainer: Alexey Pavlov _realname=libsndfile +pkgbase=mingw-w64-${_realname} pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}") -pkgver=1.0.25 -pkgrel=3 +pkgver=1.0.26 +pkgrel=1 pkgdesc="A C library for reading and writing files containing sampled sound (mingw-w64)" arch=('any') url="http://www.mega-nerd.com/libsndfile" @@ -13,21 +14,15 @@ depends=("${MINGW_PACKAGE_PREFIX}-flac" "${MINGW_PACKAGE_PREFIX}-libvorbis" "${M options=('staticlibs' 'strip') source=(http://www.mega-nerd.com/libsndfile/files/${_realname}-${pkgver}.tar.gz 0001-more-elegant-and-foolproof-autogen-fallback.all.patch - 0002-conditional-truncate.mingw.patch - 0003-fix-source-searches.mingw.patch - 0004-fix-linking-external-libs.patch) -md5sums=('e2b7bb637e01022c7d20f95f9c3990a2' - '9b4254acf1cfc17a1e94af29f7260d30' - 'c9ac8330da543496b0b5cb6ae081a7b6' - 'f225019fdc006262cae9bb0ca91bc446' - '4417bf29cc527d9d9e0ac2e42a5695a0') + 0003-fix-source-searches.mingw.patch) +md5sums=('ec810a0c60c08772a8a5552704b63393' + '03200ddd8672ea8c80c110174a692519' + '067dc620fb097ff40d15759a3e7c3fa0') prepare() { cd ${srcdir}/${_realname}-${pkgver} patch -p1 -i ${srcdir}/0001-more-elegant-and-foolproof-autogen-fallback.all.patch - patch -p1 -i ${srcdir}/0002-conditional-truncate.mingw.patch patch -p1 -i ${srcdir}/0003-fix-source-searches.mingw.patch - patch -p1 -i ${srcdir}/0004-fix-linking-external-libs.patch #sed -i 's|#!/usr/bin/python|#!/usr/bin/python2|' src/binheader_writef_check.py \ # src/create_symbols_file.py programs/test-sndfile-metadata-set.py @@ -55,4 +50,9 @@ build() { package() { cd ${srcdir}/build-${MINGW_CHOST} make DESTDIR="${pkgdir}" install + + local WINPREFIX=$(cygpath -wm ${MINGW_PREFIX}) + # Fix paths + sed -i "s|${WINPREFIX}|${MINGW_PREFIX}|g" \ + ${pkgdir}${MINGW_PREFIX}/lib/pkgconfig/sndfile.pc }