#Packager: Dimitris Tzemos pkgname=audacity pkgver=3.0.2 pkgrel=1dj source=("https://github.com/audacity/audacity/archive/Audacity-$pkgver/audacity-Audacity-$pkgver.tar.gz" "http://ponce.cc/slackware/sources/repo/wxwidgets-audacity-$pkgver.tar.xz" "http://ponce.cc/slackware/sources/repo/audacity-manual-$pkgver.zip" "audacity-ffmpeg.patch") docs=("LICENSE.txt" "README.txt" "todo.txt") url='http://audacity.sourceforge.net' doinst() { # update the mime desktop database if [ -x usr/bin/update-desktop-database ]; then usr/bin/update-desktop-database -q fi # update the mime database if [ -x usr/bin/update-mime-database ]; then usr/bin/update-mime-database usr/share/mime > /dev/null 2>&1 fi } slackdesc=\ ( #|-----handy-ruler------------------------------------------------------| "$pkgname (cross-platform sound editor)" "Audacity is a free, easy-to-use audio editor and recorder, which can" "be used to:" " * Record live audio." " * Convert tapes and records into digital recordings or CDs." " * Edit Ogg Vorbis, MP3, WAV or AIFF sound files." " * Cut, copy, splice or mix sounds together." " * Change the speed or pitch of a recording." " * And more! See the complete list of features" " (http://audacity.sourceforge.net/about/features)" ) build() { if [ -x /usr/bin/listplugins ]; then do_ladspa="on"; else do_ladspa="off"; fi if pkg-config --exists soundtouch; then do_soundtouch="system"; else do_soundtouch="off"; fi if pkg-config --exists twolame; then do_twolame="system"; else do_twolame="off"; fi if pkg-config --exists vamp-hostsdk; then do_vamp="system"; else do_vamp="off"; fi if $(pkg-config --exists lilv-0) && $(pkg-config --exists suil-0); then do_lv2="system"; else do_lv2="off"; fi cd $startdir/src/audacity-Audacity-$pkgver mkdir -p build/cmake-proxies/wxWidgets ( #cd build/cmake-proxies/wxWidgets #tar xvf $startdir/src/wxwidgets-audacity-$pkgver.tar.xz mv $startdir/src/wxwidgets build/cmake-proxies/wxWidgets || return 1 ) # fix vamp plugin search path on x86_64 - thanks to B. Watson sed -i "s,lib/vamp,lib$LIBDIRSUFFIX/vamp,g" \ lib-src/libvamp/src/vamp-hostsdk/PluginHostAdapter.cpp || true # fix building against ffmpeg-2.6.x, patch from archlinux patch -p1 < $startdir/src/audacity-ffmpeg.patch || exit 1 # add a missing include for gcc >= 11.x sed -i '/#include /a #include ' include/audacity/Types.h || return 1 mkdir -p build cd build cmake \ -DCMAKE_C_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_CXX_FLAGS:STRING="$SLKCFLAGS" \ -DCMAKE_INSTALL_PREFIX=/usr \ -DLIB_SUFFIX=${LIBDIRSUFFIX} \ -DMAN_INSTALL_DIR=/usr/man \ -Daudacity_use_sndfile=system \ -Daudacity_use_soxr=system \ -Daudacity_use_lame=system \ -Daudacity_use_twolame=$do_twolame \ -Daudacity_use_flac=system \ -Daudacity_use_ladspa=$do_ladspa \ -Daudacity_use_vorbis=system \ -Daudacity_use_id3tag=system \ -Daudacity_use_expat=system \ -Daudacity_use_soundtouch=$do_soundtouch \ -Daudacity_use_vamp=$do_vamp \ -Daudacity_use_lv2=$do_lv2 \ -Daudacity_use_midi=system \ -Daudacity_use_ogg=system \ -Daudacity_use_ffmpeg=loaded \ -Daudacity_use_sqlite=local \ -Daudacity_use_wxwidgets=local \ -Daudacity_use_portaudio=local \ -DCMAKE_BUILD_TYPE=Release .. || return 1 make -j $numjobs || return 1 make install DESTDIR=$startdir/pkg || return 1 install -vd $startdir/pkg/usr/share/icons/hicolor/48x48/apps || return 1 convert $startdir/pkg/usr/share/pixmaps/audacity.xpm -transparent white $startdir/pkg/usr/share/icons/hicolor/48x48/apps/audacity.png || return 1 sed -i "s/Icon=\/usr\/share\/audacity\/audacity.xpm/Icon=audacity/" $startdir/pkg/usr/share/applications/audacity.desktop || return 1 # Before changing the version just check the path inside of the zip: # the index file must be located to /usr/share/audacity/help/manual/index.html mkdir -p $startdir/pkg/usr/share/$pkgname || return 1 unzip $startdir/src/$pkgname-manual-$pkgver.zip -d $startdir/pkg/usr/share/$pkgname || return 1 }