summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 83bd834c4666e379f9348ddebf75ab84f2514092 (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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
# Maintainer: Daniele Basso <d dot bass05 at proton dot me>

## useful links:
# https://www.winehq.org
# https://gitlab.winehq.org/wine/wine

## options
: ${_build_staging:=false}
: ${_build_wow64:=true}

[[ "${_build_staging::1}" == "t" ]] && _pkgtype+="-staging"
[[ "${_build_wow64::1}" == "t" ]] && _pkgtype+="-wow64"

## basic info
_pkgname=wine
pkgname="${_pkgname}${_pkgtype:-}"
pkgver=9.0rc4
pkgrel=1
pkgdesc="A compatibility layer for running Windows programs"
url="https://www.winehq.org"
license=(LGPL)
arch=(x86_64)

depends=(
  alsa-plugins          #lib32-alsa-plugins
  fontconfig            #lib32-fontconfig
  freetype2             #lib32-freetype2
  gettext               #lib32-gettext
  gst-plugins-base-libs #lib32-gst-plugins-base-libs
  libpulse              #lib32-libpulse
  libxcomposite         #lib32-libxcomposite
  libxcursor            #lib32-libxcursor
  libxi                 #lib32-libxi
  libxinerama           #lib32-libxinerama
  libxrandr             #lib32-libxrandr
  opencl-icd-loader     #lib32-opencl-icd-loader
  pcsclite              #lib32-pcsclite
  sdl2                  #lib32-sdl2
  v4l-utils             #lib32-v4l-utils
  desktop-file-utils
  libgphoto2
  samba
  sane
)
makedepends=(
  libcups               #lib32-libcups
  libxxf86vm            #lib32-libxxf86vm
  mesa                  #lib32-mesa
  mesa-libgl            #lib32-mesa-libgl
  vulkan-icd-loader     #lib32-vulkan-icd-loader
  autoconf
  bison
  flex
  mingw-w64-gcc
  opencl-headers
  perl
  vulkan-headers
)
optdepends=(
  alsa-lib              #lib32-alsa-lib
  cups
  dosbox
)

provides=("wine=$pkgver")
conflicts=("wine")

install="wine.install"
backup=("usr/lib/binfmt.d/wine.conf")

options=(staticlibs !lto)

_pkgver="${pkgver/rc/-rc}"
_pkgsrc="$_pkgname-$_pkgver"
source=(
  "https://dl.winehq.org/wine/source/${pkgver::1}.0/$_pkgsrc.tar.xz"
  "30-win32-aliases.conf"
  "wine-binfmt.conf"
)
b2sums=('ebff8b1763ffe3d1eb60b1302d78a662a46140e6f76e4a0caf58d3e4e4c9168f'
        '9901a5ee619f24662b241672a7358364617227937d5f6d3126f70528ee5111e7'
        '6dfdefec305024ca11f35ad7536565f5551f09119dda2028f194aee8f77077a4')

if [[ "${_build_staging::1}" == "t" ]] ; then
  makedepends+=('git')

  provides+=(
    "wine-staging=$pkgver"
    "wine-wow64=$pkgver"
  )

  source+=("git+https://gitlab.winehq.org/wine/wine-staging.git#tag=v$_pkgver")

  prepare() {
    # apply wine-staging patchset
    cd "$_pkgsrc"
    ../wine-staging/staging/patchinstall.py --all
  }
fi

build() {
  cd "$_pkgsrc"
  ./configure \
    --disable-tests \
    --prefix=/usr \
    --libdir=/usr/lib \
    --enable-archs=x86_64,i386
  make
}

package() {
  cd "$_pkgsrc"
  make prefix="$pkgdir"/usr \
    libdir="$pkgdir"/usr/lib \
    dlldir="$pkgdir"/usr/lib/wine install

  i686-w64-mingw32-strip --strip-unneeded "$pkgdir"/usr/lib/wine/i386-windows/*.dll
  x86_64-w64-mingw32-strip --strip-unneeded "$pkgdir"/usr/lib/wine/x86_64-windows/*.dll

  ln -sf /usr/bin/wine "$pkgdir"/usr/bin/wine64

  # Font aliasing settings for Win32 applications
  install -Dm644 "$srcdir"/30-win32-aliases.conf -t "$pkgdir"/usr/share/fontconfig/conf.avail/
  install -d "$pkgdir"/usr/share/fontconfig/conf.default
  ln -s ../conf.avail/30-win32-aliases.conf "$pkgdir"/usr/share/fontconfig/conf.default/30-win32-aliases.conf

  install -Dm644 "$srcdir"/wine-binfmt.conf "$pkgdir"/usr/lib/binfmt.d/wine.conf
}

# vim:set ts=8 sts=2 sw=2 et: