summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 071277a6224c5b64b6717b48c8da469061b126d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# Maintainer: evorster <evorster@gmail.com>
# Contributor: osch <oliver@luced.de>

pkgname=audacity-qt-git
pkgver=3.4.0.0.r17467
pkgrel=1
pkgdesc="Record and edit audio files - Built with package versions as recommended by Audacity team"
arch=('x86_64')
url="https://audacityteam.org"
license=('GPL2' 'CCPL')
groups=('pro-audio')
depends=('gtk3' 'gtk2' 'ffmpeg' 'portmidi' 'python' 'vst3sdk'
'portaudio' 'jack')
makedepends=('cmake' 'autoconf' 'automake' 'libtool' 'git' 'conan' 'catch2')
provides=(
    audacity
    ladspa-host
    lv2-host
    vamp-host
    vst-host
    vst3-host
    )
conflicts=("audacity")
#
source=("git+https://github.com/audacity/audacity.git#branch=qt")
## Comment out the source variable above and uncomment the one below for the last version where the calf plugins work properly
# There is some sort of regression in later versions. Once it's sorted I'll remove this comment.
#source=("git+https://github.com/audacity/audacity.git#branch=release-3.1.3")
#
sha512sums=('SKIP')

pkgver() {
  cd ${srcdir}/audacity
   VERSION=$(grep AUDACITY_VERSION CMakeLists.txt | head -n 1 | cut -d " " -f3)
   RELEASE=$(grep AUDACITY_RELEASE CMakeLists.txt | head -n 1 | cut -d " " -f3)
   REVISION=$(grep AUDACITY_REVISION CMakeLists.txt | head -n 1 | cut -d " " -f3)
   MODLEVEL=$(grep AUDACITY_MODLEVEL CMakeLists.txt | head -n 1 | cut -d " " -f3)
   _ver=$VERSION.$RELEASE.$REVISION.$MODLEVEL
  echo "$(echo ${_ver}).r$(git rev-list --count HEAD)"
}

prepare() {
  export CC=gcc
  export VST3_SDK_DIR='/usr/src/vst3sdk'

  mkdir -p build
  cd build

  depsDir=$(readlink -f ./.offline)
## To set a custom download directory for Conan2 still seems a bit of a mystery to me.
  export CONAN_USER_HOME="$depsDir/conan"
#  conan config home
#  conan config init
#  conan config set storage.download_cache="$CONAN_USER_HOME/download_cache"
#Let's not remove it every time, it's a pain building them.
#  conan remove "*" --src --builds --force

  cmake -G "Unix Makefiles" ../audacity \
        -DCMAKE_BUILD_TYPE=Release \
        -DCMAKE_INSTALL_PREFIX=/usr \
        -Daudacity_use_ffmpeg=loaded \
	-Daudacity_use_vst3sdk=system
#        -Daudacity_has_vst3=Off \
#        -DAUDACITY_BUILD_LEVEL=2 \
#        -Daudacity_has_networking=off \
#        -Daudacity_lib_preference=system local \
#        -Daudacity_use_expat=system \
#        -Daudacity_use_zlib=system \
#        -Daudacity_use_curl=system \
#        -Daudacity_use_portmidi=local \
#        -Daudacity_use_wxwidgets=local \

}

build() {
cd build
  make
#Let's not remove the conan stuff every time, rebuilding's a pain.
#  conan remove "*" --src --builds --force
}

package() {
make -C build DESTDIR="${pkgdir}" install
}