### this file is sourced not run
PKGVER=1.23.1
PKGBUILD=1
PKGARCH=x86_64

# Note: requireq CMAKE to build
TARBALL=openal-soft-$PKGVER.tar.bz2
MD5SUM=58a73698288d2787451b61f8f4431513
SRC_URL=https://openal-soft.org/openal-releases/$TARBALL
BUNDLE=

SLACKREQ='qt5-common libSDL2'
SLACKDESC="openal-base: openal-base $PKGVER (OpenAL 3D Audio library)
openal-base: 
openal-base: OpenAL Soft is an LGPL-licensed, cross-platform, software 
openal-base: implementation of the OpenAL 3D audio API. OpenAL provides 
openal-base: capabilities for playing audio in a virtual 3D environment. Distance 
openal-base: attenuation, doppler shift, and directional sound emitters are among 
openal-base: the features handled by the API. More advanced effects, including air 
openal-base: absorption, occlusion, and environmental reverb, are available 
openal-base: through the EFX extension. It also facilitates streaming audio, 
openal-base: multi-channel buffers, and audio capture.
openal-base: https://openal-soft.org/
"

### default pkg_download
### default pkg_prepare
### default pkg_package
### build
pkg_build() {
    cd /tmp/openal*

	# qt5	
	export PATH="$PATH:/opt/qt5/bin"
	export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/opt/qt5/$LIBDIR"
	export PKG_CONFIG_PATH="$PKG_CONFIG_PATH:/opt/qt5/$LIBDIR/pkgconfig"
	export QT5_PATH="/opt/qt5/bin"
	export QT5_LD_LIBRARY_PATH="/opt/qt5/$LIBDIR"
	export QT5_PKG_CONFIG_PATH="/opt/qt5/$LIBDIR/pkgconfig"
	export QT5_CPLUS_INCLUDE_PATH="/opt/qt5/include" 
    
    rm -r build
    CMAKEFLAGS="$CMAKEFLAGS -DLIB_SUFFIX=64"
	pkg_build_cmake && pkg_build_slackdesc &&
	install -dm755 /etc/openal &&
	install -m644 ../alsoftrc.sample /etc/openal/alsoft.conf
}


