summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 26f939b44e369b968d94710bbfc515bfc22cd9f3 (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
# Contributor: Tony Lambiris <tony@libpcap.net>

_basename=wineasio
pkgname=${_basename}-git
pkgver=r99
pkgrel=1

pkgdesc="ASIO driver implementation for Wine"
url="https://github.com/wineasio/wineasio"
arch=('i686' 'x86_64' 'x86_64_v3')
license=('LGPL')

depends=('wine' 'jack')
depends_x86_64+=('lib32-jack')
makedepends_x86_64=('gcc-multilib')
provides=('wineasio')
conflicts=('wineasio')

source=(
  "git+https://github.com/wineasio/wineasio.git"
  "git+https://github.com/falkTX/rtaudio.git"
)
sha256sums=('SKIP' 'SKIP')
install="$pkgname".install

pkgver() {
  cd "$srcdir/${_basename}"
  git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

prepare() {
  cd "${_basename}"
  git submodule init
  git config submodule.rtaudio.url $srcdir/rtaudio
  git submodule update
}

build() {
  cd "${_basename}"
  
  if [[ "$CARCH" == 'x86_64' ]] || [[ "$CARCH" == 'x86_64_v3' ]]; then
    make 64
    cd build64
    winebuild -m64 --dll --fake-module -E ../wineasio.dll.spec asio.c.o main.c.o regsvr.c.o > wineasio.dll
    cd ..
  fi

  make 32
  cd build32
  winebuild -m32 --dll --fake-module -E ../wineasio.dll.spec asio.c.o main.c.o regsvr.c.o > wineasio.dll
}

package() {
  cd "${_basename}"
  if [[ "$CARCH" == 'x86_64' ]] || [[ "$CARCH" == 'x86_64_v3' ]]; then
    install -D -m755 build64/wineasio.dll "$pkgdir"/usr/lib/wine/x86_64-windows/wineasio.dll
    install -D -m755 build64/wineasio.dll.so "$pkgdir"/usr/lib/wine/x86_64-unix/wineasio.dll.so
  fi
  install -D -m755 build32/wineasio.dll "$pkgdir"/usr/lib32/wine/i386-windows/wineasio.dll
  install -D -m755 build32/wineasio.dll.so "$pkgdir"/usr/lib32/wine/i386-unix/wineasio.dll.so
}