Add opus package.

This commit is contained in:
Alexpux
2014-01-11 01:27:33 +04:00
parent 45f831c900
commit b0bf50e11c
2 changed files with 59 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
--- opus-1.1-beta/configure.ac.orig 2013-07-31 06:27:54.930255200 +0000
+++ opus-1.1-beta/configure.ac 2013-07-31 06:28:56.746104800 +0000
@@ -99,9 +99,9 @@
AS_IF([test "$has_var_arrays" = "no"],
[
- AC_CHECK_HEADERS([alloca.h])
+ AC_CHECK_HEADERS([malloc.h])
AC_MSG_CHECKING(for alloca)
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <alloca.h>]],
+ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <malloc.h>]],
[[int foo=10; int *array = alloca(foo);]])],
[ use_alloca=yes;
AC_DEFINE([USE_ALLOCA], [], [Make use of alloca])

45
mingw-w64-opus/PKGBUILD Normal file
View File

@@ -0,0 +1,45 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
_realname=opus
_mingw_suff=mingw-w64-${CARCH}
pkgname="${_mingw_suff}-${_realname}"
pkgver=1.1
pkgrel=1
pkgdesc="Codec designed for interactive speech and audio transmission over the Internet (mingw-w64)"
arch=('any')
url="http://www.opus-codec.org/"
license=("BSD")
makedepends=("${_mingw_suff}-gcc" "${_mingw_suff}-pkg-config")
depends=("${_mingw_suff}-gcc")
options=('strip' 'staticlibs')
source=("http://downloads.us.xiph.org/releases/${_realname}/${_realname}-${pkgver}.tar.gz"
0001-correctly-detect-alloca.mingw.patch)
md5sums=('c5a8cf7c0b066759542bc4ca46817ac6'
'006d3e2769d82904837b95abc20d196a')
prepare() {
cd "${srcdir}/${_realname}-${pkgver}"
patch -p1 -i "${srcdir}/0001-correctly-detect-alloca.mingw.patch"
autoreconf -fi
}
build() {
mkdir -p "${srcdir}/build-${MINGW_CHOST}"
cd "${srcdir}/build-${MINGW_CHOST}"
../${_realname}-${pkgver}/configure \
--prefix=${MINGW_PREFIX} \
--build=${MINGW_CHOST} \
--host=${MINGW_CHOST} \
--target=${MINGW_CHOST} \
--enable-custom-modes \
--disable-static
make
}
package() {
cd "${srcdir}/build-${MINGW_CHOST}"
make DESTDIR="${pkgdir}" install
# Install license
#install -m644 ${srcdir}/${_realname}-${pkgver}/COPYING ${pkgdir}${MINGW_PREFIX}/share/licenses/${_realname}/LICENSE
}