diff --git a/mingw-w64-libdca-svn/0001-Proper-use-of-destdir.all.patch b/mingw-w64-libdca-svn/0001-Proper-use-of-destdir.all.patch new file mode 100644 index 0000000000..28a42d6898 --- /dev/null +++ b/mingw-w64-libdca-svn/0001-Proper-use-of-destdir.all.patch @@ -0,0 +1,22 @@ +--- libdca-r91/src/Makefile.am.orig 2012-04-15 00:06:21 +0400 ++++ libdca-r91/src/Makefile.am 2012-04-15 00:09:50 +0400 +@@ -24,7 +24,7 @@ + for a in dcadec extract_dca; do \ + oldname=`echo "$$a" | sed -e 's/ca/ts/' | sed '$(transform)'` ; \ + name=`echo "$$a" | sed '$(transform)'` ; \ +- ln -sf "$(man1dir)/$${name}.1" "$(DESTDIR)$(man1dir)/$${oldname}.1" ; \ ++ ln -sf "$(DESTDIR)$(man1dir)/$${name}.1" "$(DESTDIR)$(man1dir)/$${oldname}.1" ; \ + done + + uninstall-hook: +--- libdca-r91/libdca/Makefile.am.orig 2012-04-15 00:06:21 +0400 ++++ libdca-r91/libdca/Makefile.am 2012-04-15 00:10:19 +0400 +@@ -14,7 +14,7 @@ + EXTRA_DIST = configure.incl + + install-exec-hook: +- ln -sf "libdca.a" "$(DESTDIR)$(libdir)/libdts.a" ++ ln -sf "$(DESTDIR)$(libdir)/libdca.a" "$(DESTDIR)$(libdir)/libdts.a" + + uninstall-hook: + unlink "$(DESTDIR)$(libdir)/libdts.a" diff --git a/mingw-w64-libdca-svn/0002-fix-bootstrap.mingw.patch b/mingw-w64-libdca-svn/0002-fix-bootstrap.mingw.patch new file mode 100644 index 0000000000..68b129e52d --- /dev/null +++ b/mingw-w64-libdca-svn/0002-fix-bootstrap.mingw.patch @@ -0,0 +1,12 @@ +--- libdca-svn-r91/bootstrap.orig 2013-07-31 06:48:34.804199200 +0000 ++++ libdca-svn-r91/bootstrap 2013-07-31 06:48:46.084131600 +0000 +@@ -14,9 +14,6 @@ + # The latest version of this script can be found at the following place: + # http://sam.zoy.org/autotools/ + +-# Die if an error occurs +-set -e +- + # Guess whether we are using configure.ac or configure.in + if test -f configure.ac; then + conffile="configure.ac" diff --git a/mingw-w64-libdca-svn/0003-fix-symlink.mingw.patch b/mingw-w64-libdca-svn/0003-fix-symlink.mingw.patch new file mode 100644 index 0000000000..9cb9f05bb4 --- /dev/null +++ b/mingw-w64-libdca-svn/0003-fix-symlink.mingw.patch @@ -0,0 +1,11 @@ +--- libdca-svn-r91/libdca/Makefile.am.orig 2013-07-31 06:50:29.308739400 +0000 ++++ libdca-svn-r91/libdca/Makefile.am 2013-07-31 06:55:38.104451500 +0000 +@@ -14,7 +14,7 @@ + EXTRA_DIST = configure.incl + + install-exec-hook: +- ln -sf "$(DESTDIR)$(libdir)/libdca.a" "$(DESTDIR)$(libdir)/libdts.a" ++ ln -sf "libdca.a" "$(DESTDIR)$(libdir)/libdts.a" + + uninstall-hook: + unlink "$(DESTDIR)$(libdir)/libdts.a" diff --git a/mingw-w64-libdca-svn/0004-fix-regex.all.patch b/mingw-w64-libdca-svn/0004-fix-regex.all.patch new file mode 100644 index 0000000000..e1af42d2b3 --- /dev/null +++ b/mingw-w64-libdca-svn/0004-fix-regex.all.patch @@ -0,0 +1,11 @@ +--- libdca-svn-r91/libdca/Makefile.am.orig 2014-05-04 00:58:18.652059800 +0000 ++++ libdca-svn-r91/libdca/Makefile.am 2014-05-04 01:00:00.568501600 +0000 +@@ -5,7 +5,7 @@ + libdca_la_SOURCES = dca_internal.h tables.h tables_quantization.h \ + tables_huffman.h tables_fir.h tables_adpcm.h tables_vq.h \ + bitstream.h bitstream.c parse.c downmix.c +-libdca_la_LDFLAGS = -no-undefined -version 0:0:0 -export-symbol-regex dca_.* ++libdca_la_LDFLAGS = -no-undefined -version 0:0:0 -export-symbol-regex '^dca_.*' + libdca_la_LIBADD = $(LIBDCA_LIBS) + + pkgconfigdir = $(libdir)/pkgconfig diff --git a/mingw-w64-libdca-svn/PKGBUILD b/mingw-w64-libdca-svn/PKGBUILD new file mode 100644 index 0000000000..4f1a05c898 --- /dev/null +++ b/mingw-w64-libdca-svn/PKGBUILD @@ -0,0 +1,63 @@ +# Maintainer: Alexey Pavlov + +_realname=libdca + +pkgname="${MINGW_PACKAGE_PREFIX}-${_realname}-svn" +pkgver=r91 +pkgrel=1 +pkgdesc="Free library for decoding DTS Coherent Acoustics streams (mingw-w64)" +provides=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-libdts") +replaces=("${MINGW_PACKAGE_PREFIX}-${_realname}" "${MINGW_PACKAGE_PREFIX}-libdts") +arch=('any') +url="http://www.videolan.org/developers/libdca.html" +license=("GPL") +makedepends=("${MINGW_PACKAGE_PREFIX}-gcc" "${MINGW_PACKAGE_PREFIX}-pkg-config" "subversion") +options=('strip' 'staticlibs') +source=("${_realname}"::"svn://svn.videolan.org/libdca/trunk" + 0001-Proper-use-of-destdir.all.patch + 0002-fix-bootstrap.mingw.patch + 0003-fix-symlink.mingw.patch + 0004-fix-regex.all.patch) +md5sums=('SKIP' + '168b6a93e0ad60af0c261b8ad7cbf1c3' + '74e72d3df921d187377e716b1852df42' + '724beececd673be8cfcfd53356d38e5d' + '5ca23f28028357bbe5569c821360fb7b') + +pkgver() { + cd "$srcdir/${_realname}" + local ver="$(svnversion)" + printf "r%s" "${ver//[[:alpha:]]}" +} + +prepare() { + cd "${srcdir}/${_realname}" + patch -p1 -i ${srcdir}/0001-Proper-use-of-destdir.all.patch + patch -p1 -i ${srcdir}/0002-fix-bootstrap.mingw.patch + patch -p1 -i ${srcdir}/0003-fix-symlink.mingw.patch + patch -p1 -i ${srcdir}/0004-fix-regex.all.patch + + autoreconf -fi +} + +build() { + mkdir -p "${srcdir}/build-${MINGW_CHOST}" + cd "${srcdir}/build-${MINGW_CHOST}" + ../${_realname}/configure \ + --prefix=${MINGW_PREFIX} \ + --build=${MINGW_CHOST} \ + --host=${MINGW_CHOST} \ + --enable-static \ + --enable-shared \ + --mandir=${MINGW_PREFIX}/share/man + make +} + +package() { + cd build-${MINGW_CHOST} + make DESTDIR="${pkgdir}" install + + rm -f "${pkgdir}${MINGW_PREFIX}/share/man/man1"/{extract_dts,dtsdec}.1 + cp "${pkgdir}${MINGW_PREFIX}/share/man/man1/dcadec.1" "${pkgdir}${MINGW_PREFIX}/share/man/man1/dtsdec.1" + cp "${pkgdir}${MINGW_PREFIX}/share/man/man1/extract_dca.1" "${pkgdir}${MINGW_PREFIX}/share/man/man1/extract_dts.1" +}