mirror of
https://gitdl.cn/https://github.com/chakralinux/lib32.git
synced 2025-02-16 00:20:27 +08:00
54 lines
1.5 KiB
Bash
54 lines
1.5 KiB
Bash
_pkgbasename=libsndfile
|
|
pkgname=lib32-$_pkgbasename
|
|
pkgver=1.0.28
|
|
pkgrel=2
|
|
pkgdesc="A C library for reading and writing files containing sampled sound (32-bit)"
|
|
arch=('x86_64')
|
|
url="http://www.mega-nerd.com/libsndfile"
|
|
license=('LGPL')
|
|
depends=('lib32-alsa-lib' 'lib32-flac' 'lib32-libvorbis' $_pkgbasename=$pkgver)
|
|
checkdepends=('python2')
|
|
makedepends=('gcc')
|
|
source=(http://www.mega-nerd.com/libsndfile/files/${_pkgbasename}-${pkgver}.tar.gz{,.asc}
|
|
CVE-2017-8363.patch::https://github.com/erikd/libsndfile/commit/fd0484aba8e51d16af1e3a880f9b8b857b385eb3.patch)
|
|
md5sums=('646b5f98ce89ac60cdb060fcd398247c'
|
|
'SKIP'
|
|
'cdd75dee754a3f97a2b9852193858e8b')
|
|
validpgpkeys=(6A91A5CF22C24C99A35E013FCFDCF91FB242ACED)
|
|
|
|
|
|
prepare() {
|
|
cd ${_pkgbasename}-${pkgver}
|
|
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
|
|
|
|
patch -Np1 -i ${srcdir}/CVE-2017-8363.patch
|
|
}
|
|
|
|
build() {
|
|
export CC="gcc -m32"
|
|
export CXX="g++ -m32"
|
|
export PKG_CONFIG_PATH="/usr/lib32/pkgconfig"
|
|
|
|
cd ${_pkgbasename}-${pkgver}
|
|
|
|
export GETCONF="getconf -v POSIX_V7_ILP32_OFFBIG"
|
|
export GETCONF_DIR="/usr/lib32/getconf"
|
|
|
|
./configure --prefix=/usr --disable-sqlite --libdir=/usr/lib32
|
|
make -C src
|
|
}
|
|
|
|
check() {
|
|
cd ${_pkgbasename}-${pkgver}
|
|
make check
|
|
}
|
|
|
|
package() {
|
|
cd ${_pkgbasename}-${pkgver}
|
|
make -C src DESTDIR="${pkgdir}" install
|
|
make DESTDIR="$pkgdir" install-pkgconfigDATA
|
|
|
|
rm -rf "$pkgdir/usr/include"
|
|
}
|