File PKGBUILD of Package pocketsphinx
# Maintainer: Mladen Milinkovic <maxrd2@smoothware.net>
# Contributor: Marco Pompili <aur AT emarcs DOT org>
# Contributor: Ben Duffield <bavardage AT archlinux.us>
# Contributor: Martchus <martchus@gmx.net>
_gitname=pocketsphinx
_tar=pocketsphinx-5prealpha.1655.e1bd6621
pkgname=${_gitname}-git
pkgver=5prealpha.1655.e1bd6621
pkgrel=1
pkgdesc='Lightweight speech recognition engine, specifically tuned for handheld and mobile devices, though it works equally well on the desktop.'
arch=('i686' 'x86_64')
url='https://cmusphinx.github.io/'
license=('BSD')
conflicts=("${_gitname}" "sphinxbase")
provides=("${_gitname}" "sphinxbase")
makedepends=('cmake' 'swig' 'gst-plugins-base-libs')
optdepends=('gst-plugins-base-libs: gstreamer plugin')
source=("${_tar}.tar.xz"
'0001-Fixed-pkg-config-paths-and-version.patch'
'0002-Fix-missing-sphinxbase-include.patch'
'0003-Compile-with-PIC.patch'
'0004-Added-debug-symbols-to-static-library.patch')
sha256sums=('0acc2422d6cc797b0d6c9063e260b06096cda3d7932ac4ebe925db21ad8258dc'
'275440508ae50d431b37f9fda42762ea5df8c29b7ba49204351a96b9820a2ba7'
'5748224e6ce884c0d46b1edc5a776d9e5fe576748c341600dd2bbfbf9839a06d'
'f97387044f0565d20ca6ccf2b6e5d3b53b64912774787b9d82af66046483fa8c'
'd5b4947558abc48bba3660a8ae02abb4ed0d485d09f7eebb2607fab8bba09226')
options=(!strip staticlibs) # '!libtool'
prepare() {
patch -Np1 -d "${srcdir}/${_gitname}" -i ../0001-Fixed-pkg-config-paths-and-version.patch
patch -Np1 -d "${srcdir}/${_gitname}" -i ../0002-Fix-missing-sphinxbase-include.patch
patch -Np1 -d "${srcdir}/${_gitname}" -i ../0003-Compile-with-PIC.patch
}
build() {
cmake -S "${srcdir}/${_gitname}" -B "${srcdir}/build" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=/usr \
-DBUILD_SHARED_LIBS=OFF
cmake --build "${srcdir}/build" --verbose -j$(nproc)
}
package() {
DESTDIR="${pkgdir}" cmake --install "${srcdir}/build"
}