initial import
This commit is contained in:
74
libsndfile/PKGBUILD
Normal file
74
libsndfile/PKGBUILD
Normal file
@@ -0,0 +1,74 @@
|
||||
# Maintainer: Jesus E. <heckyel@riseup.net>
|
||||
# Contribute: Márcio Silva <coadde@hyperbola.info>
|
||||
|
||||
pkgname=libsndfile
|
||||
pkgver=1.0.31
|
||||
_debver=1.0.31
|
||||
_debrel=1
|
||||
pkgrel=2
|
||||
pkgdesc="A C library for reading and writing files containing sampled audio data"
|
||||
arch=('i686' 'x86_64')
|
||||
url="https://libsndfile.github.io/libsndfile/"
|
||||
license=('LGPL-2.1')
|
||||
depends=('flac' 'glibc' 'libogg' 'libvorbis' 'opus' 'speex')
|
||||
makedepends=('alsa-lib' 'cmake' 'libsndio' 'python' 'sqlite' 'quilt')
|
||||
source=(https://github.com/${pkgname}/${pkgname}/releases/download/${pkgver}/${pkgname}-${pkgver}.tar.bz2{,.sig}
|
||||
https://deb.debian.org/debian/pool/main/libs/libsndfile/libsndfile_$_debver-$_debrel.debian.tar.xz
|
||||
sndio.patch)
|
||||
sha512sums=('62202092e5cac6346fd3c0a977380e9bf888fc59d08c9c9707dc254a8ef6ed6356da2ab0430bb970c7b06ba5bb1dafa5d7b0fe13898834c1fe4acb16f409f0e1'
|
||||
'SKIP'
|
||||
'253bce54391694671d724333cbbeba1ef22ce724557ff3f622014d33ca22dfd51e6b9d2248b75f025a2ed78def8f38ffbb53bd7ade6e8f2d3f1b7e3689a7c7a7'
|
||||
'051dfa1e1d6fdd3de0c2a847c8131aeb31fae5fe9705af13c3e52a3d7b7df50a8b5c8843c0f803486e254c734cc05ecef68bc01a4b5163be8a48dd33d86af1b5')
|
||||
validpgpkeys=('6A91A5CF22C24C99A35E013FCFDCF91FB242ACED' # Erik de Castro Lopo <erikd@mega-nerd.com>
|
||||
'9B1CFD2E92239C4B288E025F9D0D1F1CCB35FF8C' # evpobr evpobr@gmail.com
|
||||
'31D95CAB6D80D262244A1750A47620E801E47E95' # David Seifert soap@gentoo.org
|
||||
)
|
||||
|
||||
prepare() {
|
||||
cd "$pkgname-$pkgver"
|
||||
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
|
||||
# Debian patches
|
||||
export QUILT_PATCHES=debian/patches
|
||||
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
|
||||
export QUILT_DIFF_ARGS='--no-timestamps'
|
||||
|
||||
mv "$srcdir"/debian .
|
||||
|
||||
quilt push -av
|
||||
fi
|
||||
patch -p1 -i ../sndio.patch
|
||||
autoreconf -vfi
|
||||
}
|
||||
|
||||
build() {
|
||||
cd "$pkgname-$pkgver"
|
||||
# tests can only be built with static libs
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE='None' \
|
||||
-Wno-dev \
|
||||
-B build-test \
|
||||
-S .
|
||||
make VERBOSE=1 -C build-test
|
||||
|
||||
cmake -DCMAKE_INSTALL_PREFIX=/usr \
|
||||
-DCMAKE_BUILD_TYPE='None' \
|
||||
-DBUILD_SHARED_LIBS=ON \
|
||||
-Wno-dev \
|
||||
-B build \
|
||||
-S .
|
||||
make VERBOSE=1 -C build
|
||||
}
|
||||
|
||||
check() {
|
||||
cd "$pkgname-$pkgver"
|
||||
make test -C build-test
|
||||
}
|
||||
|
||||
package() {
|
||||
cd "$pkgname-$pkgver"
|
||||
make DESTDIR="$pkgdir" install -C build
|
||||
install -vDm 644 {AUTHORS,ChangeLog,NEWS,README} \
|
||||
-t "${pkgdir}/usr/share/doc/${pkgname}"
|
||||
install -vDm 644 COPYING \
|
||||
-t "${pkgdir}/usr/share/licenses/${pkgname}"
|
||||
}
|
||||
51
libsndfile/sndio.patch
Normal file
51
libsndfile/sndio.patch
Normal file
@@ -0,0 +1,51 @@
|
||||
diff --git a/configure.ac b/configure.ac
|
||||
index 78a79da..3892bd3 100644
|
||||
--- a/configure.ac
|
||||
+++ b/configure.ac
|
||||
@@ -491,7 +491,7 @@ dnl Check for OpenBSD's sndio.
|
||||
SNDIO_LIBS=""
|
||||
HAVE_SNDIO_H=0
|
||||
AS_CASE([$host_os],
|
||||
- [openbsd*], [
|
||||
+ [openbsd*|linux*], [
|
||||
AC_CHECK_HEADERS(sndio.h)
|
||||
AS_IF([test "x$ac_cv_header_sndio_h" = "xyes"], [
|
||||
SNDIO_LIBS="-lsndio"
|
||||
diff --git a/man/sndfile-play.1 b/man/sndfile-play.1
|
||||
index f36d131..3252889 100644
|
||||
--- a/man/sndfile-play.1
|
||||
+++ b/man/sndfile-play.1
|
||||
@@ -14,7 +14,7 @@ output APIs. The following table summarizes which audio API is used where:
|
||||
.Pp
|
||||
.Bl -tag -width MacOSX10XXX -compact
|
||||
.It Linux
|
||||
-ALSA or OSS
|
||||
+ALSA, OSS or sndio
|
||||
.It OpenBSD
|
||||
sndio
|
||||
.It FreeBSD
|
||||
diff --git a/programs/sndfile-play.c b/programs/sndfile-play.c
|
||||
index cd5cc27..be4eaef 100644
|
||||
--- a/programs/sndfile-play.c
|
||||
+++ b/programs/sndfile-play.c
|
||||
@@ -54,6 +54,10 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
+#if HAVE_SNDIO_H
|
||||
+ #include <sndio.h>
|
||||
+#endif
|
||||
+
|
||||
#if defined (__ANDROID__)
|
||||
|
||||
#elif defined (__linux__) || defined (__FreeBSD_kernel__) || defined (__FreeBSD__)
|
||||
@@ -61,9 +65,6 @@
|
||||
#include <sys/ioctl.h>
|
||||
#include <sys/soundcard.h>
|
||||
|
||||
-#elif HAVE_SNDIO_H
|
||||
- #include <sndio.h>
|
||||
-
|
||||
#elif (defined (sun) && defined (unix))
|
||||
#include <fcntl.h>
|
||||
#include <sys/ioctl.h>
|
||||
Reference in New Issue
Block a user