SUMMARY="C library for reading and writing of sampled sound" DESCRIPTION="libsndfile is a library of C routines for reading and writing \ files containing sampled audio data." HOMEPAGE="http://www.mega-nerd.com/libsndfile" COPYRIGHT="1999-2011 Erik de Castro Lopo" LICENSE="GNU LGPL v2.1" REVISION="1" SOURCE_URI="http://www.mega-nerd.com/libsndfile/files/libsndfile-$portVersion.tar.gz" CHECKSUM_SHA256="cd6520ec763d1a45573885ecb1f8e4e42505ac12180268482a44b28484a25092" PATCHES="libsndfile-$portVersion.patchset" ARCHITECTURES="x86_gcc2 x86 x86_64" SECONDARY_ARCHITECTURES="x86_gcc2 x86" PROVIDES=" libsndfile$secondaryArchSuffix = $portVersion compat >= 1 cmd:sndfile_cmp$secondaryArchSuffix cmd:sndfile_concat$secondaryArchSuffix cmd:sndfile_convert$secondaryArchSuffix cmd:sndfile_deinterleave$secondaryArchSuffix cmd:sndfile_info$secondaryArchSuffix cmd:sndfile_interleave$secondaryArchSuffix cmd:sndfile_metadata_get$secondaryArchSuffix cmd:sndfile_metadata_set$secondaryArchSuffix cmd:sndfile_play$secondaryArchSuffix cmd:sndfile_regtest$secondaryArchSuffix cmd:sndfile_salvage$secondaryArchSuffix lib:libsndfile$secondaryArchSuffix = $portVersion compat >= 1 " REQUIRES=" haiku$secondaryArchSuffix lib:libflac$secondaryArchSuffix lib:libogg$secondaryArchSuffix lib:libvorbis$secondaryArchSuffix " PROVIDES_devel=" libsndfile${secondaryArchSuffix}_devel = $portVersion compat >= 1 devel:libsndfile$secondaryArchSuffix = $portVersion compat >= 1 " REQUIRES_devel=" libsndfile$secondaryArchSuffix == $portVersion base devel:libflac$secondaryArchSuffix devel:libvorbis$secondaryArchSuffix " BUILD_REQUIRES=" haiku${secondaryArchSuffix}_devel devel:libflac$secondaryArchSuffix devel:libogg$secondaryArchSuffix devel:libvorbis$secondaryArchSuffix # libsndfile requires flac 1.3.1 but the soname is the same as 1.3.0... flac${secondaryArchSuffix}_devel >= 1.3.1 " BUILD_PREREQUIRES=" cmd:aclocal cmd:autoconf cmd:automake cmd:find cmd:gcc$secondaryArchSuffix cmd:ld$secondaryArchSuffix cmd:libtoolize cmd:make cmd:pkg_config$secondaryArchSuffix " BUILD() { libtoolize --force --copy --install aclocal -I M4 autoconf automake if [ $effectiveTargetArchitecture = x86_gcc2 ]; then export CFLAGS=-O1 fi runConfigure ./configure make $jobArgs } INSTALL() { make install # remove libtool library files rm $libDir/libsndfile.la prepareInstalledDevelLibs libsndfile fixPkgconfig # The pkgconfig files reference other libraries using the wrong paths, which # creates a lot of confusion. Fix them so correct paths are used. local develPackageName="${portName}_devel-$portFullVersion" local packageLinksDir=$(dirname $portPackageLinksDir) local linksDir="$packageLinksDir/${develPackageName}/devel~libflac$secondaryArchSuffix/$relativeDevelopLibDir" sed -i -e "s,^\(Libs.private.*\)-L.* \(-lFLAC.*\)$,\1-L$linksDir \2," \ $developLibDir/pkgconfig/sndfile.pc linksDir="$packageLinksDir/${develPackageName}/devel~libvorbis$secondaryArchSuffix/$relativeDevelopLibDir" sed -i -e "s,^\(Libs.private.* -lFLAC .*\) -L.* \(-lvorbis.*\)$,\1-L$linksDir \2," \ $developLibDir/pkgconfig/sndfile.pc # devel package packageEntries devel \ $developDir }